Single style hierarchical column list is hierarchical list type that can contain three types of items: Core data rows, simple data rows, and subtitle rows.
Core data row is a list item that consists of two text columns in portrait mode, and in addition to those, it can have an optional third text column in landscape mode. Core data row can contain one icon in front of text columns, and up to two optional indicator icons at the other end of the row.
Simple data row is a list item that consists of single text column, and can have one leaf icon in front of the text, and one optional icon at the other end.
Subtitle row is otherwise similar to simple data row, but as core data row and simple data row are tree leaves that cannot contain other list items as children, the subtitle row is a tree node that can be used in forming the hierarchy for the list. As a node, subtitle row has expand and collapse functionality, and it can group other tree items, including other subtitle rows. However, since hierarchical column list does not support indention of tree items or drawing of tree structure lines, the hierarchy should be limited to two levels for clarity.
TUint32 flags = CAknSingleColumnStyleTreeList::EPersistent;
TBool drawNow = EFalse;
_LIT( KSimpleDataRowText, "Simple data row" );
TAknTreeItemID simpleItem = list->AddSimpleDataRowL( KAknTreeIIDRoot,
KSimpleDataRowText, flags, drawNow );
_LIT( KSubtitleRowText, "Subtitle row" );
TAknTreeItemID subtitle = list->AddSubtitleRowL( KAknTreeIIDRoot,
KSubtitleRowText, flags, drawNow );
_LIT( KCoreDataRowText, "Core data row" );
TAknTreeItemID coreItem = list->AddCoreDataRowL( subtitle,
KCoreDataRowText, KNulDesC, flags, drawNow );
|
Public Types |
enum | TItemType {
ENone = 0,
ETreeRoot = 1,
ESimpleDataRow = 2,
ECoreDataRow = 3,
ESubtitleRow = 4
} |
| Item types used in single style hierarchical column list. More...
|
enum | TItemFlags {
EPersistent = 0x01,
EMarked = 0x02,
EExpanded = 0x04,
ENonEmpty = 0x08,
EEmphasis = 0x10,
EMarkingDisabled = 0x20
} |
| Flags usable with single column style tree items. More...
|
enum | TIconType {
ELeaf = 0,
EHighlightedLeaf = 1,
EExpandedNode = 2,
EHighlightedExpandedNode = 3,
ECollapsedNode = 4,
EHighlightedCollapsedNode = 5,
EOptionalIcon1 = 6,
EHighlightedOptionalIcon1 = 7,
EOptionalIcon2 = 8,
EHighlightedOptionalIcon2 = 9
} |
| Icon types usable with single column style hierarchical list. More...
|
Public Member Functions |
virtual | ~CAknSingleColumnStyleTreeList () |
| Destructor.
|
IMPORT_C TAknTreeItemID | AddSimpleDataRowL (TAknTreeItemID aParent, const TDesC &aText, TUint32 aFlags, TBool aDrawNow) |
| Adds new simple data row to single style hierarchical column list.
|
IMPORT_C TAknTreeItemID | AddCoreDataRowL (TAknTreeItemID aParent, const TDesC &aFirstColumn, const TDesC &aSecondColumn, TUint32 aFlags, TBool aDrawNow) |
| Adds new core data row to single style hierarchical column list.
|
IMPORT_C TAknTreeItemID | AddCoreDataRowL (TAknTreeItemID aParent, const TDesC &aFirstColumnd, const TDesC &aSecondColumn, const TDesC &aThirdColumn, TUint32 aFlags, TBool aDrawNow) |
| Adds new core data row to single style hierarchical column list.
|
IMPORT_C TAknTreeItemID | AddSubtitleRowL (TAknTreeItemID aParent, const TDesC &aText, TUint32 aFlags, TBool aDrawNow) |
| Adds new subtitle row to single style hierarchical column list.
|
IMPORT_C const TDesC & | Text (TAknTreeItemID aItem) const |
| Returns the text field of the specified list item.
|
IMPORT_C const TDesC & | Text (TAknTreeItemID aItem, TInt aColumnIndex) const |
| Returns the specified text column of specified list item.
|
IMPORT_C void | SetTextL (TAknTreeItemID aItem, const TDesC &aText, TBool aDrawNow) |
| Sets the text for specified hierarchical column list item.
|
IMPORT_C void | SetTextL (TAknTreeItemID aItem, const TDesC &aText, TInt aColumnIndex, TBool aDrawNow) |
| Sets the text for specified column of specified hierarchical column list item.
|
IMPORT_C TBool | IsEmphasised (TAknTreeItemID aItem) const |
| Checks whether the specified core data row is emphasised.
|
IMPORT_C void | SetEmphasis (TAknTreeItemID aItem, TBool aEmphasis, TBool aDrawNow) |
| Sets the emphasis for specified core data row.
|
IMPORT_C TBool | IsThirdColumnEnabled (TAknTreeItemID aItem) const |
| Checks whether the third text column is enabled for specified core data row.
|
IMPORT_C void | EnableThirdColumn (TAknTreeItemID aItem, TBool aEnable, TBool aDrawNow) |
| Enables or disables third text column usage in landscape mode for specified core data row.
|
IMPORT_C TInt | Icon (TAknTreeItemID aItem, TIconType aType) const |
| Returns the icon ID set for the specified icon of a list item.
|
IMPORT_C void | SetIcon (TAknTreeItemID aItem, TIconType aType, TInt aIconId, TBool aDrawNow) |
| Sets an icon for a list item.
|
IMPORT_C TItemType | ItemType (TAknTreeItemID aItem) const |
| Checks the type of the specified list item.
|
void | SetFlags (TUint32 aFlags) |
| From CAknTreeList.
|
void | HandleResourceChange (TInt aType) |
| From CAknTreeList.
|
Static Public Member Functions |
static IMPORT_C CAknSingleColumnStyleTreeList * | NewL () |
| Two phased constructor.
|
static IMPORT_C CAknSingleColumnStyleTreeList * | NewL (const CCoeControl &aContainer) |
| Two phased constructor.
|
static IMPORT_C CAknSingleColumnStyleTreeList * | NewLC () |
| Otherwise identical to NewL() , but leaves the newly created object in the cleanup stack.
|
static IMPORT_C CAknSingleColumnStyleTreeList * | NewLC (const CCoeControl &aContainer) |
| Otherwise identical to NewL( const CCoeControl& ) , but leaves the newly created object in the cleanup stack.
|