UIQ Technology
Symbian OS Library

UIQ 3.1 SDK        UIQ developer portal

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



Location: EIKCLBD.H
Link against: eiklbx.lib

Class CColumnListBoxData

Interface status: deprecatedQuartz 6.0

class CColumnListBoxData : public CListBoxData;

Description

Additional column data for a CEikColumnListBox . The class also 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.

Uses an array to hold column data. To add a column to the array, call any of the following functions:

SetColumnAlignmentL()

SetColumnFontL()

SetColumnHorizontalGapL()

SetColumnWidthPixelL()

SetGraphicsColumnL()

Derivation

Members

Defined in CColumnListBoxData:
CColumnListBoxData(), ColumnAlignment(), ColumnFont(), ColumnHorizontalGap(), ColumnIsGraphics(), ColumnIsLefthandInterlacing(), ColumnUsesItemSpecificFont(), ColumnWidthPixel(), ConstructL(), ConstructLD(), Draw(), Font(), GetInnerGutter(), IconArray(), LastColumn(), MakeColumnRect(), NewL(), SetColumnAlignmentL(), SetColumnFontL(), SetColumnFontL(), SetColumnHorizontalGapL(), SetColumnUsesItemSpecificFontL(), SetColumnWidthPixelL(), SetGraphicsColumnL(), SetIconArray(), SetInnerGutter(), SetLefthandInterlacingColumnL(), SetSearchStringL(), TColors, ~CColumnListBoxData()

Inherited from CBase:
Delete(), Extension_(), operator new()

Inherited from CListBoxData:
Alignment(), CListBoxData_Reserved_1(), CListBoxData_Reserved_2(), ConstructFontL(), DrawItem(), FontBoundValues(), IsSearchString(), RegenerateFonts(), SetAlignmentL(), SetFontHeight(), SetupGc(), TFontStyle, UpdateFontBoundValues(), iFontProvider, iSearchString, iZoomFactor


Construction and destruction


NewL()

Interface status: deprecatedInherited from: CColumnListBoxData

static IMPORT_C CColumnListBoxData *NewL();

Description

Allocates and constructs a column list box data object. Calls ConstructLD() .

Return value

CColumnListBoxData *

Newly constructed column list box data object.


~CColumnListBoxData()

Interface status: deprecatedInherited from: CColumnListBoxData

IMPORT_C ~CColumnListBoxData();

Description

Destructor. This frees all resources and objects owned by this object.


CColumnListBoxData()

Interface status: deprecatedInherited from: CColumnListBoxData

protected: IMPORT_C CColumnListBoxData();

Description

Protected default constructor. This constructor is protected to ensure that users call the static NewL() constructor to create and fully construct this object.


ConstructL()

Interface status: deprecatedInherited from: CColumnListBoxData

protected: IMPORT_C void ConstructL();

Description

[Top]


Member functions


LastColumn()

Interface status: deprecatedInherited from: CColumnListBoxData

IMPORT_C TInt LastColumn() const;

Description

Gets the index of the last defined column.

Return value

TInt

The index of the last defined column column or KErrNotFound if no column has been defined.


ColumnWidthPixel()

Interface status: deprecatedInherited from: CColumnListBoxData

IMPORT_C TInt ColumnWidthPixel(TInt aColumn) const;

Description

Gets the specified column's width in pixels.

Parameters

TInt aColumn

The index of the column for which the width is obtained.

Return value

TInt

The specified column's width in pixels. Zero is returned if no column exists at the specified index.


SetColumnWidthPixelL()

Interface status: deprecatedInherited from: CColumnListBoxData

IMPORT_C void SetColumnWidthPixelL(TInt aColumn, TInt aWidth);

Description

Sets the specified column’s width in pixels.

If the column does not exist, it is added with the specified index to the array.

Parameters

TInt aColumn

The index of the column for which the width is set.

TInt aWidth

The width in pixels.


ColumnHorizontalGap()

Interface status: deprecatedInherited from: CColumnListBoxData

IMPORT_C TInt ColumnHorizontalGap(TInt aColumn) const;

Description

Gets the specified column’s horizontal gap.

Parameters

TInt aColumn

The index of the column for which the horizontal gap is obtained.

Return value

TInt

The specified column’s horizontal gap.


SetColumnHorizontalGapL()

Interface status: deprecatedInherited from: CColumnListBoxData

IMPORT_C void SetColumnHorizontalGapL(TInt aColumn, TInt aGap);

Description

Sets the specified column’s horizontal gap.

If the column does not exist, it is added with the specified index to the array.

Parameters

TInt aColumn

The index of the column for which the horizontal gap is set or added.

TInt aGap


