UIQ Technology
 Developer Library

UIQ 3 SDK

UIQ developer portal

FEEDBACK 

[Index] [Spacer] [Previous] [Next]



Location: QikListBoxLayout.h

Class MQikListBoxLayoutOrnament

class MQikListBoxLayoutOrnament;

Description

Interface implemented by List Box item ornaments.

An ornament gives an application the chance to give List Box Items ornaments, i.e. draw before and after the item has been drawn to specialize it. Common uses are adding DRM keys on top of images and making lines in the background of the item.

Members

Defined in MQikListBoxLayoutOrnament:
DrawBehind(), DrawOnTop()

See also:


Member functions


DrawBehind()

virtual void DrawBehind(TInt aIndex, CWindowGc &aGc, const TRect &aItemRect, const MQikListBoxLayoutRects &aRects, TBool aHighlighted) const=0;

Description

This callback gives the ornament a chance to draw anything on the item rect before the item itself is drawn.

Be careful to not access other servers or do something computationally intensive inside this callback as this then will slow down your listbox considerably. It's preferable to precalculate any data needed so you only do draw operations.

Parameters

TInt aIndex

The index of the data item being drawn in this callback.

CWindowGc &aGc

The WindowGc that can be used to draw whatever is needed.

const TRect &aItemRect

The rect of the whole item being drawn.

const MQikListBoxLayoutRects &aRects

A reference to an MQikListBoxLayoutRects object that can be queried about the rects of slots.

TBool aHighlighted

Whether the item being drawn is highlighted or not.


DrawOnTop()

virtual void DrawOnTop(TInt aIndex, CWindowGc &aGc, const TRect &aItemRect, const MQikListBoxLayoutRects &aRects, TBool aHighlighted) const=0;

Description

This callback gives the ornament a chance to draw anything on top of the item rect after the item itself has been drawn.

Be careful to not access other servers or do something computationally intensive inside this callback as this then will slow down your listbox considerably. It's preferable to precalculate any data needed so you only do draw operations.

Parameters

TInt aIndex

The index of the data item being drawn in this callback.

CWindowGc &aGc

The WindowGc that can be used to draw whatever is needed.

const TRect &aItemRect

The rect of the whole item being drawn.

const MQikListBoxLayoutRects &aRects

A reference to an MQikListBoxLayoutRects object that can be queried about the rects of slots.

TBool aHighlighted

Whether the item being drawn is highlighted or not.

Terms and conditions of use of the material