epoc32/include/mw/akntreelistobserver.h
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
     1.1 --- a/epoc32/include/mw/akntreelistobserver.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/mw/akntreelistobserver.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,120 @@
     1.4 -akntreelistobserver.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:  Observer interface for hierarchical list.
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +#ifndef M_AKNTREELISTOBSERVER_H
    1.24 +#define M_AKNTREELISTOBSERVER_H
    1.25 +
    1.26 +
    1.27 +#include <akntreelistconstants.h>
    1.28 +
    1.29 +class CAknTreeList;
    1.30 +
    1.31 +
    1.32 +/**
    1.33 + *  Observer interface for hierarchical list.
    1.34 + *
    1.35 + *  Notifications of common hierarhicial list events are sent to the 
    1.36 + *  list client through this interface. All hierarhical list clients must
    1.37 + *  provide an implementation for the interface and then register it with
    1.38 + *  @c CAknTreeList::AddObserverL() method.
    1.39 + *
    1.40 + *  List specializations can also provide extended observer interfaces derived
    1.41 + *  from this interface, if this interface is not sufficient for the usage of
    1.42 + *  some hierarhical list specialization.
    1.43 + *
    1.44 + *  @since S60 v3.2
    1.45 + */
    1.46 +class MAknTreeListObserver
    1.47 +    {
    1.48 +
    1.49 +public:
    1.50 +
    1.51 +    /**
    1.52 +     * Hierarchical list events. These events are sent to hierarchical list
    1.53 +     * observer with @c HandleTreeListEvent() method.
    1.54 +     */
    1.55 +    enum TEvent
    1.56 +        {
    1.57 +        /** Node is being expanded. At this point the list client should
    1.58 +            update the content of expanded node, or add the content, if it
    1.59 +            has not been added or was removed when the node was collapsed. */
    1.60 +        ENodeExpanded,
    1.61 +        /** Node is being collapsed. This event is sent before a node is
    1.62 +            collapsed. After the event, all the content of the node is deleted
    1.63 +            unless it has been set persistent. */
    1.64 +        ENodeCollapsed,
    1.65 +        /** Focused item is changed. This event indicates that the focus is
    1.66 +            moved to another list item. The client can use this information,
    1.67 +            for example, for showing some additional information about the
    1.68 +            focused item. */
    1.69 +        EItemFocused,
    1.70 +        /** Item is selected. This event indicates that the focused item is
    1.71 +            selected with some key or pointer event. The client should respond
    1.72 +            to selection event, for example, by opening the selected item. */
    1.73 +        EItemSelected,
    1.74 +        /** Item was removed from the list. The specified item ID is no
    1.75 +            longer usable. */
    1.76 +        EItemRemoved,
    1.77 +        /** Marking mode enabled. This event is used for notifying the client
    1.78 +            that markable list has entered marking mode as a result of user
    1.79 +            keeping shift, control, edit, or hash key pressed. During marking
    1.80 +            mode, the list controls the MSK key, and to ensure proper MSK
    1.81 +            functionality, the client should not change MSK content. */
    1.82 +        EMarkingModeEnabled,
    1.83 +        /** Marking mode disabled. This event is sent when markable list
    1.84 +            exits the marking mode. After this, the list no longer controls
    1.85 +            the MSK key. */
    1.86 +        EMarkingModeDisabled,
    1.87 +        /** Item has been marked. This event is sent when either a node or
    1.88 +            a leaf has been marked. Note that when marked item is a node,
    1.89 +            its content is also set marked, but separate events are not
    1.90 +            sent for all of the marked descendants. */
    1.91 +        EItemMarked,
    1.92 +        /** Item has been unmarked. This event is sent when either a node or
    1.93 +            a leaf has been unmarked. Note that when unmarked item is a node,
    1.94 +            its content is also set unmarked, but separate events are not
    1.95 +            sent for all of the unmarked descendants. */
    1.96 +        EItemUnmarked
    1.97 +        };
    1.98 +
    1.99 +    /**
   1.100 +     * The list client is notified of hierarchical list events with this
   1.101 +     * method. Hierarchical list instance, item ID of the referred list item,
   1.102 +     * and the event code are sent to the client.
   1.103 +     *
   1.104 +     * Note: New events may be added to the @c MAknTreeListObserver::TEvent
   1.105 +     * enumeration in the future, and it should be taken in account in the
   1.106 +     * implementations of this method, and not, for example, panic when
   1.107 +     * receiving some currently unspecified event.
   1.108 +     *
   1.109 +     * @param aList The hierarchical list from where the event is originated.
   1.110 +     *
   1.111 +     * @param aItem Item ID of the list item the event is referring to.
   1.112 +     *
   1.113 +     * @param aEvent The hierarchical list event.
   1.114 +     *
   1.115 +     * @return Return value currently not used, value @c KErrNone should
   1.116 +     *      be used.
   1.117 +     */
   1.118 +    virtual TInt HandleTreeListEvent( CAknTreeList& aList,
   1.119 +        TAknTreeItemID aItem, TEvent aEvent ) = 0;
   1.120 +
   1.121 +    };
   1.122 +
   1.123 +
   1.124 +#endif // M_AKNTREELISTOBSERVER_H