ColumnFont()

Interface status: deprecatedInherited from: CColumnListBoxData

IMPORT_C const CFont *ColumnFont(TInt aColumn) const;

Description

Gets the specified column’s base font.

Parameters

TInt aColumn

The index of the column for which the font is obtained.

Return value

const CFont *

The specified column’s base font, or NULL if no data exists at the specified column index.


SetColumnFontL()

Interface status: deprecated

IMPORT_C void SetColumnFontL(TInt aColumn, const CFont *aDeprecated);

Description

Sets the specified column’s font.

If the column does not exist it is added, with the specified index, to the array.

Parameters

TInt aColumn

The index of the column for which the font is set.

const CFont *aDeprecated


SetColumnFontL()

Interface status: deprecatedInherited from: CColumnListBoxData

IMPORT_C void SetColumnFontL(TInt aColumn, const TCoeFont &aFont);

Description

Parameters

TInt aColumn

const TCoeFont &aFont


ColumnUsesItemSpecificFont()

Interface status: deprecatedInherited from: CColumnListBoxData

IMPORT_C TBool ColumnUsesItemSpecificFont(TInt aColumn) const;

Description

Checks whether items in the specified column uses fontproperties from the CColumnListBoxData::Properties() method or not.

Parameters

TInt aColumn

The column number to check font properties for.

Return value

TBool

ETrue if the current font properties are used. Otherwise EFalse .

See also:


SetColumnUsesItemSpecificFontL()

Interface status: deprecatedInherited from: CColumnListBoxData

IMPORT_C void SetColumnUsesItemSpecificFontL(TInt aColumn, TBool aUseFontPropertiesSpecificToItem);

Description

Used to say that a certain column should have a specific font. The properties is then set by overriding the CColumnListBoxItemDrawer::Properties() method.

Parameters

TInt aColumn

The column that should have a specific font.

TBool aUseFontPropertiesSpecificToItem

ETrue if it should have a specific font. Otherwise EFalse .

See also:


ColumnAlignment()

Interface status: deprecatedInherited from: CColumnListBoxData

IMPORT_C CGraphicsContext::TTextAlign ColumnAlignment(TInt aColumn) const;

Description

Gets the text alignment for the specified column.

Parameters

TInt aColumn

The index of the column for which the alignment is obtained.

Return value

CGraphicsContext::TTextAlign

The text alignment for the specified column. The default is ELeft .


SetColumnAlignmentL()

Interface status: deprecatedInherited from: CColumnListBoxData

IMPORT_C void SetColumnAlignmentL(TInt aColumn, CGraphicsContext::TTextAlign aAlign);

Description

Sets the text alignment for the specified column.

If the column does not exist, it is added with the specified index to the array.

Parameters

TInt aColumn

The index of the column for which alignment is set.

CGraphicsContext::TTextAlign aAlign

The text alignment to use.


ColumnIsGraphics()

Interface status: deprecatedInherited from: CColumnListBoxData

IMPORT_C TBool ColumnIsGraphics(TInt aColumn) const;

Description

Tests whether the column shows graphics.

Parameters

TInt aColumn

The index of the column to test.

Return value

TBool

ETrue if the column shows graphics. EFalse otherwise.


SetGraphicsColumnL()

Interface status: deprecatedInherited from: CColumnListBoxData

IMPORT_C void SetGraphicsColumnL(TInt aColumn, TBool aIsGraphics);

Description

Sets whether a column shows graphics.

If the column does not exist, it is added with the specified index to the array.

Parameters

TInt aColumn

The index of the column.

TBool aIsGraphics

ETrue to set the column as showing graphics. EFalse to set the column as not showing graphics.


ColumnIsLefthandInterlacing()

Interface status: deprecatedInherited from: CColumnListBoxData

IMPORT_C TBool ColumnIsLefthandInterlacing(TInt aColumn) const;

Description

Used to check if text in a column is aligned to the left.

Parameters

TInt aColumn

The column that is to be checked.

Return value

TBool

Returns ETrue if the text is left aligned. Otherwise EFalse .


SetLefthandInterlacingColumnL()

Interface status: deprecatedInherited from: CColumnListBoxData

IMPORT_C void SetLefthandInterlacingColumnL(TInt aColumn);

Description

Set the text in a column to be left aligned.

Parameters

TInt aColumn

The column to be left aligned.


IconArray()

Interface status: deprecatedInherited from: CColumnListBoxData

IMPORT_C CArrayPtr< CGulIcon > *IconArray() const;

Description

Gets the icon array. These icons contain the graphics that are displayed in graphical columns.

Return value

CArrayPtr< CGulIcon > *

Pointer to the icon array.


