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