epoc32/include/mw/aknsinglecolumnstyletreelist.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
williamr@2
     1
/*
williamr@2
     2
* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     3
* All rights reserved.
williamr@2
     4
* This component and the accompanying materials are made available
williamr@2
     5
* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
williamr@2
     6
* which accompanies this distribution, and is available
williamr@2
     7
* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2
     8
*
williamr@2
     9
* Initial Contributors:
williamr@2
    10
* Nokia Corporation - initial contribution.
williamr@2
    11
*
williamr@2
    12
* Contributors:
williamr@2
    13
*
williamr@2
    14
* Description:  Single style hierarchical column list.
williamr@2
    15
*
williamr@2
    16
*/
williamr@2
    17
williamr@2
    18
williamr@2
    19
#ifndef C_AKNSINGLECOLUMNSTYLETREELIST_H
williamr@2
    20
#define C_AKNSINGLECOLUMNSTYLETREELIST_H
williamr@2
    21
williamr@2
    22
williamr@2
    23
#include <akntreelist.h>
williamr@2
    24
williamr@2
    25
williamr@2
    26
/**
williamr@2
    27
 *  Single style hierarchical column list.
williamr@2
    28
 *
williamr@2
    29
 *  Single style hierarchical column list is hierarchical list type that
williamr@2
    30
 *  can contain three types of items: Core data rows, simple data rows, and
williamr@2
    31
 *  subtitle rows.
williamr@2
    32
 *
williamr@2
    33
 *  Core data row is a list item that consists of two text columns in
williamr@2
    34
 *  portrait mode, and in addition to those, it can have an optional
williamr@2
    35
 *  third text column in landscape mode. Core data row can contain one icon
williamr@2
    36
 *  in front of text columns, and up to two optional indicator icons at the
williamr@2
    37
 *  other end of the row.
williamr@2
    38
 *
williamr@2
    39
 *  Simple data row is a list item that consists of single text column, and
williamr@2
    40
 *  can have one leaf icon in front of the text, and one optional icon at
williamr@2
    41
 *  the other end.
williamr@2
    42
 *
williamr@2
    43
 *  Subtitle row is otherwise similar to simple data row, but as core data
williamr@2
    44
 *  row and simple data row are tree leaves that cannot contain other list
williamr@2
    45
 *  items as children, the subtitle row is a tree node that can be used in 
williamr@2
    46
 *  forming the hierarchy for the list. As a node, subtitle row has expand
williamr@2
    47
 *  and collapse functionality, and it can group other tree items, including
williamr@2
    48
 *  other subtitle rows. However, since hierarchical column list does not
williamr@2
    49
 *  support indention of tree items or drawing of tree structure lines,
williamr@2
    50
 *  the hierarchy should be limited to two levels for clarity.
williamr@2
    51
 * 
williamr@2
    52
 *  The @c CAknSingleColumnStyleTreeList class contains only methods for
williamr@2
    53
 *  constructing the list, constructing and adding the list type specific
williamr@2
    54
 *  items to the list, and setting and getting item type specific properties.
williamr@2
    55
 *  Other methods for list usage can be found from its parent class.
williamr@2
    56
 *
williamr@2
    57
 *  @see CAknTreeList
williamr@2
    58
 *
williamr@2
    59
 *  Here is an example of how an instance of window-owning single style
williamr@2
    60
 *  hierarchical column list can be constructed:
williamr@2
    61
 *
williamr@2
    62
 *  @code
williamr@2
    63
 *  // Construct the list, set its size, and make it visible.
williamr@2
    64
 *  CAknSingleColumnStyleTreeList* list
williamr@2
    65
 *      = CAknSingleColumnStyleTreeList::NewL();
williamr@2
    66
 *  list->SetRect( rect );
williamr@2
    67
 *  list->MakeVisible( ETrue );
williamr@2
    68
 *  @endcode
williamr@2
    69
 *
williamr@2
    70
 *  Adding items to the constructed list:
williamr@2
    71
 *
williamr@2
    72
 *  @code  
williamr@2
    73
 *  TUint32 flags = CAknSingleColumnStyleTreeList::EPersistent;
williamr@2
    74
 *  TBool drawNow = EFalse;
williamr@2
    75
 *
williamr@2
    76
 *  // Add simple data row to the top-most level of the tree.
williamr@2
    77
 *  _LIT( KSimpleDataRowText, "Simple data row" );
williamr@2
    78
 *  TAknTreeItemID simpleItem = list->AddSimpleDataRowL( KAknTreeIIDRoot,
williamr@2
    79
 *      KSimpleDataRowText, flags, drawNow );
williamr@2
    80
 *
williamr@2
    81
 *  // Add subtitle row to the to the top-most level of the tree.
williamr@2
    82
 *  _LIT( KSubtitleRowText, "Subtitle row" );
williamr@2
    83
 *  TAknTreeItemID subtitle = list->AddSubtitleRowL( KAknTreeIIDRoot,
williamr@2
    84
 *      KSubtitleRowText, flags, drawNow );
williamr@2
    85
 *
williamr@2
    86
 *  // Add core data row to the previously added subtitle row.
williamr@2
    87
 *  _LIT( KCoreDataRowText, "Core data row" );
williamr@2
    88
 *  TAknTreeItemID coreItem = list->AddCoreDataRowL( subtitle,
williamr@2
    89
 *      KCoreDataRowText, KNulDesC, flags, drawNow );
williamr@2
    90
 *  @endcode
williamr@2
    91
 *
williamr@2
    92
 *  @lib aknhlist.lib
williamr@2
    93
 *  @since S60 v5.0
williamr@2
    94
 */