SetIconArray()

Interface status: deprecatedInherited from: CColumnListBoxData

IMPORT_C void SetIconArray(CArrayPtr< CGulIcon > *aArray);

Description

Sets the icon array. These icons contain the graphics that are displayed in graphical columns.

This function passes ownership of the icon list aArray - it is assumed that any previous array has been deleted by the caller.

Parameters

CArrayPtr< CGulIcon > *aArray

The new bitmap array.

See also:


Font()

Interface status: deprecatedInherited from: CColumnListBoxData

IMPORT_C const CFont *Font(const TListItemProperties &aItemProperties, TInt aColumn) const;

Description

Gets the font currently in use for the specified column, this accounts for item properties such as bold or italic.

Parameters

const TListItemProperties &aItemProperties

The specified column’s properties. For example. this may be bold, italic, bold and italic or normal.

TInt aColumn

The index of the column for which the font is obtained.

Return value

const CFont *

The specified column’s font. Null if no font is set for the column.

See also:


MakeColumnRect()

Interface status: deprecatedInherited from: CColumnListBoxData

IMPORT_C TBool MakeColumnRect(TInt aColumn, TRect &aRect);

Description

Gets the specified column's rectangle.

Parameters

TInt aColumn

The index of the column for which the rectangle is obtained.

TRect &aRect

On return, the specified column's rectangle.

Return value

TBool

ETrue if successful. EFalse if a non-existent column was specified.


Draw()

Interface status: deprecatedInherited from: CColumnListBoxData

virtual IMPORT_C void Draw(const TListItemProperties &aItemProperties, CWindowGc &aGc, const TDesC *aText, const CFont &aDefaultFont, const TRect &aRect, TBool aHighlight, const TColors &aColors) const;

Description

Draws a single row. The text aText is parsed into columns. aText is split on KColumnListSeparator , and 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.

If a cell is in a text column, its text is drawn into the rectangle specified by its column width (see SetColumnWidthPixelL() ).

If a cell is in a graphical column, the text for that column is parsed into a single TInt as a decimal string, which is used to index the icon array (see SetIconArray() ). The appropriate icon from the array is drawn into the cell's rectangle.

Parameters

const TListItemProperties &aItemProperties

The properties of each column in the row.

CWindowGc &aGc

The graphics context to draw to.

const TDesC *aText

The text to parse and draw.

const CFont &aDefaultFont

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.

See also:


SetSearchStringL()

Interface status: deprecatedInherited from: CColumnListBoxData

IMPORT_C void SetSearchStringL(const TDesC *aSearchString, const TInt aColumnIndex=0);

Description

Sets a column's search string.

Parameters

const TDesC *aSearchString

The string for which to search.

const TInt aColumnIndex

The column to which the search string is to be applied.


SetInnerGutter()

Interface status: deprecatedInherited from: CColumnListBoxData

IMPORT_C void SetInnerGutter(TInt aInnerGutter);

Description

Sets the space between the left edge of a column and the start of the column's text.

Parameters

TInt aInnerGutter

The required inner gutter.


GetInnerGutter()

Interface status: deprecatedInherited from: CColumnListBoxData

IMPORT_C TInt GetInnerGutter() const;

Description

Gets the space between the left edge of a column and the start of the column's text.

Return value

TInt

The inner gutter.


ConstructLD()

Interface status: deprecated

protected: IMPORT_C void ConstructLD();

Description

Called by the NewL() function to complete construction.

This function constructs an array in which the column data is held.

[Top]


Member classes


Class TColors

Interface status: deprecated

class TColors;

Description

Deprecated class.

Members

Defined in CColumnListBoxData::TColors:
TColors(), iBack, iHighlightedBack, iHighlightedText, iText

Construction and destruction


TColors()

Interface status: deprecatedInherited from: CColumnListBoxData::TColors

IMPORT_C TColors();

Description

Constructor. Initialises the colours as follows: text is initialised to black, highlighted text to white, the background to white and the highlighted background to black.

iBack is the background colour.

iHighlightedBack is the colour of the column background when highlighted.

iHighlightedText is the colour of highlighted text.

iText is the colour of the ordinary text.

Member data


iText

Interface status: deprecatedInherited from: CColumnListBoxData::TColors

TRgb iText;

Description


iBack

Interface status: deprecatedInherited from: CColumnListBoxData::TColors

TRgb iBack;

Description


iHighlightedText

Interface status: deprecatedInherited from: CColumnListBoxData::TColors

TRgb iHighlightedText;

Description


iHighlightedBack

Interface status: deprecatedInherited from: CColumnListBoxData::TColors

TRgb iHighlightedBack;

Description