#include <mw/eikclbd.h>
class CColumnListBoxData : public CListBoxData |
Protected Member Functions | |
---|---|
CColumnListBoxData() | |
IMPORT_C void | ConstructLD() |
IMPORT_C void | ConstructLD(const TAknsItemID &) |
IMPORT_C void | DrawText(CWindowGc &, const TRect &, const TDesC &, const TDesC &, const TInt, const CGraphicsContext::TTextAlign, const CFont &, const TBool, const TBool) |
Inherited Attributes | |
---|---|
CListBoxData::iBoldFont | |
CListBoxData::iBoldItalicFont | |
CListBoxData::iItalicFont | |
CListBoxData::iNormalFont | |
CListBoxData::iSearchString |
The CColumnListBoxData class handles the data required to draw a column list box.
The class performs drawing for CColumnListBoxItemDrawer. Columns are numbered from 0 from left to right, and extra column data can be set for each.
N.B.: The standard width of a column drawn by CColumnListListBoxData is 0 pixels, so at the very least a column width should be set for each column in a column list box.
This class is not intended for user derivation.
IMPORT_C void | AboutToDrawHighlightAnim | ( | ) | const |
This method should be called before drawing animated highlight. It will sync the animation with the background under the current highlight (only when current item index has changed).
IMPORT_C CGraphicsContext::TTextAlign | ColumnAlignment | ( | TInt | aColumn | ) | const |
Gets the text alignment for the specified column.
Parameter | Description |
---|---|
aColumn | The index of the column for which the alignment is obtained. |
Returns: The text alignment for the specified column. The default is ELeft.
IMPORT_C CGraphicsContext::TPenStyle | ColumnSeparatorStyle | ( | TInt | aColumn | ) | const |
Not used in S60.
IMPORT_C void | ConstructLD | ( | ) | [protected] |
A second phase constructor.
Highlight animation will be created by default (if it is provided by the skin).
IMPORT_C void | ConstructLD | ( | const TAknsItemID & | aAnimationIID | ) | [protected] |
Second phase constructor for subclasses that want to override highlight animation creation.
Parameter | Description |
---|---|
aAnimationIID | Skin item identifier of the constructed animation. Passing KAknsIIDNone will disable highlight animation. |
IMPORT_C CCoeControl * | Control | ( | ) | const |
Gets CCoeControl for component.
Returns: Pointer to the used CCoeControl.
void | CreateMarqueeControlL | ( | ) |
Creates a marquee control for the CColumnListBoxData and redraw.
void | CreatePictographInterfaceL | ( | ) |
Creates a pictograph interface for the CColumnListBoxData.
IMPORT_C TUint32 | CurrentItemTextWasClipped | ( | ) | const |
Returns: bitfield of clipped columns
TInt | CurrentMarqueeItemIndex | ( | ) |
Gets current marquee item index.
Returns: Current marquee item index.
IMPORT_C void | Draw | ( | const TListItemProperties & | aItemProperties, |
CWindowGc & | aGc, | |||
const TDesC * | aText, | |||
const TRect & | aRect, | |||
TBool | aHighlight, | |||
const TColors & | aColors | |||
) | const [virtual] |
Draws a single row.
The text aText is parsed into columns and is split using KColumnListSeparator. Text or bitmaps are drawn according to whether the column has been set as a graphical column (see SetGraphicsColumnL()). Column cells within the row are drawn from left to right.
Parameter | Description |
---|---|
aItemProperties | The properties of each column in the row. |
aGc | The graphics context to draw into. |
aText | The text to parse and draw. |
aRect | Bounding rectangle for the entire row. |
aHighlight | ETrue to draw the item highlighted. EFalse otherwise. |
aColors | The colours to use if the item is highlighted. |
IMPORT_C TBool | DrawHighlightAnim | ( | CBitmapContext & | aGc, |
const TRect & | aRect | |||
) | const |
The preferred method for drawing highlight animation in derived classes. Before calling this method you should check that highlight animation exists by calling HasHighlightAnim. In case of draw failure you should default to normal skinned highlight drawing. For example:
TBool drawOk = EFalse;
if( HasHighlightAnim() ) { drawOk = DrawHighlightAnim( gc, rect ); }
if( !drawOk ) { ...do normal skinned draw }
Parameter | Description |
---|---|
aGc | Graphics context for blitting animation frame |
aRect | Target rect for blitting animation frame |
Returns: The draw status, ETrue if drawing was ok, EFalse otherwise.
IMPORT_C void | DrawText | ( | CWindowGc & | aGc, |
const TRect & | aTextRect, | |||
const TDesC & | aText, | |||
const TDesC & | aClippedText, | |||
const TInt | aBaselineOffset, | |||
const CGraphicsContext::TTextAlign | aAlign, | |||
const CFont & | aFont, | |||
const TBool | aHighlight, | |||
const TBool | aIsTextClipped | |||
) | const [protected] |
Wraps the text drawing functinality with & without marquee into one function, so that inherited classes can modify their own drawing behaviour more easily.
Parameter | Description |
---|---|
aGc | Window graphics context controller. |
aTextRect | The area where the text is drawn. |
aText | The whole text. Not clipped. |
aClippedText | Clipped / truncated text. |
aBaselineOffset | An offset from the top of the box to the text baseline. |
aAlign | The text alignment mode (default is left, rather than centre or right). |
aFont | Wanted font. |
aHighlight | Does the current item have highlight. |
aIsTextClipped | Is the current item clipped. |
IMPORT_C void | EnableMarqueeL | ( | TBool | aEnable | ) |
Enables or disables the marquee.
Parameter | Description |
---|---|
aEnable | ETrue = On. EFalse = Off. |
void | FocusLost | ( | ) |
Called when the CColumnListBoxData is unselected. Informs the CColumnListBoxData extension that the focus has been lost.
IMPORT_C CFont * | Font | ( | const TListItemProperties & | aItemProperties, |
TInt | aColumn | |||
) | const |
Gets the specified font for the specified column.
Parameter | Description |
---|---|
aItemProperties | Whether the required font is: bold, italic, bold and italic or normal. |
aColumn | The index of the column for which the font is obtained. |
Returns: The specified column s, specified font. Null, the default, if no font is set for the column.
void | HandleResourceChange | ( | TInt | aType | ) |
Handles changing of an resource. Only supports skin change.
Parameter | Description |
---|---|
aType | Defines the resource that has changed. |
IMPORT_C TBool | HasHighlightAnim | ( | ) | const |
Returns: ETrue if highlight animation exists, EFalse otherwise.
IMPORT_C const CAknsEffectAnim * | HighlightAnim | ( | ) | const |
Gets the highlight animation .
Returns: CAknsEffectAnim that is used for when the highlighted list is drawn. May return NULL, in this case the normal skinned highlight should be drawn. This pointer is valid only during the draw -> you should not store it locally outside draw scope.
TBool | KineticScrollingEnabled | ( | ) | const |
Returns ETrue if kinetic scrolling is enabled.
IMPORT_C TInt | LastColumn | ( | ) | const |
Gets the index of the last defined column.
Returns: The index of the last defined column or KErrNotFound if no column has been defined.
IMPORT_C CAknLayoutData * | LayoutData | ( | ) | const |
Gives out layout data for separator line drawing.
Returns: Requested layout data.
IMPORT_C TBool | LayoutInit | ( | ) | const |
Checks if the layout has been initialized.
Returns: ETrue if initialized.
Gets the specified column s surrounding rectangle.
Parameter | Description |
---|---|
aColumn | The index of the column for which the rectangle is obtained. |
aRect | On return contains the specified column s rectangle. |
Returns: ETrue if successful. EFalse if a non-existent column was specified.
IMPORT_C CColumnListBoxData * | NewL | ( | ) | [static] |
Two-phased constructor.
Allocates and constructs a column list box data object.
Constructs an array in which the column data is held.
Returns: New CColumnListBoxData.
IMPORT_C TAknSeparatorLinePosition | SeparatorLinePosition | ( | ) | const |
Gives out separator line position.
Returns: Separator position.
IMPORT_C void | SetColumnAlignmentL | ( | TInt | aColumn, |
CGraphicsContext::TTextAlign | aAlign | |||
) |
Sets the text alignment for the specified column.
If the column does not exist, it is added with the specified index to the array.
Parameter | Description |
---|---|
aColumn | The index of the column for which alignment is set. |
aAlign | The text alignment to use. The default is ELeft. |
IMPORT_C void | SetColumnSeparatorStyleL | ( | TInt | aColumn, |
CGraphicsContext::TPenStyle | aStyle | |||
) |
Not used in S60.
IMPORT_C void | SetColumnUnderlined | ( | TBitFlags32 | aUnderlinedColumns | ) |
Enables / disables underlining per text column, if and only if TListItemProperties also has underlining enabled. If this method is not called and TListItemProperties has underlining enabled, drawing will revert to old style where only first text column will be underlined.
Parameter | Description |
---|---|
aUnderlinedColumns | Bitmask of columns to be underlined. |
Sets the specified column s width in pixels.
If the column does not exist, one is added at the specified index, with the specifed width.
Parameter | Description |
---|---|
aColumn | The index of the column for which the width is to be set. |
aWidth | The width in pixels. |
IMPORT_C void | SetConditionalSubCellL | ( | TInt | aSubCell, |
const TAknTextLineLayout & | aTextLayout, | |||
TInt | aAffectedSubCell | |||
) |
IMPORT_C void | SetControl | ( | CCoeControl * | aControl | ) |
Sets CCoeControl for current component.
Parameter | Description |
---|---|
aControl | Current listbox control instance, cannot be any other control. |
void | SetCurrentItemIndex | ( | TInt | aIndex | ) |
Sets the current list item index. Since S60 2.6 causes highlight animation tochange its background (only if the current item index changes). Do not call this method if the index is not the current item index.
Parameter | Description |
---|---|
aIndex | The new index for the current item. |
void | SetCurrentMarqueeItemIndex | ( | TInt | aIndex | ) |
Sets the index for current marquee item.
Parameter | Description |
---|---|
aIndex | Item index. |
void | SetESSHighlightedTextColor | ( | TRgb | aHighlightedTextColor | ) |
Sets text colour for highlighted text.
Parameter | Description |
---|---|
aHighlightedTextColor | Wanted colour. |
IMPORT_C void | SetGraphicSubCellL | ( | TInt | aSubCell, |
const TAknWindowLineLayout & | aGraphicLayout | |||
) |
IMPORT_C void | SetHighlightAnimBackgroundDrawer | ( | MColumnListBoxAnimBackgroundDrawer * | aDrawer | ) |
Sets the observer for overriding default highlight input layer drawing functionality. Note that you should still call AboutToDrawHighlightAnim (it will call the observer if it is set).
Parameter | Description |
---|---|
aDrawer | New background drawer. |
IMPORT_C void | SetItemCellSize | ( | const TSize & | aSizeInPixels | ) |
Changes item cell size & resizes highlight animation. Called by list when item cell size changes. If you are using non-standard highlight sizes make sure to sync the list item cell size.
Parameter | Description |
---|---|
aSizeInPixels | New size in pixels for the Item cell. |
IMPORT_C void | SetLayoutInit | ( | TBool | aValue | ) | const |
Sets the initialization .
Parameter | Description |
---|---|
aValue | Wanted value (ETrue = initialized). |
IMPORT_C void | SetListEndSkinStyle | ( | const TAknsItemID * | aId, |
const TRect & | aRect | |||
) |
Sets skin style for the end of the list.
Parameter | Description |
---|---|
aId | Wanted skins item ID. |
aRect | Skin tile size. |
Customizes marquee default behaviour.
Use this before enabling marquee ( EnableMarqueeL() ), otherwise marquee behaviour will change during animation.
Parameter | Description |
---|---|
aLoops | Max number of loops to be executed. |
aScrollAmount | The amount of pixels scrolled per iteration. |
aScrollDelay | The interval between iterations. |
IMPORT_C void | SetMarqueeParams | ( | const TInt | aLoops, |
const TInt | aScrollAmount, | |||
const TInt | aScrollDelay, | |||
const TInt | aInterval | |||
) |
Customizes marquee default behaviour.
Parameter | Description |
---|---|
aLoops | Max number of loops to be executed. |
aScrollAmount | The amount of pixels scrolled per iteration. |
aScrollDelay | The interval between iterations. |
aInterval | The interval between frame updates. |
IMPORT_C void | SetSeparatorLinePosition | ( | TAknSeparatorLinePosition | aPosition | ) |
Sets position of listbox line.
Parameter | Description |
---|---|
aPosition | Wanted position. |
void | SetSkinBackgroundContext | ( | CAknsListBoxBackgroundControlContext * | aContext | ) |
Sets background skin context. Changes ownership as well.
Parameter | Description |
---|---|
aContext | Wanted background skin control context. |
IMPORT_C void | SetSkinEnabledL | ( | TBool | aEnabled | ) |
Reimplemented from CListBoxData::SetSkinEnabledL(TBool)
Enables/Disables skin.
Parameter | Description |
---|---|
aEnabled | Sets whether the skins are enable or disabled ETrue for enabling skins. |
IMPORT_C void | SetSkinHighlightFrame | ( | const TAknsItemID * | aFrameId, |
const TAknsItemID * | aFrameCenterId | |||
) |
Sets skin for the highlighted frame.
Parameter | Description |
---|---|
aFrameId | Wanted skin's item ID for the frame. |
aFrameCenterId | Wanted skin's item ID for the center of the frame. |
IMPORT_C void | SetSkinStyle | ( | const TAknsItemID * | aId, |
const TRect & | aTileRect | |||
) |
Sets style for the skin fot list tiles.
Parameter | Description |
---|---|
aId | Wanted skins item ID. |
aTileRect | Skin tile size. |
IMPORT_C void | SetStretchableConditionalSubCellL | ( | TInt | aSubCell, |
const TAknTextComponentLayout & | aNormalLayout, | |||
const TAknTextComponentLayout & | aStretchedLayout, | |||
TInt | aNormalSubCell, | |||
TInt | aStretchedSubCell | |||
) |
IMPORT_C void | SetStretchableGraphicSubCellL | ( | TInt | aSubCell, |
const TAknWindowComponentLayout & | aNormalLayout, | |||
const TAknWindowComponentLayout & | aStretchedLayout | |||
) |
IMPORT_C void | SetStretchableTextSubCellL | ( | TInt | aSubCell, |
const TAknTextComponentLayout & | aNormalLayout, | |||
const TAknTextComponentLayout & | aStretchedLayout | |||
) |
IMPORT_C void | SetTextSubCellL | ( | TInt | aSubCell, |
const TAknTextLineLayout & | aTextLayout | |||
) |
void | SetupSkinContextL | ( | ) |
Setup skin control context for handling background skins. if no skin control context is found one is created.
IMPORT_C MAknsControlContext * | SkinBackgroundContext | ( | ) | const |
Gets background skin context.
Returns: Component's skin control context.
IMPORT_C void | SubCellsMightIntersect | ( | const TBool | aMightIntersect | ) |