epoc32/include/mw/akntreelistobserver.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 /*
     2 * Copyright (c) 2006, 2007 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:  Observer interface for hierarchical list.
    15 *
    16 */
    17 
    18 
    19 #ifndef M_AKNTREELISTOBSERVER_H
    20 #define M_AKNTREELISTOBSERVER_H
    21 
    22 
    23 #include <akntreelistconstants.h>
    24 
    25 class CAknTreeList;
    26 
    27 
    28 /**
    29  *  Observer interface for hierarchical list.
    30  *
    31  *  Notifications of common hierarhicial list events are sent to the 
    32  *  list client through this interface. All hierarhical list clients must
    33  *  provide an implementation for the interface and then register it with
    34  *  @c CAknTreeList::AddObserverL() method.
    35  *
    36  *  List specializations can also provide extended observer interfaces derived
    37  *  from this interface, if this interface is not sufficient for the usage of
    38  *  some hierarhical list specialization.
    39  *
    40  *  @since S60 v3.2
    41  */
    42 class MAknTreeListObserver
    43     {
    44 
    45 public:
    46 
    47     /**
    48      * Hierarchical list events. These events are sent to hierarchical list
    49      * observer with @c HandleTreeListEvent() method.
    50      */
    51     enum TEvent
    52         {
    53         /** Node is being expanded. At this point the list client should
    54             update the content of expanded node, or add the content, if it
    55             has not been added or was removed when the node was collapsed. */
    56         ENodeExpanded,
    57         /** Node is being collapsed. This event is sent before a node is
    58             collapsed. After the event, all the content of the node is deleted
    59             unless it has been set persistent. */
    60         ENodeCollapsed,
    61         /** Focused item is changed. This event indicates that the focus is
    62             moved to another list item. The client can use this information,
    63             for example, for showing some additional information about the
    64             focused item. */
    65         EItemFocused,
    66         /** Item is selected. This event indicates that the focused item is
    67             selected with some key or pointer event. The client should respond
    68             to selection event, for example, by opening the selected item. */
    69         EItemSelected,
    70         /** Item was removed from the list. The specified item ID is no
    71             longer usable. */
    72         EItemRemoved,
    73         /** Marking mode enabled. This event is used for notifying the client
    74             that markable list has entered marking mode as a result of user
    75             keeping shift, control, edit, or hash key pressed. During marking
    76             mode, the list controls the MSK key, and to ensure proper MSK
    77             functionality, the client should not change MSK content. */
    78         EMarkingModeEnabled,
    79         /** Marking mode disabled. This event is sent when markable list
    80             exits the marking mode. After this, the list no longer controls
    81             the MSK key. */
    82         EMarkingModeDisabled,
    83         /** Item has been marked. This event is sent when either a node or
    84             a leaf has been marked. Note that when marked item is a node,
    85             its content is also set marked, but separate events are not
    86             sent for all of the marked descendants. */
    87         EItemMarked,
    88         /** Item has been unmarked. This event is sent when either a node or
    89             a leaf has been unmarked. Note that when unmarked item is a node,
    90             its content is also set unmarked, but separate events are not
    91             sent for all of the unmarked descendants. */
    92         EItemUnmarked,
    93         /** Panning is started. @ aItem in @c HandleTreeListEvent() 
    94          *  is @ KAknTreeIIDNone in this case.
    95          */
    96         EEventPanningStarted,
    97         /** Panning is stopeed. @ aItem in @c HandleTreeListEvent() 
    98          *  is @ KAknTreeIIDNone in this case.
    99          */
   100         EEventPanningStopped,
   101         /** Flick is started. @ aItem in @c HandleTreeListEvent() 
   102          *  is @ KAknTreeIIDNone in this case.
   103          */
   104         EEventFlickStarted,
   105         /** Flick is stopped. @ aItem in @c HandleTreeListEvent() 
   106          *  is @ KAknTreeIIDNone in this case.
   107          */
   108         EEventFlickStopped,
   109         /** Empty list clicked. This event is sent when completely empty list 
   110             is clicked */        
   111         EEmptyListClicked,
   112         /** Empty area clicked. This event is sent when empty area of a non-
   113             empty list is clicked. */        
   114         EEmptyAreaClicked        
   115         };
   116 
   117     /**
   118      * The list client is notified of hierarchical list events with this
   119      * method. Hierarchical list instance, item ID of the referred list item,
   120      * and the event code are sent to the client.
   121      *
   122      * Note: New events may be added to the @c MAknTreeListObserver::TEvent
   123      * enumeration in the future, and it should be taken in account in the
   124      * implementations of this method, and not, for example, panic when
   125      * receiving some currently unspecified event.
   126      *
   127      * @param aList The hierarchical list from where the event is originated.
   128      *
   129      * @param aItem Item ID of the list item the event is referring to.
   130      *
   131      * @param aEvent The hierarchical list event.
   132      *
   133      * @return Return value currently not used, value @c KErrNone should
   134      *      be used.
   135      */
   136     virtual TInt HandleTreeListEvent( CAknTreeList& aList,
   137         TAknTreeItemID aItem, TEvent aEvent ) = 0;
   138 
   139     };
   140 
   141 
   142 #endif // M_AKNTREELISTOBSERVER_H