williamr@2
    95
NONSHARABLE_CLASS( CAknSingleColumnStyleTreeList ) : public CAknTreeList
williamr@2
    96
    {
williamr@2
    97
williamr@2
    98
public:
williamr@2
    99
williamr@2
   100
    /** Item types used in single style hierarchical column list. The type
williamr@2
   101
        of each item can be get with @c ItemType() method. */
williamr@2
   102
    enum TItemType
williamr@2
   103
        {
williamr@2
   104
        /** No item type. Associated with constant @c KAknTreeIIDNone. */
williamr@2
   105
        ENone           = 0,
williamr@2
   106
        /** Tree root. Associated with constant @c KAknTreeIIDRoot. */
williamr@2
   107
        ETreeRoot       = 1,
williamr@2
   108
        /** Simple data row. */
williamr@2
   109
        ESimpleDataRow  = 2,
williamr@2
   110
        /** Core data row. */
williamr@2
   111
        ECoreDataRow    = 3,
williamr@2
   112
        /** Subtitle row. */
williamr@2
   113
        ESubtitleRow    = 4
williamr@2
   114
        };
williamr@2
   115
williamr@2
   116
    /** Flags usable with single column style tree items. These flags can
williamr@2
   117
        be given, when adding new items to the list. */
williamr@2
   118
    enum TItemFlags
williamr@2
   119
        {
williamr@2
   120
        /** Item is persistent. */
williamr@2
   121
        EPersistent = 0x01,
williamr@2
   122
        /** Item is marked. */
williamr@2
   123
        EMarked     = 0x02,
williamr@2
   124
        /** Item is expanded. Applicable to subtitle rows only. */
williamr@2
   125
        EExpanded   = 0x04,
williamr@2
   126
        /** Item appears non-empty. Applicable to subtitle rows only. */
williamr@2
   127
        ENonEmpty   = 0x08,
williamr@2
   128
        /** Emphasis. Applicable to core data rows only. */
williamr@2
   129
        EEmphasis   = 0x10,
williamr@2
   130
        /** Item is not markable. */
williamr@2
   131
        EMarkingDisabled = 0x20
williamr@2
   132
        };
williamr@2
   133
williamr@2
   134
    /** Icon types usable with single column style hierarchical list.
williamr@2
   135
        Highlighted icons are used when item is focused, and normal icons are
williamr@2
   136
        used when item is not focused, or corresponding highlighted icon is
williamr@2
   137
        not specified for the item. */
williamr@2
   138
    enum TIconType
williamr@2
   139
        {
williamr@2
   140
        /** Leaf icon. 
williamr@2
   141
            Only usable with core data rows and simple data rows. */
williamr@2
   142
        ELeaf                       = 0,
williamr@2
   143
        /** Highlighted leaf icon.
williamr@2
   144
            Only usable with core data rows and simple data rows. */
williamr@2
   145
        EHighlightedLeaf            = 1,
williamr@2
   146
        /** Expanded node icon. Only usable with subtitle rows. */
williamr@2
   147
        EExpandedNode               = 2,
williamr@2
   148
        /** Highlighted expanded node icon. Only usable with subtitle rows. */
williamr@2
   149
        EHighlightedExpandedNode    = 3,
williamr@2
   150
        /** Collapsed node icon. Only usable with subtitle rows. */
williamr@2
   151
        ECollapsedNode              = 4,
williamr@2
   152
        /** Highlighted collapsed node icon. Only usable with subtitle rows. */
williamr@2
   153
        EHighlightedCollapsedNode   = 5,
williamr@2
   154
        /** First optional icon. */
williamr@2
   155
        EOptionalIcon1              = 6,
williamr@2
   156
        /** First highlighted optional icon. */
williamr@2
   157
        EHighlightedOptionalIcon1   = 7,
williamr@2
   158
        /** Second optional icon. Only usable with core data rows. */
williamr@2
   159
        EOptionalIcon2              = 8,
williamr@2
   160
        /** Second highlighted optional icon.
williamr@2
   161
            Only usable with core data rows. */
williamr@2
   162
        EHighlightedOptionalIcon2   = 9
williamr@2
   163
        };
williamr@2
   164
williamr@2
   165
    /**
williamr@2
   166
     * Two phased constructor. Creates a new single style hierarchical column
williamr@2
   167
     * list instance as window-owning control.
williamr@2
   168
     *
williamr@2
   169
     * @return Newly constructed object.
williamr@2
   170
     *
williamr@2
   171
     * @leave KErrNoMemory Not enough memory.
williamr@2
   172
     */
williamr@2
   173
    IMPORT_C static CAknSingleColumnStyleTreeList* NewL();
williamr@2
   174
williamr@2
   175
    /**
williamr@2
   176
     * Two phased constructor. Creates a new single style hierarchical column
williamr@2
   177
     * list instance as non-window-owning component control to the compound
williamr@2
   178
     * control given as parameter.
williamr@2
   179
     *
williamr@2
   180
     * @param aContainer The compound control used as container for the list.
williamr@2
   181
     *
williamr@2
   182
     * @return Newly constructed object.
williamr@2
   183
     *
williamr@2
   184
     * @leave KErrNoMemory Not enough memory.
williamr@2
   185
     */
williamr@2
   186
    IMPORT_C static CAknSingleColumnStyleTreeList* NewL(
williamr@2
   187
        const CCoeControl& aContainer );
williamr@2
   188
williamr@2
   189
    /**
williamr@2
   190
     * Otherwise identical to @c NewL(), but leaves the newly created object
williamr@2
   191
     * in the cleanup stack.
williamr@2
   192
     *
williamr@2
   193
     * @copydoc CAknSingleColumnStyleTreeList::NewL()
williamr@2
   194
     *
williamr@2
   195
     * @post Newly constructed object is left in cleanup stack.
williamr@2
   196
     */
williamr@2
   197
    IMPORT_C static CAknSingleColumnStyleTreeList* NewLC();
williamr@2
   198
williamr@2
   199
    /**
williamr@2
   200
     * Otherwise identical to @c NewL( const CCoeControl& ), but leaves the
williamr@2
   201
     * newly created object in the cleanup stack.
williamr@2
   202
     *
williamr@2
   203
     * @copydoc CAknSingleColumnStyleTreeList::NewL( const CCoeControl& )
williamr@2
   204
     *
williamr@2
   205
     * @post Newly constructed object is left in cleanup stack.
williamr@2
   206
     */
williamr@2
   207
    IMPORT_C static CAknSingleColumnStyleTreeList* NewLC(
williamr@2
   208
        const CCoeControl& aContainer );
williamr@2
   209
williamr@2
   210
    /**
williamr@2
   211
     * Destructor.
williamr@2
   212
     */
williamr@2
   213
    virtual ~CAknSingleColumnStyleTreeList();
williamr@2
   214
williamr@2
   215
    /**
williamr@2
   216
     * Adds new simple data row to single style hierarchical column list. New
williamr@2
   217
     * simple data row with the specified content is constructed and added to
williamr@2
   218
     * the specified parent node. Constant @c KAknTreeIIDRoot can be used as
williamr@2
   219
     * parent node, if the new item is to be added to the top-most level of
williamr@2
   220
     * the hierarchy.
williamr@2
   221
     *
williamr@2
   222
     * @param aParent The item ID of the parent node.
williamr@2
   223
     *
williamr@2
   224
     * @param aText Text for simple data row.
williamr@2
   225
     *
williamr@2
   226
     * @param aFlags Flags for simple data row. Possible flags are defined
williamr@2
   227
     *      in @c CAknSingleColumnStyleTreeList::TItemFlags enumeration.
williamr@2
   228
     *
williamr@2
   229
     * @param aDrawNow @c ETrue, if the list is to be redrawn after the item
williamr@2
   230
     *      has been added to the list, otherwise @c EFalse.
williamr@2
   231
     *
williamr@2
   232
     * @return The Item ID for the added node.
williamr@2
   233
     *
williamr@2
   234
     * @leave KErrNoMemory Not enough memory.
williamr@2
   235
     *
williamr@2
   236
     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
williamr@2
   237
     *
williamr@2
   238
     * @panic EAknHListPanicInvalidItemType Specified parent item is not a node.
williamr@2
   239
     */
williamr@2
   240
    IMPORT_C TAknTreeItemID AddSimpleDataRowL( TAknTreeItemID aParent,
williamr@2
   241
        const TDesC& aText, TUint32 aFlags, TBool aDrawNow );
williamr@2
   242
williamr@2
   243
    /**
williamr@2
   244
     * Adds new core data row to single style hierarchical column list. New
williamr@2
   245
     * core data row containing specified two text columns is constructed and
williamr@2
   246
     * added to the specified parent node. Constant @c KAknTreeIIDRoot can be
williamr@2
   247
     * used as parent node, if the new item is to be added to the top-most
williamr@2
   248
     * level of the hierarchy. By default, the core data row created with this
williamr@2
   249
     * method has its third text column disabled, but it can later be enabled
williamr@2
   250
     * with @c EnableThirdColumn() method.
williamr@2
   251
     *
williamr@2
   252
     * @param aParent The item ID of the parent node.
williamr@2
   253
     *
williamr@2
   254
     * @param aFirstColumn Text for first column of core data row.
williamr@2
   255
     *
williamr@2
   256
     * @param aSecondColumn Text for second column of core data row.
williamr@2
   257
     *
williamr@2
   258
     * @param aFlags Flags for core data row. Possible flags are defined
williamr@2
   259
     *      in @c CAknSingleColumnStyleTreeList::TItemFlags enumeration.
williamr@2
   260
     *
williamr@2
   261
     * @param aDrawNow @c ETrue, if the list is to be redrawn after the item
williamr@2
   262
     *      has been added to the list, otherwise @c EFalse.
williamr@2
   263
     *
williamr@2
   264
     * @return The Item ID for the added node.
williamr@2
   265
     *
williamr@2
   266
     * @leave KErrNoMemory Not enough memory.
williamr@2
   267
     *
williamr@2
   268
     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
williamr@2
   269
     *
williamr@2
   270
     * @panic EAknHListPanicInvalidItemType Specified parent item is not a node.
williamr@2
   271
     */
williamr@2
   272
    IMPORT_C TAknTreeItemID AddCoreDataRowL( TAknTreeItemID aParent,
williamr@2
   273
        const TDesC& aFirstColumn, const TDesC& aSecondColumn, TUint32 aFlags,
williamr@2
   274
        TBool aDrawNow );
williamr@2
   275
williamr@2
   276
    /**
williamr@2
   277
     * Adds new core data row to single style hierarchical column list. New
williamr@2
   278
     * core data row containing the specified three text columns is constructed
williamr@2
   279
     * and added to the specified parent node. Constant @c KAknTreeIIDRoot can
williamr@2
   280
     * be used as parent node, if the new item is to be added to the top-most
williamr@2
   281
     * level of the hierarchy. By default, the core data row created with this
williamr@2
   282
     * method has its third text column enabled, but it can later be disabled
williamr@2
   283
     * with @c EnableThirdColumn() method.
williamr@2
   284
     *
williamr@2
   285
     * @param aParent The item ID of the parent node.
williamr@2
   286
     *
williamr@2
   287
     * @param aFirstColumn Text for first column of core data row.
williamr@2
   288
     *
williamr@2
   289
     * @param aSecondColumn Text for second column of core data row.
williamr@2
   290
     *
williamr@2
   291
     * @param aThirdColumn Text for third column of core data row. The third
williamr@2
   292
     *      column is visible only in landscape mode.
williamr@2
   293
     *
williamr@2
   294
     * @param aFlags Flags for core data row. Possible flags are defined
williamr@2
   295
     *      in @c CAknSingleColumnStyleTreeList::TItemFlags enumeration.
williamr@2
   296
     *
williamr@2
   297
     * @param aDrawNow @c ETrue, if the list is to be redrawn after the item
williamr@2
   298
     *      has been added to the list, otherwise @c EFalse.
williamr@2
   299
     *
williamr@2
   300
     * @leave KErrNoMemory Not enough memory.
williamr@2
   301
     *
williamr@2
   302
     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
williamr@2
   303
     *
williamr@2
   304
     * @panic EAknHListPanicInvalidItemType Specified parent item is not a node.
williamr@2
   305
     */
williamr@2
   306
    IMPORT_C TAknTreeItemID AddCoreDataRowL( TAknTreeItemID aParent,
williamr@2
   307
        const TDesC& aFirstColumnd, const TDesC& aSecondColumn,
williamr@2
   308
        const TDesC& aThirdColumn, TUint32 aFlags, TBool aDrawNow );
williamr@2
   309
williamr@2
   310
    /**
williamr@2
   311
     * Adds new subtitle row to single style hierarchical column list. New row
williamr@2
   312
     * with the given content is constructed and added to the specified parent
williamr@2
   313
     * node. Constant @c KAknTreeIIDRoot can be used as parent node, if the new
williamr@2
   314
     * item is to be added to the top-most level of hierarchy.
williamr@2
   315
     *
williamr@2
   316
     * @param aParent The item ID of the parent node.
williamr@2
   317
     *
williamr@2
   318
     * @param aText Text for subtitle row.
williamr@2
   319
     *
williamr@2
   320
     * @param aFlags Flags for subtitle row. Possible flags are defined
williamr@2
   321
     *      in @c CAknSingleColumnStyleTreeList::TItemFlags enumeration.
williamr@2
   322
     *
williamr@2
   323
     * @param aDrawNow @c ETrue, if the list is to be redrawn after the item
williamr@2
   324
     *      has been added to the list, otherwise @c EFalse.
williamr@2
   325
     *
williamr@2
   326
     * @leave KErrNoMemory Not enough memory.
williamr@2
   327
     *
williamr@2
   328
     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
williamr@2
   329
     *
williamr@2
   330
     * @panic EAknHListPanicInvalidItemType Specified parent item is not a node.
williamr@2
   331
     */
williamr@2
   332
    IMPORT_C TAknTreeItemID AddSubtitleRowL( TAknTreeItemID aParent,
williamr@2
   333
        const TDesC& aText, TUint32 aFlags, TBool aDrawNow );
williamr@2
   334
williamr@2
   335
    /**
williamr@2
   336
     * Returns the text field of the specified list item.
williamr@2
   337
     *
williamr@2
   338
     * @param aItem Item ID.
williamr@2
   339
     *
williamr@2
   340
     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
williamr@2
   341
     */
williamr@2
   342
    IMPORT_C const TDesC& Text( TAknTreeItemID aItem ) const;
williamr@2
   343
williamr@2
   344
    /**
williamr@2
   345
     * Returns the specified text column of specified list item. If the text
williamr@2
   346
     * for specified column is not set, or the specified column does not
williamr@2
   347
     * exist, empty descriptor is returned.
williamr@2
   348
     * 
williamr@2
   349
     * @param aItem Item ID.
williamr@2
   350
     *
williamr@2
   351
     * @param aColumnIndex Column index.
williamr@2
   352
     *
williamr@2
   353
     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
williamr@2
   354
     */
williamr@2
   355
    IMPORT_C const TDesC& Text( TAknTreeItemID aItem, TInt aColumnIndex ) const;
williamr@2
   356
williamr@2
   357
    /**
williamr@2
   358
     * Sets the text for specified hierarchical column list item.
williamr@2
   359
     *
williamr@2
   360
     * @param aItem Item ID.
williamr@2
   361
     *
williamr@2
   362
     * @param aText Text for specified list item.
williamr@2
   363
     *
williamr@2
   364
     * @param aDrawNow @c ETrue, if the list is to be redrawn after the text
williamr@2
   365
     *      has been set, otherwise @c EFalse.
williamr@2
   366
     *
williamr@2
   367
     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
williamr@2
   368
     */
williamr@2
   369
    IMPORT_C void SetTextL( TAknTreeItemID aItem, const TDesC& aText,
williamr@2
   370
        TBool aDrawNow );
williamr@2
   371
williamr@2
   372
    /**
williamr@2
   373
     * Sets the text for specified column of specified hierarchical column
williamr@2
   374
     * list item. Non-zero value for column list can only be used with core
williamr@2
   375
     * data row, as the other row types contain only one text column.
williamr@2
   376
     *
williamr@2
   377
     * @param aItem Item ID.
williamr@2
   378
     *
williamr@2
   379
     * @param aText Text for specified list item.
williamr@2
   380
     *
williamr@2
   381
     * @param aColumnIndex Index specifying the text column.
williamr@2
   382
     *
williamr@2
   383
     * @param aDrawNow @c ETrue, if the list is to be redrawn after the text
williamr@2
   384
     *      has been set, otherwise @c EFalse.
williamr@2
   385
     *
williamr@2
   386
     * @leave KErrNotFound Specified column does not exist.
williamr@2
   387
     *
williamr@2
   388
     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
williamr@2
   389
     *
williamr@2
   390
     * @panic EAknHListPanicInvalidItemType Invalid item type.
williamr@2
   391
     */
williamr@2
   392
    IMPORT_C void SetTextL( TAknTreeItemID aItem, const TDesC& aText,
williamr@2
   393
        TInt aColumnIndex, TBool aDrawNow );
williamr@2
   394
williamr@2
   395
    /**
williamr@2
   396
     * Checks whether the specified core data row is emphasised. When core
williamr@2
   397
     * data row is emphasized, it uses different text layout for emphasising
williamr@2
   398
     * the row.
williamr@2
   399
     *
williamr@2
   400
     * @param aItem Item ID for core data row.
williamr@2
   401
     *
williamr@2
   402
     * @return @c ETrue if item is emphasised, otherwise @c EFalse.
williamr@2
   403
     *
williamr@2
   404
     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
williamr@2
   405
     */
williamr@2
   406
    IMPORT_C TBool IsEmphasised( TAknTreeItemID aItem ) const;
williamr@2
   407
williamr@2
   408
    /** 
williamr@2
   409
     * Sets the emphasis for specified core data row. 
williamr@2
   410
     *
williamr@2
   411
     * @param aItem Item ID of core data row.
williamr@2
   412
     *
williamr@2
   413
     * @param aEmphasis @c ETrue to set emphasis on, @c EFalse to set it off.
williamr@2
   414
     *
williamr@2
   415
     * @param aDrawNow @c ETrue to redraw the list, otherwise @c EFalse.
williamr@2
   416
     *
williamr@2
   417
     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
williamr@2
   418
     *
williamr@2
   419
     * @panic EAknHListPanicInvalidItemType Invalid item type.
williamr@2
   420
     */
williamr@2
   421
    IMPORT_C void SetEmphasis( TAknTreeItemID aItem, TBool aEmphasis,
williamr@2
   422
        TBool aDrawNow );
williamr@2
   423
williamr@2
   424
    /**
williamr@2
   425
     * Checks whether the third text column is enabled for specified core
williamr@2
   426
     * data row. If third text column is enabled, it is shown for the item
williamr@2
   427
     * in landscape mode, when list has enough space for the third column.
williamr@2
   428
     *
williamr@2
   429
     * @param aItem Item ID of core data row.
williamr@2
   430
     *
williamr@2
   431
     * @return @c ETrue if third column is enabled, otherwise @c EFalse.
williamr@2
   432
     *
williamr@2
   433
     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
williamr@2
   434
     */
williamr@2
   435
    IMPORT_C TBool IsThirdColumnEnabled( TAknTreeItemID aItem ) const;
williamr@2
   436
williamr@2
   437
    /**
williamr@2
   438
     * Enables or disables third text column usage in landscape mode for
williamr@2
   439
     * specified core data row. 
williamr@2
   440
     *
williamr@2
   441
     * @param aItem Item ID or core data row.
williamr@2
   442
     *
williamr@2
   443
     * @param aEnable @c ETrue to enable third text column usage, @c EFalse
williamr@2
   444
     *      to disable it.
williamr@2
   445
     *
williamr@2
   446
     * @param aDrawNow @c ETrue to redraw the list, otherwise @c EFalse.
williamr@2
   447
     *
williamr@2
   448
     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
williamr@2
   449
     *
williamr@2
   450
     * @panic EAknHListPanicInvalidItemType Invalid item type.
williamr@2
   451
     */
williamr@2
   452
    IMPORT_C void EnableThirdColumn( TAknTreeItemID aItem, TBool aEnable,
williamr@2
   453
        TBool aDrawNow );
williamr@2
   454
williamr@2
   455
    /**
williamr@2
   456
     * Returns the icon ID set for the specified icon of a list item.
williamr@2
   457
     *
williamr@2
   458
     * @param aItem Item ID of a list item.
williamr@2
   459
     *
williamr@2
   460
     * @param aType Type defining the specific icon within list item.
williamr@2
   461
     *
williamr@2
   462
     * @return Icon ID. The value @c AknTreeListIconID::KDefault is returned,
williamr@2
   463
     *      if no icon has been set. Value @c KErrNotFound is returned, if the
williamr@2
   464
     *      item does not contain icon of specified type.
williamr@2
   465
     *
williamr@2
   466
     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
williamr@2
   467
     */
williamr@2
   468
    IMPORT_C TInt Icon( TAknTreeItemID aItem, TIconType aType ) const;
williamr@2
   469
williamr@2
   470
    /**
williamr@2
   471
     * Sets an icon for a list item. Every list item may have several icons,
williamr@2
   472
     * so the correct icon has to be specified with the icon type. Note that
williamr@2
   473
     * the type has to be applicable to the specified list item. Pre-defined
williamr@2
   474
     * icon IDs can be found within @c AknTreeListIconID namespace. Constant
williamr@2
   475
     * @c AknTreeListIconID::KDefault can be used to indicate that default
williamr@2
   476
     * icon is to be used, and constant @c AknTreeListIconID::KNone to
williamr@2
   477
     * indicate that no icon is to be used.
williamr@2
   478
     *
williamr@2
   479
     * @param aItem Item ID of the modified list item.
williamr@2
   480
     *
williamr@2
   481
     * @param aType The type of the icon to be added.
williamr@2
   482
     *
williamr@2
   483
     * @param aIconId Icon ID. Icon ID is one of the pre-defined icon IDs, or
williamr@2
   484
     *      an integer value returned by @c AddIconL() or @c AddColorIconL()
williamr@2
   485
     *      methods when new icon was added to the list.
williamr@2
   486
     *
williamr@2
   487
     * @param aDrawNow @c ETrue to redraw the list after the icon has been
williamr@2
   488
     *      changed, otherwise @c EFalse.
williamr@2
   489
     *
williamr@2
   490
     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
williamr@2
   491
     *
williamr@2
   492
     * @panic EAknHListPanicInvalidItemType Specified icon is not applicable
williamr@2
   493
     *      with the item type.
williamr@2
   494
     */
williamr@2
   495
    IMPORT_C void SetIcon( TAknTreeItemID aItem, TIconType aType,
williamr@2
   496
        TInt aIconId, TBool aDrawNow );
williamr@2
   497
williamr@2
   498
    /**
williamr@2
   499
     * Checks the type of the specified list item.
williamr@2
   500
     *
williamr@2
   501
     * @param aItem Item ID specifying the list item.
williamr@2
   502
     *
williamr@2
   503
     * @return Type of the item.
williamr@2
   504
     *
williamr@2
   505
     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
williamr@2
   506
     */
williamr@2
   507
    IMPORT_C TItemType ItemType( TAknTreeItemID aItem ) const;
williamr@2
   508
williamr@2
   509
// from base class CAknTreeList
williamr@2
   510
williamr@2
   511
    /**
williamr@2
   512
     * From CAknTreeList.
williamr@2
   513
     * Sets the flags for the single style hierarchical column list.
williamr@2
   514
     *
williamr@2
   515
     * @param aFlags Flags.
williamr@2
   516
     */
williamr@2
   517
    void SetFlags( TUint32 aFlags );
williamr@2
   518
williamr@2
   519
    /**
williamr@2
   520
     * From CAknTreeList.
williamr@2
   521
     * Handles resource changes.
williamr@2
   522
     *
williamr@2
   523
     * @param aType
williamr@2
   524
     */
williamr@2
   525
    void HandleResourceChange( TInt aType );
williamr@2
   526
williamr@2
   527
private:
williamr@2
   528
williamr@2
   529
    /**
williamr@2
   530
     * Default constructor.
williamr@2
   531
     */
williamr@2
   532
    CAknSingleColumnStyleTreeList();
williamr@2
   533
williamr@2
   534
    /**
williamr@2
   535
     * Second phase constructor.
williamr@2
   536
     */
williamr@2
   537
    void ConstructL();
williamr@2
   538
williamr@2
   539
    /**
williamr@2
   540
     * Second phase constructor.
williamr@2
   541
     *
williamr@2
   542
     * @param aContainer Container for the list.
williamr@2
   543
     */
williamr@2
   544
    void ConstructL( const CCoeControl& aContainer );
williamr@2
   545
williamr@2
   546
    /**
williamr@2
   547
     * Updates indention.
williamr@2
   548
     */
williamr@2
   549
    void UpdateIndention();
williamr@2
   550
williamr@2
   551
private: // data
williamr@2
   552
williamr@2
   553
    };
williamr@2
   554
williamr@2
   555
williamr@2
   556
#endif // C_AKNSINGLECOLUMNSTYLETREELIST_H