class CColumnListBoxData : public CListBoxData |
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.
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 ) |
Private Member Functions | |
---|---|
TInt | AddActualFontL (const CFont *) |
void | AddColumnL ( TInt ) |
SColumn & | At ( TInt ) |
const SColumn & | At ( TInt ) |
void | BitBltColored ( CWindowGc &, TBool , const CGulIcon *, TInt , TBool , const TRect &) |
void | CheckIfSubCellsIntersect ( TAknTextLineLayout *, TBool *, const TDesC &, const TRect &) |
IMPORT_C TInt | ColumnEndX ( TInt ) |
IMPORT_C TInt | ColumnX ( TInt ) |
void | DoConstructL (const TAknsItemID &) |
void | DrawHighLight ( CWindowGc &, const TRect &, TBool , MAknsSkinInstance *) |
void | DrawMarkingModeIcons (const TListItemProperties &, CWindowGc &, TRect &) |
TBool | FindColumnIndex ( TInt &, TInt ) |
void | FindColumnIndexOrAddL ( TInt &, TInt ) |
IMPORT_C void | SetColumnEndXL ( TInt , TInt ) |
IMPORT_C void | SetColumnXL ( TInt , TInt ) |
void | SetUnderlineStyle ( TListItemProperties , CWindowGc &, TInt ) |
Private Attributes | |
---|---|
CArrayFix < SColumn > * | iColumnArray |
CColumnListBoxDataExtension * | iExtension |
Inherited Attributes | |
---|---|
CListBoxData::iBoldFont | |
CListBoxData::iBoldItalicFont | |
CListBoxData::iItalicFont | |
CListBoxData::iNormalFont | |
CListBoxData::iSearchString |
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).
TInt | AddActualFontL | ( | const CFont * | aBaseFont | ) | [private] |
const CFont * aBaseFont |
void | BitBltColored | ( | CWindowGc & | aGc, |
TBool | aHighlight, | |||
const CGulIcon * | aIcon, | |||
TInt | aSubcell, | |||
TBool | aColorIcon, | |||
const TRect & | aGraphicRect | |||
) | const [private] |
void | CheckIfSubCellsIntersect | ( | TAknTextLineLayout * | aLayouts, |
TBool * | aResults, | |||
const TDesC & | aText, | |||
const TRect & | aItemRect | |||
) | const [private] |
TAknTextLineLayout * aLayouts | |
TBool * aResults | |
const TDesC & aText | |
const TRect & aItemRect |
IMPORT_C CGraphicsContext::TTextAlign | ColumnAlignment | ( | TInt | aColumn | ) | const |
Gets the text alignment for the specified column.
TInt aColumn | The index of the column for which the alignment is obtained. |
IMPORT_C TInt | ColumnBaselinePos | ( | TInt | aColumn | ) | const |
Gets column's baseline.
TInt aColumn | target column. |
IMPORT_C const CFont * | ColumnFont | ( | TInt | aColumn | ) | const |
Gets font used by the column.
TInt aColumn | Target column. |
IMPORT_C TInt | ColumnHorizontalGap | ( | TInt | aColumn | ) | const |
Not used in S60.
TInt aColumn |
IMPORT_C TBool | ColumnIsGraphics | ( | TInt | aColumn | ) | const |
Checks whether the column contains graphics.
TInt aColumn | Target column. |
IMPORT_C TBool | ColumnIsNumber | ( | TInt | aColumn | ) | const |
Checks if the column is a number.
TInt aColumn | Target column. |
IMPORT_C TBool | ColumnIsOptional | ( | TInt | aColumn | ) | const |
Checks whether the column is optional.
TInt aColumn | Target column. |
IMPORT_C TMargins | ColumnMargins | ( | TInt | aColumn | ) | const |
Gets column's margins.
TInt aColumn | Target column. |
IMPORT_C CGraphicsContext::TPenStyle | ColumnSeparatorStyle | ( | TInt | aColumn | ) | const |
Not used in S60.
TInt aColumn |
IMPORT_C TInt | ColumnTextClipGap | ( | TInt | aSubCellIndex | ) | const |
Gets TextClipGap, the gap between words in a text clip, for the given column.
TInt aSubCellIndex | Index to target column. |
IMPORT_C TInt | ColumnWidthPixel | ( | TInt | aColumn | ) | const |
Gets the specified column s width in pixels.
TInt aColumn | The index of the column for which the width is obtained. |
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.
const TAknsItemID & aAnimationIID | Skin item identifier of the constructed animation. Passing KAknsIIDNone will disable highlight animation. |
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 |
void | DoConstructL | ( | const TAknsItemID & | aAnimationIID | ) | [private] |
const TAknsItemID & aAnimationIID |
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.
const TListItemProperties & aItemProperties | The properties of each column in the row. |
CWindowGc & aGc | The graphics context to draw into. |
const TDesC * aText | The text to parse and draw. |
const TRect & aRect | Bounding rectangle for the entire row. |
TBool aHighlight | ETrue to draw the item highlighted. EFalse otherwise. |
const TColors & aColors | The colours to use if the item is highlighted. |
void | DrawHighLight | ( | CWindowGc & | aGc, |
const TRect & | aRect, | |||
TBool | aHighlight, | |||
MAknsSkinInstance * | aSkin | |||
) | const [private] |
CWindowGc & aGc | |
const TRect & aRect | |
TBool aHighlight | |
MAknsSkinInstance * aSkin |
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 }
CBitmapContext & aGc | Graphics context for blitting animation frame |
const TRect & aRect | Target rect for blitting animation frame |
void | DrawMarkingModeIcons | ( | const TListItemProperties & | aProperties, |
CWindowGc & | aGc, | |||
TRect & | aItemRect | |||
) | const [private] |
Draws check boxes in marking mode
const TListItemProperties & aProperties | Item properties |
CWindowGc & aGc | Graphics context |
TRect & aItemRect | Item area |
void | DrawSimple | ( | const TListItemProperties & | aItemProperties, |
CWindowGc & | aGc, | |||
const TDesC * | aText, | |||
const TRect & | aRect, | |||
TBool | aHighlight, | |||
const TColors & | aColors | |||
) | const |
internal
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.
CWindowGc & aGc | Window graphics context controller. |
const TRect & aTextRect | The area where the text is drawn. |
const TDesC & aText | The whole text. Not clipped. |
const TDesC & aClippedText | Clipped / truncated text. |
const TInt aBaselineOffset | An offset from the top of the box to the text baseline. |
const CGraphicsContext::TTextAlign aAlign | The text alignment mode (default is left, rather than centre or right). |
const CFont & aFont | Wanted font. |
const TBool aHighlight | Does the current item have highlight. |
const TBool aIsTextClipped | Is the current item clipped. |
IMPORT_C void | EnableMarqueeL | ( | TBool | aEnable | ) |
Enables or disables the marquee.
TBool aEnable | ETrue = On. EFalse = Off. |
void | EnableStretching | ( | const TBool | aEnabled | ) |
const TBool aEnabled |
TBool | FindColumnIndex | ( | TInt & | aArrayIndex, |
TInt | aColumn | |||
) | const [private] |
void | FindColumnIndexOrAddL | ( | TInt & | aArrayIndex, |
TInt | aColumn | |||
) | [private] |
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.
const TListItemProperties & aItemProperties | Whether the required font is: bold, italic, bold and italic or normal. |
TInt aColumn | The index of the column for which the font is obtained. |
TSize | GetSubCellIconSize | ( | TInt | aIndex | ) |
Gets subcell icon size.
TInt aIndex | Index of the wanted subcell. |
void | HandleResourceChange | ( | TInt | aType | ) |
Handles changing of an resource. Only supports skin change.
TInt aType | Defines the resource that has changed. |
IMPORT_C const CAknsEffectAnim * | HighlightAnim | ( | ) | const |
Gets the highlight animation .
IMPORT_C CArrayPtr < CGulIcon > * | IconArray | ( | ) | const |
Gets the icon array.
These icons contain the bitmaps that are displayed in graphical columns.
TBool | KineticScrollingEnabled | ( | ) | const |
Returns ETrue if kinetic scrolling is enabled.
IMPORT_C CAknLayoutData * | LayoutData | ( | ) | const |
Gives out layout data for separator line drawing.
IMPORT_C TBool | MakeColumnRect | ( | TInt | aColumn, |
TRect & | aRect | |||
) |
Gets the specified column s surrounding rectangle.
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.
IMPORT_C const CFont * | RowAndColumnFont | ( | TInt | aRow, |
TInt | aColumn | |||
) | const |
Gets the font attached to the row and cell.
IMPORT_C TAknSeparatorLinePosition | SeparatorLinePosition | ( | ) | const |
Gives out separator line 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.
TInt aColumn | The index of the column for which alignment is set. |
CGraphicsContext::TTextAlign aAlign | The text alignment to use. The default is ELeft. |
IMPORT_C void | SetColumnBaselinePosL | ( | TInt | aColumn, |
TInt | aPos | |||
) |
Sets columns baseline position.
IMPORT_C void | SetColumnEndXL | ( | TInt | aColumn, |
TInt | aEndX | |||
) | const [private] |
IMPORT_C void | SetColumnFontForRowL | ( | TInt | aRow, |
TInt | aColumn, | |||
const CFont * | aFont | |||
) |
Sets the font attached to the cell for each row separately.
IMPORT_C void | SetColumnFontL | ( | TInt | aColumn, |
const CFont * | aFont | |||
) |
Sets column's font.
IMPORT_C void | SetColumnHorizontalGapL | ( | TInt | aColumn, |
TInt | aGap | |||
) |
Not used in S60.
IMPORT_C void | SetColumnMarginsL | ( | TInt | aColumn, |
TMargins | aMargins | |||
) |
Sets column's margins.
IMPORT_C void | SetColumnSeparatorStyleL | ( | TInt | aColumn, |
CGraphicsContext::TPenStyle | aStyle | |||
) |
Not used in S60.
TInt aColumn | |
CGraphicsContext::TPenStyle aStyle |
IMPORT_C void | SetColumnTextClipGapL | ( | TInt | aSubCellIndex, |
TInt | aSize | |||
) |
Sets columns TextClipGap, the gap between words in a text clip.
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.
TBitFlags32 aUnderlinedColumns | Bitmask of columns to be underlined. |
IMPORT_C void | SetColumnWidthPixelL | ( | TInt | aColumn, |
TInt | aWidth | |||
) |
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.
IMPORT_C void | SetConditionalSubCellL | ( | TInt | aSubCell, |
const TAknTextLineLayout & | aTextLayout, | |||
TInt | aAffectedSubCell | |||
) |
TInt aSubCell | |
const TAknTextLineLayout & aTextLayout | |
TInt aAffectedSubCell |
IMPORT_C void | SetControl | ( | CCoeControl * | aControl | ) |
Sets CCoeControl for current component.
CCoeControl * 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.
TInt aIndex | The new index for the current item. |
void | SetCurrentMarqueeItemIndex | ( | TInt | aIndex | ) |
Sets the index for current marquee item.
TInt aIndex | Item index. |
void | SetESSHighlightedTextColor | ( | TRgb | aHighlightedTextColor | ) |
Sets text colour for highlighted text.
TRgb aHighlightedTextColor | Wanted colour. |
void | SetESSTextColor | ( | TRgb | aTextColor | ) |
Sets text colour.
TRgb aTextColor | Wanted colour. |
IMPORT_C void | SetGraphicSubCellL | ( | TInt | aSubCell, |
const TAknWindowLineLayout & | aGraphicLayout | |||
) |
TInt aSubCell | |
const TAknWindowLineLayout & aGraphicLayout |
IMPORT_C void | SetGraphicsColumnL | ( | TInt | aColumn, |
TBool | aIsGraphics | |||
) |
Sets whether the column shows graphics.
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).
MColumnListBoxAnimBackgroundDrawer * aDrawer | New background drawer. |
IMPORT_C void | SetIconArray | ( | CArrayPtr < CGulIcon > * | aArray | ) |
Sets icon array.
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.
const TSize & aSizeInPixels | New size in pixels for the Item cell. |
IMPORT_C void | SetLayoutInit | ( | TBool | aValue | ) | const |
Sets the initialization .
TBool aValue | Wanted value (ETrue = initialized). |
IMPORT_C void | SetListEndSkinStyle | ( | const TAknsItemID * | aId, |
const TRect & | aRect | |||
) |
Sets skin style for the end of the list.
const TAknsItemID * aId | Wanted skins item ID. |
const TRect & aRect | Skin tile size. |
IMPORT_C void | SetMarqueeParams | ( | const TInt | aLoops, |
const TInt | aScrollAmount, | |||
const TInt | aScrollDelay | |||
) |
Customizes marquee default behaviour.
Use this before enabling marquee ( EnableMarqueeL() ), otherwise marquee behaviour will change during animation.
IMPORT_C void | SetMarqueeParams | ( | const TInt | aLoops, |
const TInt | aScrollAmount, | |||
const TInt | aScrollDelay, | |||
const TInt | aInterval | |||
) |
Customizes marquee default behaviour.
IMPORT_C void | SetNumberColumnL | ( | TInt | aColumn, |
TBool | aIsNumber | |||
) |
Sets whether the column is a number.
IMPORT_C void | SetOptionalColumnL | ( | TInt | aColumn, |
TBool | aIsOptional | |||
) |
Sets whether the column is optional.
IMPORT_C void | SetSeparatorLinePosition | ( | TAknSeparatorLinePosition | aPosition | ) |
Sets position of listbox line.
TAknSeparatorLinePosition aPosition | Wanted position. |
void | SetSkinBackgroundContext | ( | CAknsListBoxBackgroundControlContext * | aContext | ) |
Sets background skin context. Changes ownership as well.
CAknsListBoxBackgroundControlContext * aContext | Wanted background skin control context. |
IMPORT_C void | SetSkinEnabledL | ( | TBool | aEnabled | ) |
Enables/Disables skin.
TBool 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.
const TAknsItemID * aFrameId | Wanted skin's item ID for the frame. |
const TAknsItemID * 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.
const TAknsItemID * aId | Wanted skins item ID. |
const TRect & aTileRect | Skin tile size. |
IMPORT_C void | SetStretchableConditionalSubCellL | ( | TInt | aSubCell, |
const TAknTextComponentLayout & | aNormalLayout, | |||
const TAknTextComponentLayout & | aStretchedLayout, | |||
TInt | aNormalSubCell, | |||
TInt | aStretchedSubCell | |||
) |
TInt aSubCell | |
const TAknTextComponentLayout & aNormalLayout | |
const TAknTextComponentLayout & aStretchedLayout | |
TInt aNormalSubCell | |
TInt aStretchedSubCell |
IMPORT_C void | SetStretchableGraphicSubCellL | ( | TInt | aSubCell, |
const TAknWindowComponentLayout & | aNormalLayout, | |||
const TAknWindowComponentLayout & | aStretchedLayout | |||
) |
TInt aSubCell | |
const TAknWindowComponentLayout & aNormalLayout | |
const TAknWindowComponentLayout & aStretchedLayout |
IMPORT_C void | SetStretchableTextSubCellL | ( | TInt | aSubCell, |
const TAknTextComponentLayout & | aNormalLayout, | |||
const TAknTextComponentLayout & | aStretchedLayout | |||
) |
TInt aSubCell | |
const TAknTextComponentLayout & aNormalLayout | |
const TAknTextComponentLayout & aStretchedLayout |
IMPORT_C void | SetSubCellIconSize | ( | TInt | aIndex, |
TSize | aSize | |||
) |
Sets the subcell icon size.
IMPORT_C void | SetTextSubCellL | ( | TInt | aSubCell, |
const TAknTextLineLayout & | aTextLayout | |||
) |
TInt aSubCell | |
const TAknTextLineLayout & aTextLayout |
void | SetUnderlineStyle | ( | TListItemProperties | aProperties, |
CWindowGc & | aGc, | |||
TInt | aColumn | |||
) | const [private] |
TListItemProperties aProperties | |
CWindowGc & aGc | |
TInt aColumn |
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.
IMPORT_C void | SubCellsMightIntersect | ( | const TBool | aMightIntersect | ) |
const TBool aMightIntersect |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.