epoc32/include/mw/akntreelist.h
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
     1.1 --- a/epoc32/include/mw/akntreelist.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/mw/akntreelist.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,1137 @@
     1.4 -akntreelist.h
     1.5 +/*
     1.6 +* Copyright (c) 2006, 2007 Nokia Corporation and/or its subsidiary(-ies).
     1.7 +* All rights reserved.
     1.8 +* This component and the accompanying materials are made available
     1.9 +* 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
    1.10 +* which accompanies this distribution, and is available
    1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.12 +*
    1.13 +* Initial Contributors:
    1.14 +* Nokia Corporation - initial contribution.
    1.15 +*
    1.16 +* Contributors:
    1.17 +*
    1.18 +* Description:  Abstract base class for hierarchical lists.
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +#ifndef C_AKNTREELIST_H
    1.24 +#define C_AKNTREELIST_H
    1.25 +
    1.26 +
    1.27 +#include <akncontrol.h>
    1.28 +#include <w32std.h>
    1.29 +#include <akntreelistobserver.h>
    1.30 +#include <akniconutils.h> // TScaleMode
    1.31 +
    1.32 +class CAknTree;
    1.33 +class CAknTreeListView;
    1.34 +class MAknCustomTreeOrdering;
    1.35 +class TAknsItemID;
    1.36 +
    1.37 +/** Flag to indicate that hierarchical list is looping. */
    1.38 +const TUint32 KAknTreeListLooping = 0x0001;
    1.39 +
    1.40 +/** Flag to indicate that hierarchical list structure lines are not visible. */
    1.41 +const TUint32 KAknTreeListNoStructureLines = 0x0002;
    1.42 +
    1.43 +/** Flag to set marquee scrolling on. */
    1.44 +const TUint32 KAknTreeListMarqueeScrolling = 0x0004;
    1.45 +
    1.46 +/** Flag to disable indention of hierarchical list items. Setting this flag
    1.47 +    also forces the tree structure lines invisible. */
    1.48 +const TUint32 KAknTreeListNoIndention = 0x0008;
    1.49 +
    1.50 +/** Flag to set hierarchical list markable. The list items can always be
    1.51 +    marked by list client with API methods, but when list is set markable,
    1.52 +    it responds to specified pointer and key event by marking/unmarking
    1.53 +    items as required. */
    1.54 +const TUint32 KAknTreeListMarkable = 0x0010;
    1.55 +
    1.56 +
    1.57 +/**
    1.58 + *  Abstract base class for hierarchical lists.
    1.59 + *
    1.60 + *  This class functions as a base class for hierarchical lists. It contains
    1.61 + *  the APIs common to all hierarchical lists. The internal structure of the
    1.62 + *  list is not exposed directly to the list clients, instead the structure
    1.63 + *  can be accessed through the APIs in this class. The items in the list are
    1.64 + *  referred with item IDs, which are returned to the client when the items
    1.65 + *  are added to the list.
    1.66 + *
    1.67 + *  List items are divided into leaves and nodes, the difference being that
    1.68 + *  nodes have expand and collapse functionality and can contain other tree
    1.69 + *  items as child items, whereas leaves cannot contain other list items.
    1.70 + *  Methods @c IsLeaf() and @c IsNode() can be used for checking if items
    1.71 + *  belong into these groups.
    1.72 + *
    1.73 + *  The expand and collapse events, among other list events, are send to list
    1.74 + *  observers through @c MAknTreeListObserver interface. This enables that
    1.75 + *  the whole list does not have to be populated at once, as the content of
    1.76 + *  each node can be added when the node is expanded. To avoid unnecessary
    1.77 + *  memory consumption, the content of each node is removed from the list
    1.78 + *  when the node is collapsed. However, list items can be set persistent,
    1.79 + *  in which case they are not removed from nodes on collapse events.
    1.80 + *
    1.81 + *  As the hierarchical list items are list specialisation specific, the
    1.82 + *  specialisations of this class have to provide APIs for constructing and
    1.83 + *  adding new items to the list, and getting and setting specialisation
    1.84 + *  specific properties of the list items.
    1.85 + *
    1.86 + *  All the methods that might affect the appearance of the list view have an
    1.87 + *  additional @c aDrawNow parameter, which can be used to indicate whether
    1.88 + *  the list view should be redrawn to correspond to the modified list
    1.89 + *  structure. This allows consecutive calls to be made without the list view
    1.90 + *  being updated between every call by setting the @c aDrawNow parameter to
    1.91 + *  @c EFalse in all of the calls but the last. The normal draw methods 
    1.92 + *  inherited from @c CCoeControl can also be used to draw the updated view.
    1.93 + *
    1.94 + *  @see MAknTreeListObserver
    1.95 + *
    1.96 + *  @lib aknhlist.lib
    1.97 + *  @since S60 v3.2
    1.98 + */
    1.99 +NONSHARABLE_CLASS( CAknTreeList ) : public CAknControl
   1.100 +    {
   1.101 +
   1.102 +public:
   1.103 +
   1.104 +
   1.105 +	// for focus handling after Sort
   1.106 +   enum TFocusBehaviour
   1.107 +            {
   1.108 +            ESaveFocus,
   1.109 +            EMoveFocusToFirstItem
   1.110 +            };
   1.111 +
   1.112 +    /**
   1.113 +     * Destructor.
   1.114 +     */
   1.115 +    virtual ~CAknTreeList();
   1.116 +
   1.117 +    /**
   1.118 +     * Sets the flags for the hierarchical list.
   1.119 +     *
   1.120 +     * Flags @c KAknTreeListLooping, @c KAknTreeListNoStructureLines,
   1.121 +     * @c KAknTreeListMarqueeScrolling, @c KAknTreeListNoIndention, and
   1.122 +     * @c KAknTreeListMarkable can be used to change the behaviour
   1.123 +     * of the list.
   1.124 +     *
   1.125 +     * Note: Specialisations may override this method in order to restrict the
   1.126 +     * use of some of the flags in specialised list or to handle specialisation
   1.127 +     * specific flags.
   1.128 +     *
   1.129 +     * @param aFlags Flags.
   1.130 +     */
   1.131 +    IMPORT_C virtual void SetFlags( TUint32 aFlags );
   1.132 +
   1.133 +    /**
   1.134 +     * Returns the flags set for the list.
   1.135 +     *
   1.136 +     * @return Flags.
   1.137 +     */
   1.138 +    IMPORT_C TUint32 Flags() const;
   1.139 +
   1.140 +    /**
   1.141 +     * Moves an existing list item to specified target node. The moved item
   1.142 +     * and the target node have to be specified with the item IDs returned
   1.143 +     * when the items were added to the hierarchical list. The target node
   1.144 +     * cannot be a descendant of the moved node. Otherwise, the moving would
   1.145 +     * break the hierarchical structure. Constant @c KAknTreeIIDRoot can be
   1.146 +     * used as an ID for the target node when the item is to be moved to the
   1.147 +     * top-most level of the list.
   1.148 +     *
   1.149 +     * @param aItem Item ID of the item to be moved.
   1.150 +     *
   1.151 +     * @param aTargetNode ID of the node, where the item is to be moved.
   1.152 +     *
   1.153 +     * @param aDrawNow @c ETrue to redraw the list after the item has been
   1.154 +     *      moved, otherwise @c EFalse.
   1.155 +     *
   1.156 +     * @leave KErrArgument The specified item is the same as the target node
   1.157 +     *      or one of the ancestors of target node. 
   1.158 +     *
   1.159 +     * @leave KErrNoMemory Not enough memory is available for adding the
   1.160 +     *      specified item to the target node.
   1.161 +     *
   1.162 +     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
   1.163 +     *
   1.164 +     * @panic EAknHListPanicInvalidItemType Specified target item is not a node.
   1.165 +     *
   1.166 +     * @pre The moved item and the target node exist in the list, and the
   1.167 +     *      target node is not a descendant of the moved item.
   1.168 +     *
   1.169 +     * @post The item is moved to the specified target node and into a such
   1.170 +     *      position that the children of the target node remain in sorted
   1.171 +     *      order. The updated list is redrawn, if it is requested with the
   1.172 +     *      aDrawNow parameter.
   1.173 +     */
   1.174 +    IMPORT_C void MoveItemL( TAknTreeItemID aItem, TAknTreeItemID aTargetNode,
   1.175 +        TBool aDrawNow );
   1.176 +
   1.177 +    /**
   1.178 +     * Removes an item from the hierarchical list. The item to be removed has
   1.179 +     * to be specified with the ID value returned when the item was added to
   1.180 +     * the hierarchical list. If the removed item is a node containing other
   1.181 +     * list items, those items are removed from the list as well. Constant
   1.182 +     * @c KAknTreeIIDRoot can be used to remove every item from the list.
   1.183 +     *
   1.184 +     * @param aItem Item ID of the item to be removed.
   1.185 +     *
   1.186 +     * @param aDrawNow @c ETrue to redraw the list after the item has been
   1.187 +     *      removed, othewise @c EFalse.
   1.188 +     *
   1.189 +     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
   1.190 +     *
   1.191 +     * @pre The specified item exists in the hierarchical list.
   1.192 +     *
   1.193 +     * @post The specified item and all of its descendants are removed from
   1.194 +     *      the list. The updated list is drawn, when it is requested with
   1.195 +     *      the aDrawNow parameter.
   1.196 +     */
   1.197 +    IMPORT_C void RemoveItem( TAknTreeItemID aItem, TBool aDrawNow );
   1.198 +
   1.199 +    /**
   1.200 +     * Expands a node in hierarchical list. When a node in the hierarchical
   1.201 +     * list is expanded, either with this method, or with pointer or key
   1.202 +     * event, the observer of the list is notified with respective event.
   1.203 +     * The client of the list can then update the content of the expanded
   1.204 +     * node. Constant @c KAknTreeIIDRoot can be used to expand every node
   1.205 +     * in the tree structure.
   1.206 +     *
   1.207 +     * @param aNode Item ID of the node to be expanded.
   1.208 +     * 
   1.209 +     * @param aDrawNow @c ETrue to redraw the list after the node has been
   1.210 +     *      expanded, otherwise @c EFalse.
   1.211 +     *
   1.212 +     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
   1.213 +     *
   1.214 +     * @panic EAknHListPanicInvalidItemType Specified item is not a node.
   1.215 +     *
   1.216 +     * @pre The specified item exists in the hierarchical list and it is a
   1.217 +     *      node.
   1.218 +     *
   1.219 +     * @post The specified node is expanded. The updated list is drawn, when
   1.220 +     *      it is requested with the aDrawNow parameter.
   1.221 +     */
   1.222 +    IMPORT_C void ExpandNode( TAknTreeItemID aNode, TBool aDrawNow );
   1.223 +
   1.224 +    /**
   1.225 +     * Collapses a node in hierarchical list. When a node in the hierarchical
   1.226 +     * list is collapsed, either with this method, or with pointer or key
   1.227 +     * event, all its content that is not set persistent is removed from the
   1.228 +     * list to reduce memory consumption. The observer of the hierarchical
   1.229 +     * list is nofied with the respective event. Constant @c KAknTreeIIDRoot
   1.230 +     * can be used to collapse every node in the tree structure.
   1.231 +     *
   1.232 +     * @param aNode Item ID of the node to be collapsed.
   1.233 +     *
   1.234 +     * @param aDrawNow @c ETrue to redraw the list after the node has been
   1.235 +     *      collapsed, otherwise @c EFalse.
   1.236 +     *
   1.237 +     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
   1.238 +     *
   1.239 +     * @panic EAknHListPanicInvalidItemType Specified item is not a node.
   1.240 +     *
   1.241 +     * @pre The specified item exists in the hierarchical list and it is a
   1.242 +     *      node.
   1.243 +     *
   1.244 +     * @post The specified item is collapsed and all of its children, which are
   1.245 +     *      not set persistent, are removed from the list.
   1.246 +     */
   1.247 +    IMPORT_C void CollapseNode( TAknTreeItemID aNode, TBool aDrawNow );
   1.248 +
   1.249 +    /**
   1.250 +     * Checks whether the specified node is expanded.
   1.251 +     *
   1.252 +     * @param aNode Item ID of a node.
   1.253 +     *
   1.254 +     * @return @c ETrue if the node is expanded.
   1.255 +     *
   1.256 +     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
   1.257 +     *
   1.258 +     * @panic EAknHListPanicInvalidItemType Specified item is not a node.
   1.259 +     */
   1.260 +    IMPORT_C TBool IsExpanded( TAknTreeItemID aNode ) const;
   1.261 +
   1.262 +    /**
   1.263 +     * Gets the item ID of the focused item.
   1.264 +     *
   1.265 +     * @return Item ID of the focused item. Value @c KAknTreeIIDNone is
   1.266 +     *      returned if no item is focused.
   1.267 +     */
   1.268 +    IMPORT_C TAknTreeItemID FocusedItem() const;
   1.269 +
   1.270 +    /**
   1.271 +     * Sets the focused item and its position on the list view. When the
   1.272 +     * focused item is changed, the vertical position of the view is changed
   1.273 +     * so that the position of the focused item on the view matches the given
   1.274 +     * index. The horizontal position of the view is changed so that the
   1.275 +     * the beginning of the focused item is visible.
   1.276 +     *
   1.277 +     * @param aItem Item ID of the item to be focused.
   1.278 +     *
   1.279 +     * @param aIndex The position of the focused item on the list view. If the
   1.280 +     *      index does not refer to any visible view location, that is, the
   1.281 +     *      index is less than zero or greater than or equal to the number of
   1.282 +     *      items in the view, the focused item is changed to specified item,
   1.283 +     *      but the position of the view is not changed.
   1.284 +     *
   1.285 +     * @param aDrawNow @c ETrue to redraw the list after the focused item
   1.286 +     *      has been changed, otherwise @c EFalse.
   1.287 +     *
   1.288 +     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
   1.289 +     */
   1.290 +    IMPORT_C void SetFocusedItem( TAknTreeItemID aItem, TInt aIndex,
   1.291 +        TBool aDrawNow );
   1.292 +
   1.293 +    /**
   1.294 +     * Highlight rectangle for the focused item. The returned rectangle is
   1.295 +     * screen relative and it can be used, for example, when positioning
   1.296 +     * pop-up for focused item. If the focused item is not visible, the
   1.297 +     * method returns an empty rectangle.
   1.298 +     *
   1.299 +     * @return Highlight rectangle of focused list item.
   1.300 +     */
   1.301 +    IMPORT_C TRect HighlightRect() const;
   1.302 +
   1.303 +    /**
   1.304 +     * Adds a new icon to the list to be used by all list items. The same
   1.305 +     * icon can be used by multiple tree items and its referenced by the
   1.306 +     * ID returned by this function. The given parameters are also stored
   1.307 +     * in the tree list, which enables the tree list to reconstruct the
   1.308 +     * bitmaps on skin change events. If this behaviour is insufficient for
   1.309 +     * the client, it can always replace the existing icons by itself with
   1.310 +     * @c AssignIconL or @c AssignColorIconL method.
   1.311 +     *
   1.312 +     * @param aId Item ID of the icon to be added.
   1.313 +     *
   1.314 +     * @param aFilename Filename to be used to construct the item, 
   1.315 +     *      if no matching item was found in the currently active skin.
   1.316 +     *
   1.317 +     * @param aBitmapId ID of the bitmap in the file. 
   1.318 +     *      Used only if no matching item was found in the currently 
   1.319 +     *      active skin.
   1.320 +     *
   1.321 +     * @param aMaskId ID of the mask in the file.
   1.322 +     *      Used only if no matching item was found in the currently
   1.323 +     *      active skin.
   1.324 +     * 
   1.325 +     * @param aScaleMode Scale mode used when icon's bitmap is resized.
   1.326 +     *
   1.327 +     * @return ID assigned for the added icon.
   1.328 +     *
   1.329 +     * @leave KErrNoMemory Not enough memory.
   1.330 +     */
   1.331 +    IMPORT_C TInt AddIconL( const TAknsItemID& aId, const TDesC& aFilename,
   1.332 +        TInt aBitmapId, TInt aMaskId, TScaleMode aScaleMode );
   1.333 +
   1.334 +    /**
   1.335 +     * Adds a new icon to the list. The ownership of given bitmaps is
   1.336 +     * transferred to the list only if specified with @c aTransferOwnership
   1.337 +     * parameter. Note that icons added to the list with this method cannot
   1.338 +     * be reconstructed on skin change events by the list. If necessary,
   1.339 +     * previously added icons can be replaced with @c AssignIconL method.
   1.340 +     *
   1.341 +     * @param aIcon Pointer to the bitmap.
   1.342 +     *
   1.343 +     * @param aMask Pointer to the mask bitmap.
   1.344 +     *
   1.345 +     * @param aTransferOwnership @c ETrue, if ownership of bitmaps is
   1.346 +     * transferred to the list. If the method leaves, it is always on the
   1.347 +     * responsibility of the client code to take care of deleting the bitmaps.
   1.348 +     *
   1.349 +     * @param aScaleMode The scale mode used when the icon is resized.
   1.350 +     *
   1.351 +     * @return ID assigned for the added icon.
   1.352 +     *
   1.353 +     * @leave KErrNoMemory Not enough memory.
   1.354 +     */
   1.355 +    IMPORT_C TInt AddIconL( CFbsBitmap* aIcon, CFbsBitmap* aMask,
   1.356 +        TBool aTransferOwnership, TScaleMode aScaleMode );
   1.357 +
   1.358 +    /**
   1.359 +     * Adds a new icon to the list to be used by all list items. The same
   1.360 +     * icon can be used by multiple tree items and it is referenced by the
   1.361 +     * icon ID returned by this function. The given parameters are stored
   1.362 +     * in the tree list, and they are used in reconstructing the bitmaps on
   1.363 +     * skin change events.
   1.364 +     *
   1.365 +     * @param aId Item ID of the icon to be added.
   1.366 +     *
   1.367 +     * @param aColorId Item ID of the color table.
   1.368 +     *
   1.369 +     * @param aColorIndex Index in the color table.
   1.370 +     *
   1.371 +     * @param aFilename Filename to be used to construct the item, 
   1.372 +     *      if no matching item was found in the currently active skin.
   1.373 +     *
   1.374 +     * @param aBitmapId ID of the bitmap in the file. 
   1.375 +     *      Used only if no matching item was found in the currently 
   1.376 +     *      active skin.
   1.377 +     *
   1.378 +     * @param aMaskId ID of the mask in the file.
   1.379 +     *      Used only if no matching item was found in the currently
   1.380 +     *      active skin.
   1.381 +     *
   1.382 +     * @param aDefaultColor Color RGB value to be used, if no color
   1.383 +     *      is found in the currently active skin.
   1.384 +     *
   1.385 +     * @param aScaleMode Scale mode used when icon's bitmap is resized.
   1.386 +     *
   1.387 +     * @return ID assigned for the added icon.
   1.388 +     *
   1.389 +     * @leave KErrNoMemory Not enough memory.
   1.390 +     */
   1.391 +    IMPORT_C TInt AddColorIconL( const TAknsItemID& aId,
   1.392 +        const TAknsItemID& aColorId, TInt aColorIndex, const TDesC& aFilename,
   1.393 +        TInt aBitmapId, TInt aMaskId, TRgb aDefaultColor,
   1.394 +        TScaleMode aScaleMode );
   1.395 +
   1.396 +    /**
   1.397 +     * Assigns an icon to the tree list with the specified ID. If an icon
   1.398 +     * with specified ID already exists in the list, the existing icon is
   1.399 +     * replaced with the new one. The given parameters are stored in the
   1.400 +     * tree list, and they are used in reconstructing the bitmaps on skin
   1.401 +     * change events.
   1.402 +     *
   1.403 +     * @param aIconId Icon ID assigned for the icon.
   1.404 +     *
   1.405 +     * @param aId Item ID of the icon to be added.
   1.406 +     *
   1.407 +     * @param aFilename Filename to be used to construct the item, 
   1.408 +     *      if no matching item was found in the currently active skin.
   1.409 +     *
   1.410 +     * @param aBitmapId ID of the bitmap in the file. 
   1.411 +     *      Used only if no matching item was found in the currently 
   1.412 +     *      active skin.
   1.413 +     *
   1.414 +     * @param aMaskId ID of the mask in the file.
   1.415 +     *      Used only if no matching item was found in the currently
   1.416 +     *      active skin.
   1.417 +     *
   1.418 +     * @param aScaleMode Scale mode used when icon's bitmap is resized.
   1.419 +     *
   1.420 +     * @leave KErrNoMemory Not enough memory.
   1.421 +     *
   1.422 +     * @leave KErrArgument Specified icon ID is out of allowed range.
   1.423 +     */
   1.424 +    IMPORT_C void AssignIconL( TInt aIconId, const TAknsItemID& aId,
   1.425 +        const TDesC& aFilename, TInt aBitmapId, TInt aMaskId,
   1.426 +        TScaleMode aScaleMode );
   1.427 +
   1.428 +    /**
   1.429 +     * Assigns an icon to the tree list with the specified ID. If an icon
   1.430 +     * with specified ID already exists in the list, the existing icon is
   1.431 +     * replaced with the new one. The ownership of bitmaps is transferred to
   1.432 +     * the list only if so specifed with @c aTransferOnwership parameter.
   1.433 +     * Note that icons added with this method cannot be reconstructed on
   1.434 +     * skin change events by list.
   1.435 +     *
   1.436 +     * @param aIconId Icon ID assigned for the icon.
   1.437 +     *
   1.438 +     * @param aIcon Pointer to the bitmap.
   1.439 +     *
   1.440 +     * @param aMask Pointer to the mask bitmap.
   1.441 +     *
   1.442 +     * @param aTransferOwnership @c ETrue, if ownership of bitmaps is
   1.443 +     *      transferred to the list. If the method leaves, it is always on
   1.444 +     *      the responsibility of the client code to take care of deleting
   1.445 +     *      the bitmaps.
   1.446 +     *
   1.447 +     * @param aScaleMode Scale mode used when icon's bitmap is resized.
   1.448 +     *
   1.449 +     * @leave KErrNoMemory Not enough memory.
   1.450 +     *
   1.451 +     * @leave KErrArgument Specified icon ID is out of allowed range.
   1.452 +     */
   1.453 +    IMPORT_C void AssignIconL( TInt aIconId, CFbsBitmap* aIcon,
   1.454 +        CFbsBitmap* aMask, TBool aTransferOwnership, TScaleMode aScaleMode );
   1.455 +
   1.456 +    /**
   1.457 +     * Assigns a color icon to the list with the specified ID. If an icon
   1.458 +     * with specified ID already exists in the list, the existing icon is
   1.459 +     * replaced with the new one. The given parameters are stored in the
   1.460 +     * tree list, and they are used in reconstructing the bitmaps on skin
   1.461 +     * change events.
   1.462 +     *
   1.463 +     * @param aIconId Icon ID assigned for the icon.
   1.464 +     *
   1.465 +     * @param aId Item ID of the icon to be added.
   1.466 +     *
   1.467 +     * @param aColorId Item ID of the color table.
   1.468 +     *
   1.469 +     * @param aColorIndex Index in the color table.
   1.470 +     *
   1.471 +     * @param aFilename Filename to be used to construct the item, 
   1.472 +     *      if no matching item was found in the currently active skin.
   1.473 +     *
   1.474 +     * @param aBitmapId ID of the bitmap in the file. 
   1.475 +     *      Used only if no matching item was found in the currently 
   1.476 +     *      active skin.
   1.477 +     *
   1.478 +     * @param aMaskId ID of the mask in the file.
   1.479 +     *      Used only if no matching item was found in the currently
   1.480 +     *      active skin.
   1.481 +     *
   1.482 +     * @param aDefaultColor Color RGB value to be used, if no color
   1.483 +     *      is found in the currently active skin.
   1.484 +     *
   1.485 +     * @param aScaleMode Scale mode used when icon's bitmap is resized.
   1.486 +     *
   1.487 +     * @leave KErrNoMemory Not enough memory.
   1.488 +     *
   1.489 +     * @leave KErrArgument Specified icon ID is out of allowed range.
   1.490 +     */ 
   1.491 +    IMPORT_C void AssignColorIconL( TInt aIconId, const TAknsItemID& aId,
   1.492 +        const TAknsItemID& aColorId, TInt aColorIndex, const TDesC& aFilename,
   1.493 +        TInt aBitmapId, TInt aMaskId, TRgb aDefaultColor,
   1.494 +        TScaleMode aScaleMode );
   1.495 +
   1.496 +    /**
   1.497 +     * Removes the specified icon from the tree list. The specified icon cannot
   1.498 +     * be any of the default tree list icon, in which case the leaves with
   1.499 +     * value @c KErrArgument. If the specified icon is not found, the function
   1.500 +     * does nothing.
   1.501 +     *
   1.502 +     * @param aIconId Icon ID of the removed icon.
   1.503 +     *
   1.504 +     * @leave KErrArgument if specified icon is one of the default icons.
   1.505 +     */
   1.506 +    IMPORT_C void RemoveIconL( TInt aIconId );
   1.507 +
   1.508 +    /**
   1.509 +     * Returns the number of children of a hierarchical list node. This method,
   1.510 +     * along with @c Child() method, can be used for enquiring information of
   1.511 +     * the list structure. Constant @c KAknTreeIIDRoot can be used to get the
   1.512 +     * item count on the top-most level of the list.
   1.513 +     *
   1.514 +     * @param aNode Item ID of a node.
   1.515 +     *
   1.516 +     * @return Number of children of specified node.
   1.517 +     *
   1.518 +     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
   1.519 +     *
   1.520 +     * @panic EAknHListPanicInvalidItemType Specified item is not a node.
   1.521 +     */
   1.522 +    IMPORT_C TInt ChildCount( TAknTreeItemID aNode ) const;
   1.523 +
   1.524 +    /**
   1.525 +     * Gets the item ID of a child of a hierarcical list node. The specific
   1.526 +     * child is specified with an index. The child count for any hierarchical
   1.527 +     * list node can be get with @c ChildCount() method.
   1.528 +     *
   1.529 +     * @param aNode Item ID of the node, whose child is enquiried.
   1.530 +     *
   1.531 +     * @param aIndex Index of the enquiried child.
   1.532 +     *
   1.533 +     * @return Item ID of the specified child. Value @c KAknTreeIIDNone is
   1.534 +     *      returned, if the child with specified index does not exist.
   1.535 +     * 
   1.536 +     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
   1.537 +     *
   1.538 +     * @panic EAknHListPanicInvalidItemType Specified item is not a node.
   1.539 +     */
   1.540 +    IMPORT_C TAknTreeItemID Child( TAknTreeItemID aNode, TInt aIndex ) const;
   1.541 +
   1.542 +    /**
   1.543 +     * Returns the item ID of the parent of a hierarchical list item. The
   1.544 +     * constant @c KAknTreeIIDRoot is returned for all the items on the
   1.545 +     * top-most level of the tree, and constant @c KaknTereIIDNone for the
   1.546 +     * items that have no parent, that is, the root node.
   1.547 +     *
   1.548 +     * @param aItem Item ID of the item, whose parent is enquiried.
   1.549 +     *
   1.550 +     * @return Item ID of the parent node.
   1.551 +     *
   1.552 +     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
   1.553 +     */
   1.554 +    IMPORT_C TAknTreeItemID Parent( TAknTreeItemID aItem ) const;
   1.555 +
   1.556 +    /**
   1.557 +     * Checks whether the hierarchical list contains the list item with
   1.558 +     * specified item ID. The returned value for constant @c KAknTreeIIDRoot
   1.559 +     * will always be @c ETrue, and for constant @c KAknTreeIIDNone @c EFalse.
   1.560 +     *
   1.561 +     * @param aItem Item ID.
   1.562 +     *
   1.563 +     * @return @c ETrue, if the list contains the specified item.
   1.564 +     */
   1.565 +    IMPORT_C TBool Contains( TAknTreeItemID aItem ) const;
   1.566 +
   1.567 +    /**
   1.568 +     * Checks whether a hierarchical list item is a node.
   1.569 +     *
   1.570 +     * @param aItem Item ID of checked item.
   1.571 +     *
   1.572 +     * @return @c ETrue, if the specified item is a node.
   1.573 +     *
   1.574 +     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
   1.575 +     */
   1.576 +    IMPORT_C TBool IsNode( TAknTreeItemID aItem ) const;
   1.577 +
   1.578 +    /**
   1.579 +     * Checks whether a hierarchical list item is a leaf.
   1.580 +     *
   1.581 +     * @param aItem Item ID of checked item.
   1.582 +     *
   1.583 +     * @return @c ETrue, if the specified item is a leaf.
   1.584 +     *
   1.585 +     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
   1.586 +     */
   1.587 +    IMPORT_C TBool IsLeaf( TAknTreeItemID aItem ) const;
   1.588 +
   1.589 +    /** 
   1.590 +     * Checks whether a hierarchical list item is marked.
   1.591 +     *
   1.592 +     * @param aItem Item ID of checked item.
   1.593 +     *
   1.594 +     * @return @c ETrue for marked item.
   1.595 +     *
   1.596 +     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
   1.597 +     */
   1.598 +    IMPORT_C TBool IsMarked( TAknTreeItemID aItem ) const;
   1.599 +
   1.600 +    /**
   1.601 +     * Sets an item marked. If the marked item is a node, all of its
   1.602 +     * descendants are also set marked.
   1.603 +     *
   1.604 +     * Note that item marking can be changed with this method, even if the
   1.605 +     * list itself is not set markable. Marking changes can be enabled and
   1.606 +     * disabled with @c EnableMarking() method.
   1.607 +     *
   1.608 +     * @param aItem Item ID of the item to be modified.
   1.609 +     * 
   1.610 +     * @param aMarked @c ETrue to set item marked, @c EFalse to unmarked.
   1.611 +     *
   1.612 +     * @param aDrawNow @c ETrue to redraw the list after the item has been
   1.613 +     *      set marked, otherwise @c EFalse.
   1.614 +     *
   1.615 +     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
   1.616 +     */
   1.617 +    IMPORT_C void SetMarked( TAknTreeItemID aItem, TBool aMarked,
   1.618 +        TBool aDrawNow );
   1.619 +
   1.620 +    /**
   1.621 +     * Enables or disables marking of specified list item. By default,
   1.622 +     * marking is enabled for every list item.
   1.623 +     *
   1.624 +     * When marking is enabled for an item, its marking can be changed from
   1.625 +     * unmarked to marked, and vice versa, with SetMarked() method, and for
   1.626 +     * markable list, the marking can also change as a result of user action.
   1.627 +     *
   1.628 +     * When marking is disabled, the item can still be either unmarked or
   1.629 +     * marked, but the marking cannot be changed in any way, until it has
   1.630 +     * been enabled again for the item.
   1.631 +     *
   1.632 +     * @param aItem Item ID of the list item.
   1.633 +     *
   1.634 +     * @param aEnable @c ETrue to enable marking, @c EFalse to disable it.
   1.635 +     *
   1.636 +     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
   1.637 +     */
   1.638 +    IMPORT_C void EnableMarking( TAknTreeItemID aItem, TBool aEnable );
   1.639 +
   1.640 +    /**
   1.641 +     * Gets all the marked items from the tree list. The marked items are
   1.642 +     * appended to the end of the array passed as parameter.
   1.643 +     *
   1.644 +     * @param aMarkedItems On return, contains item IDs of all marked items.
   1.645 +     *
   1.646 +     * @leave KErrNoMemory Appending item to the array fails.
   1.647 +     */
   1.648 +    IMPORT_C void GetMarkedItemsL( RArray<TAknTreeItemID>& aMarkedItems ) const;
   1.649 +
   1.650 +    /**
   1.651 +     * Gets all the marked items from the specified node. The marked items
   1.652 +     * are appended to the end of the array passed as parameter.
   1.653 +     *
   1.654 +     * @param aNode Item ID of a node from where the marked items are
   1.655 +     *      retrieved.
   1.656 +     *
   1.657 +     * @param aMarkedItems On return, contains item IDs of marked items in
   1.658 +     *      the specified node.
   1.659 +     *
   1.660 +     * @leave KErrNoMemory Appending item to the array fails.
   1.661 +     *
   1.662 +     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
   1.663 +     *
   1.664 +     * @panic EAknHListPanicInvalidItemType Specified item is not a node.
   1.665 +     */
   1.666 +    IMPORT_C void GetMarkedItemsL( TAknTreeItemID aNode,
   1.667 +        RArray<TAknTreeItemID>& aMarkedItems ) const;
   1.668 +
   1.669 +    /**
   1.670 +     * Checks whether the specified node is empty. To decrease memory
   1.671 +     * consumption, the descendants of tree nodes can be removed from the
   1.672 +     * hierarchical list when the node is collapsed. As the empty nodes may
   1.673 +     * have different appearances in the list view, the collapsed nodes can be
   1.674 +     * set to appear as non-empty with @c SetNonEmpty() method to indicate that
   1.675 +     * nodes will have some content when expanded.
   1.676 +     *
   1.677 +     * @param aNode Item ID of checked item.
   1.678 +     *
   1.679 +     * @return @c ETrue, if the item has been set non-empty.
   1.680 +     *
   1.681 +     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
   1.682 +     *
   1.683 +     * @panic EAknHListPanicInvalidItemType Specified target item is not a node.
   1.684 +     */
   1.685 +    IMPORT_C TBool IsEmpty( TAknTreeItemID aNode ) const;
   1.686 +
   1.687 +    /**
   1.688 +     * Sets a node non-empty.
   1.689 +     *
   1.690 +     * @param aNode Item ID of the item to be modified.
   1.691 +     *
   1.692 +     * @param aNonEmpty @c ETrue to set node non-empty, @c EFalse to empty.
   1.693 +     *
   1.694 +     * @param aDrawNow @c ETrue to redraw the list after the setting has been
   1.695 +     *      change, otherwise @c EFalse.
   1.696 +     *      
   1.697 +     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
   1.698 +     *
   1.699 +     * @panic EAknHListPanicInvalidItemType Specified target item is not a node.
   1.700 +     */
   1.701 +    IMPORT_C void SetNonEmpty( TAknTreeItemID aNode, TBool aNonEmpty,
   1.702 +        TBool aDrawNow );
   1.703 +
   1.704 +    /**
   1.705 +     * Checks if the specified item is set persistent. If an item is set
   1.706 +     * persistent, it is not removed from the list, when its parent or any of
   1.707 +     * its ancestors is collapsed. This means also that a node cannot be
   1.708 +     * automatically removed from the list on collapse event, if any of its
   1.709 +     * descendants is set persistent.
   1.710 +     *
   1.711 +     * @param aItem Item ID.
   1.712 +     *
   1.713 +     * @return @c ETrue, if item is set persistent.
   1.714 +     *
   1.715 +     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
   1.716 +     */
   1.717 +    IMPORT_C TBool IsPersistent( TAknTreeItemID aItem ) const;
   1.718 +
   1.719 +    /**
   1.720 +     * Sets an item persistent. If the specified item is a node, the state
   1.721 +     * of all its descendants is also changed accordingly.
   1.722 +     *
   1.723 +     * @param aItem Item ID.
   1.724 +     *
   1.725 +     * @param aPersistent @c ETrue to set item persistent.
   1.726 +     *
   1.727 +     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
   1.728 +     */
   1.729 +    IMPORT_C void SetPersistent( TAknTreeItemID aItem,
   1.730 +        TBool aPersistent );
   1.731 +
   1.732 +    /**
   1.733 +     * Sets custom ordering for the hierarchical list and sorts the list
   1.734 +     * with the use of given ordering interface. The given interface is
   1.735 +     * used until it is replaced with some other ordering.
   1.736 +     *
   1.737 +     * Note: Ownership of the interface is not transferred to the list.
   1.738 +     *
   1.739 +     * Note: When custom ordering is set to the list, new items are added
   1.740 +     * to the end of their parent nodes, because the interface cannot
   1.741 +     * be used for determining the position for inserted item, as the
   1.742 +     * client receives its identifier only after it has been inserted.
   1.743 +     * @c Sort(TAknTreeItemID, TBool, TBool) method can be used for sorting
   1.744 +     * the node with custom ordering interface after new items have been
   1.745 +     * inserted in the list.
   1.746 +     *
   1.747 +     * @param aOrdering Custom ordering interface used in list sorting.
   1.748 +     *
   1.749 +     * @param aDrawNow @c ETrue to redraw the list after sorting.
   1.750 +     */
   1.751 +    IMPORT_C void Sort( MAknCustomTreeOrdering* aOrdering, TBool aDrawNow );
   1.752 +
   1.753 +    /**
   1.754 +     * Sorts the specified node with the use of previously set ordering
   1.755 +     * interface. The sorting can be restricted to the specified node, or
   1.756 +     * the sorting can be set to include also every descendant node of the
   1.757 +     * specified node. Whole list can be sorted by giving the constant
   1.758 +     * @c KAknTreeIIDRoot as the @c aNode parameter. This method has no
   1.759 +     * effect, if no ordering has been set for the list.
   1.760 +     * 
   1.761 +     * @param aNode Item ID of the node that has to be sorted.
   1.762 +     *
   1.763 +     * @param aSortDescendants @c ETrue to sort the content of the specified
   1.764 +     *      node including the content of its descendant nodes, @c EFalse to
   1.765 +     *      sort only the child items within the specified node.
   1.766 +     *
   1.767 +     * @param aDrawNow @c ETrue to redraw the list after sorting.
   1.768 +     *
   1.769 +     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
   1.770 +     *
   1.771 +     * @panic EAknHListPanicInvalidItemType Specified item is not a node.
   1.772 +     */
   1.773 +    IMPORT_C void Sort( TAknTreeItemID aNode, TBool aSortDescendants,
   1.774 +        TBool aDrawNow );
   1.775 +
   1.776 +    /**
   1.777 +     * Adds an observer for the hierarchical list. Notifications of the list
   1.778 +     * events are sent to all observers set with this method. Observers can
   1.779 +     * be removed from the list with @c RemoveObserver() method.
   1.780 +     *
   1.781 +     * Note: Hierarchical list also sends a state changed event on every list
   1.782 +     * event through the usual control observer interface that can be set with
   1.783 +     * @c CCoeControl::SetObserver method.
   1.784 +     *
   1.785 +     * @param aObserver Implementation of the observer interface.
   1.786 +     *
   1.787 +     * @post The given interface is set as the observer of the list. The
   1.788 +     *      ownership of the interface is not transferred to the list.
   1.789 +     */
   1.790 +    IMPORT_C void AddObserverL( MAknTreeListObserver* aObserver );
   1.791 +
   1.792 +    /**
   1.793 +     * Removes an observer from the hierarchical list.
   1.794 +     *
   1.795 +     * @param aObserver The observer interface to be removed.
   1.796 +     */
   1.797 +    IMPORT_C void RemoveObserver( MAknTreeListObserver* aObserver );
   1.798 +
   1.799 +    /**
   1.800 +     * Notifies all of the tree list observers of the specified event. This
   1.801 +     * method is not exported, as it is intended for internal use only.
   1.802 +     *
   1.803 +     * @param aEvent The event to be notified.
   1.804 +     *
   1.805 +     * @param aItem ID of the tree item related to the event.
   1.806 +     */
   1.807 +    void NotifyObservers( MAknTreeListObserver::TEvent aEvent,
   1.808 +        TAknTreeItemID aItem );
   1.809 +
   1.810 +    /**
   1.811 +     * Checks whether tabulator mode function indicators are enabled.
   1.812 +     *
   1.813 +     * @return @c ETrue if tabulator mode is enabled.
   1.814 +     */
   1.815 +    IMPORT_C TBool TabModeFunctionIndicators() const;
   1.816 +
   1.817 +    /**
   1.818 +     * Changes the appearance of collapse and expand function indicators. The
   1.819 +     * appearance of default function indicators suggest that left and right
   1.820 +     * arrow keys expand and collapse the focused nodes, but when the list is
   1.821 +     * used with tabulators, those keys are used in changing tabulators.
   1.822 +     * Alternate representation for function indicator can be set by enabling
   1.823 +     * tabulator mode indicator with this method.
   1.824 +     *
   1.825 +     * @param aEnable @c ETrue to enable tabulator mode function indicators,
   1.826 +     *      @c EFalse to use the default function indicators.
   1.827 +     */
   1.828 +    IMPORT_C void EnableTabModeFunctionIndicatorsL( TBool aEnable );
   1.829 +    
   1.830 +
   1.831 +    /**
   1.832 +     * Sets the focused item and its position on the list view. 
   1.833 +     * 
   1.834 +     * When the focused item is changed, the vertical position of the view
   1.835 +     * is changed as follows:
   1.836 +     * 
   1.837 +     * If the focused item is set on the first page, view is changed
   1.838 +     * to the beginning of the list.
   1.839 +     * 
   1.840 +     * If the focused item is not set on the first page, view is changed so 
   1.841 +     * that focused item is at the lowest line on the screen.
   1.842 +     * 
   1.843 +     * (In this context first page means actual lines from 0
   1.844 +     * to max. number of visible lines - 1)
   1.845 +     *
   1.846 +     * The horizontal position of the view is changed so that the
   1.847 +     * the beginning of the focused item is visible.
   1.848 +     *
   1.849 +     * @param aItem Item ID of the item to be focused.
   1.850 +     *
   1.851 +     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
   1.852 +     */
   1.853 + 	IMPORT_C void SetFocusedItem( TAknTreeItemID aItem );
   1.854 + 	 	
   1.855 + 	/**
   1.856 +     * Gets the index of the focused item on the screen. Possible values are
   1.857 +     * from 0 to max. number of visible lines - 1. Value -1 is
   1.858 +     * returned if no item is focused or focused item is not visible. 
   1.859 +     *
   1.860 +     * @return index of the focused item on the screen.
   1.861 +     */
   1.862 + 	IMPORT_C TInt FocusedItemIndex() const;
   1.863 + 	
   1.864 + 	/**
   1.865 +     * Gets the index of the item on the screen. Possible values are
   1.866 +     * from 0 to max. number of visible lines - 1. Value -1 is
   1.867 +     * returned if the requested item is not visible on the screen. 
   1.868 +     *
   1.869 +     * @return index of the requested item.
   1.870 +     */
   1.871 + 	IMPORT_C TInt VisibleItemIndex( TAknTreeItemID aItem ) const;
   1.872 +
   1.873 + 	
   1.874 + 	/**
   1.875 +     * Sets custom ordering for the hierarchical list and sorts the list
   1.876 +     * with the use of given ordering interface. The given interface is
   1.877 +     * used until it is replaced with some other ordering.
   1.878 +     *
   1.879 +     * @param aOrdering Custom ordering interface used in list sorting.
   1.880 +     *
   1.881 +     * @param aFocusBehaviour Tells how focus should be handled after sorting.
   1.882 +     *      @c ESaveFocus saves focus in the item where it was before sorting, 
   1.883 +     *      @c EMoveFocusToFirstItem changes view to the beginning of the list
   1.884 +     *      and moves focus to the first item.  
   1.885 +     *
   1.886 +     * @param aDrawNow @c ETrue to redraw the list after sorting.
   1.887 +     */
   1.888 + 	IMPORT_C void Sort( MAknCustomTreeOrdering* aOrdering, TFocusBehaviour aFocusBehaviour, TBool aDrawNow );
   1.889 +
   1.890 +	/**
   1.891 +     * Sorts the specified node with the use of previously set ordering
   1.892 +     * interface. The sorting can be restricted to the specified node, or
   1.893 +     * the sorting can be set to include also every descendant node of the
   1.894 +     * specified node. Whole list can be sorted by giving the constant
   1.895 +     * @c KAknTreeIIDRoot as the @c aNode parameter. This method has no
   1.896 +     * effect, if no ordering has been set for the list.
   1.897 +     *
   1.898 +     * @param aNode Item ID of the node that has to be sorted.
   1.899 +     * 
   1.900 +     * @param aFocusBehaviour Tells how focus should be handled after sorting.
   1.901 +     *      @c ESaveFocus saves focus in the item where it was before sorting, 
   1.902 +     *      @c EMoveFocusToFirstItem changes view to the beginning of the list
   1.903 +     *      and moves focus to the first item. 
   1.904 +     *
   1.905 +     * @param aSortDescendants @c ETrue to sort the content of the specified
   1.906 +     *      node including the content of its descendant nodes, @c EFalse to
   1.907 +     *      sort only the child items within the specified node.
   1.908 +     *
   1.909 +     * @param aDrawNow @c ETrue to redraw the list after sorting.
   1.910 +     *
   1.911 +     * @panic EAknHListPanicInvalidItemID Item with specified ID is not found.
   1.912 +     *
   1.913 +     * @panic EAknHListPanicInvalidItemType Specified item is not a node.
   1.914 +     */
   1.915 +   	IMPORT_C void Sort( TAknTreeItemID aNode, TFocusBehaviour aFocusBehaviour, TBool aSortDescendants, TBool aDrawNow );
   1.916 +        
   1.917 +    /**
   1.918 +     * Sets text for the empty list. This text is visible if the list box 
   1.919 +     * has no items.
   1.920 +     *
   1.921 +     * @param aText The text for the empty list.
   1.922 +     */
   1.923 +	IMPORT_C void SetEmptyTextL(const TDesC& aText);
   1.924 +
   1.925 +
   1.926 +// From base class CCoeControl
   1.927 +
   1.928 +    /**
   1.929 +     * From CCoeControl.
   1.930 +     * Handles key events. The method will return @c EKeyWasNotConsumed, if
   1.931 +     * the list is not focused.
   1.932 +     *
   1.933 +     * @param aKeyEvent The key event.
   1.934 +     *
   1.935 +     * @param aType The type of key event: @c EEventKey, @c EEventKeyUp or 
   1.936 +     *      @c EEventKeyDown.
   1.937 +     */
   1.938 +    TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
   1.939 +
   1.940 +    /**
   1.941 +     * From CCoeControl.
   1.942 +     * Changes the visibility of the hierarchical list.
   1.943 +     *
   1.944 +     * @param aVisible @c ETrue to make the list visible, @c EFalse to make
   1.945 +     *      it invisible.
   1.946 +     */
   1.947 +    void MakeVisible( TBool aVisible );
   1.948 +
   1.949 +    /**
   1.950 +     * From CCoeControl.
   1.951 +     * Sets whether the list is dimmed.
   1.952 +     *
   1.953 +     * @param aDimmed @c ETrue to set list dimmed, otherwise @c EFalse.
   1.954 +     */
   1.955 +    void SetDimmed( TBool aDimmed );
   1.956 +
   1.957 +    /**
   1.958 +     * From CCoeControl.
   1.959 +     * Sets the control's containing window by copying it from aContainer.
   1.960 +     *
   1.961 +     * @param aContainer The compound control that is the container for this
   1.962 +     *      control.
   1.963 +     */
   1.964 +    void SetContainerWindowL( const CCoeControl& aContainer );
   1.965 +
   1.966 +    /**
   1.967 +     * From CCoeControl.
   1.968 +     * Sets the control as ready to be drawn.
   1.969 +     */
   1.970 +    void ActivateL();
   1.971 +
   1.972 +    /**
   1.973 +     * From CCoeControl.
   1.974 +     * Handles resource changes.
   1.975 +     *
   1.976 +     * @param aType
   1.977 +     */
   1.978 +    void HandleResourceChange( TInt aType );
   1.979 +
   1.980 +    /**
   1.981 +     * From CCoeControl.
   1.982 +     * Gets the control's input capabilities.
   1.983 +     *
   1.984 +     * @return The control's input capabilities.
   1.985 +     */
   1.986 +    TCoeInputCapabilities InputCapabilities() const;
   1.987 +
   1.988 +    /**
   1.989 +     * From CCoeControl.
   1.990 +     * Handles pointer events.
   1.991 +     *
   1.992 +     * @param aPointerEvent Pointer event.
   1.993 +     */
   1.994 +    void HandlePointerEventL( const TPointerEvent& aPointerEvent );
   1.995 +
   1.996 +    /**
   1.997 +     * From CCoeControl.
   1.998 +     * Gets the number of controls contained in a compound control.
   1.999 +     *
  1.1000 +     * @return The number of component controls contained by this control.
  1.1001 +     */
  1.1002 +    TInt CountComponentControls() const;
  1.1003 +
  1.1004 +    /**
  1.1005 +     * From CCoeControl.
  1.1006 +     * Gets an indexed component of a compound control.
  1.1007 +     *
  1.1008 +     * @param aIndex The index of the control.
  1.1009 +     *
  1.1010 +     * @return The component control with an index of aIndex.
  1.1011 +     */
  1.1012 +    CCoeControl* ComponentControl( TInt aIndex ) const;
  1.1013 +
  1.1014 +protected:
  1.1015 +
  1.1016 +    /**
  1.1017 +     * Constructor.
  1.1018 +     */
  1.1019 +    CAknTreeList();
  1.1020 +
  1.1021 +    /**
  1.1022 +     * Second phase constructor. Completes the construction of the base class.
  1.1023 +     * When this version of @c BaseConstructL() is used, new window is created
  1.1024 +     * for the list.
  1.1025 +     */
  1.1026 +    void BaseConstructL();
  1.1027 +
  1.1028 +    /** 
  1.1029 +     * Second phase constructor. Completes the construction of the base class.
  1.1030 +     *
  1.1031 +     * @param aContainer Container for the list.
  1.1032 +     */
  1.1033 +    void BaseConstructL( const CCoeControl& aContainer );
  1.1034 +
  1.1035 +    /**
  1.1036 +     * Reference to the tree structure.
  1.1037 +     *
  1.1038 +     * @return Reference to tree structure.
  1.1039 +     */
  1.1040 +    CAknTree& Tree();
  1.1041 +
  1.1042 +    /**
  1.1043 +     * Constant reference to the tree structure.
  1.1044 +     *
  1.1045 +     * @return Constant reference to tree structure.
  1.1046 +     */
  1.1047 +    const CAknTree& Tree() const;
  1.1048 +
  1.1049 +    /**
  1.1050 +     * Reference to the tree list view.
  1.1051 +     *
  1.1052 +     * @return Reference to tree list view.
  1.1053 +     */
  1.1054 +    CAknTreeListView& View();
  1.1055 +
  1.1056 +    /**
  1.1057 +     * Constant reference to the tree list view.
  1.1058 +     *
  1.1059 +     * @return Constant reference to tree list view.
  1.1060 +     */
  1.1061 +    const CAknTreeListView& View() const;
  1.1062 +
  1.1063 +// from base class CCoeControl
  1.1064 +
  1.1065 +    /**
  1.1066 +     * From CCoeControl.
  1.1067 +     * Handles focus change.
  1.1068 +     *
  1.1069 +     * @param aDrawNow @c EDrawNow to redraw the list.
  1.1070 +     */
  1.1071 +    void FocusChanged( TDrawNow aDrawNow );
  1.1072 +
  1.1073 +    /**
  1.1074 +     * From CCoeControl.
  1.1075 +     * Responds to changes to the size and position of this control.
  1.1076 +     */
  1.1077 +    void SizeChanged();
  1.1078 +
  1.1079 +    /**
  1.1080 +     * From CCoeControl.
  1.1081 +     * Responds to changes in the position of this control.
  1.1082 +     */
  1.1083 +    void PositionChanged();
  1.1084 +
  1.1085 +    /**
  1.1086 +     * From CCoeControl.
  1.1087 +     * Retrieves an object of the same type as that encapsulated in aId.
  1.1088 +     *
  1.1089 +     * @param aId An encapsulated object type ID.
  1.1090 +     *
  1.1091 +     * @return Encapsulates the pointer to the object provided. Note that the
  1.1092 +     *      encapsulated pointer may be NULL
  1.1093 +     */
  1.1094 +    TTypeUid::Ptr MopSupplyObject( TTypeUid aId );
  1.1095 +
  1.1096 +private:
  1.1097 +
  1.1098 +// from base class CCoeControl
  1.1099 +    
  1.1100 +    /**
  1.1101 +     * From CCoeControl.
  1.1102 +     * Draws the list.
  1.1103 +     *
  1.1104 +     * @param aRect Specifies the area that needs to be redrawn.
  1.1105 +     */
  1.1106 +    void Draw( const TRect& aRect ) const;
  1.1107 +
  1.1108 +private: // data
  1.1109 +
  1.1110 +    /**
  1.1111 +     * Flags.
  1.1112 +     */
  1.1113 +    TUint32 iFlags;
  1.1114 +
  1.1115 +    /**
  1.1116 +     * Tree structure.
  1.1117 +     * Own.
  1.1118 +     */
  1.1119 +    CAknTree* iTree;
  1.1120 +
  1.1121 +    /**
  1.1122 +     * Tree list view.
  1.1123 +     * Own.
  1.1124 +     */
  1.1125 +    CAknTreeListView* iView;
  1.1126 +
  1.1127 +    /**
  1.1128 +     * Tree list observers.
  1.1129 +     * Not own.
  1.1130 +     */
  1.1131 +    RPointerArray<MAknTreeListObserver> iObservers;
  1.1132 +
  1.1133 +    /**
  1.1134 +     * Index to observer array.
  1.1135 +     */
  1.1136 +    TInt iIndex;
  1.1137 +
  1.1138 +    };
  1.1139 +
  1.1140 +
  1.1141 +#endif // C_AKNTREELIST_H