emailuis/uicomponents/inc/fstreelistobserver.h
changeset 0 8466d47a6819
child 1 12c456ceeff2
equal deleted inserted replaced
-1:000000000000 0:8466d47a6819
       
     1 /*
       
     2 * Copyright (c) 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:  An observer interface for the tree list component.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef M_FSTREELISTOBSERVER_H
       
    20 #define M_FSTREELISTOBSERVER_H
       
    21 
       
    22 #include "fstreelistconstants.h"
       
    23 
       
    24 /**
       
    25  * MFsTreeObserver defines an interface which is used to observe tree list 
       
    26  * events.
       
    27  *
       
    28  * Observer of the tree list is notified of changes in the tree list through 
       
    29  * this interface with appropriate events.
       
    30  * @code
       
    31  *
       
    32  * @endcode
       
    33  *
       
    34  * @lib 
       
    35  */
       
    36 NONSHARABLE_CLASS( MFsTreeListObserver )
       
    37     {
       
    38 public:
       
    39 
       
    40     enum TFsTreeListEvent
       
    41         {
       
    42         /** 
       
    43          * An item was added to the tree list. 
       
    44          * No action required.
       
    45          */
       
    46         EFsTreeListItemAdded,
       
    47         
       
    48         /** 
       
    49          * A node was added to the tree list. 
       
    50          * No action required.
       
    51          */
       
    52         EFsTreeListNodeAdded,
       
    53         
       
    54         /** 
       
    55          * An item was removed from the tree list. 
       
    56          * No action required.
       
    57          */
       
    58         EFsTreeListItemRemoved,
       
    59         
       
    60         /** 
       
    61          * A node was removed from the tree list.
       
    62          * No action required.
       
    63          */
       
    64         EFsTreeListNodeRemoved,
       
    65         
       
    66         /**
       
    67          * All items and nodes were removed from the tree list.
       
    68          * No action required.
       
    69          */
       
    70         EFsTreeListRemovedAll,
       
    71         
       
    72         /**
       
    73          * Item/Node was moved from one parent to the other in the tree list.
       
    74          * No action required.
       
    75          */
       
    76         EFsTreeListItemMoved,
       
    77         
       
    78         /**
       
    79          * Item's/Node's data has changed.
       
    80          * No action required.
       
    81          */
       
    82         EFsTreeListItemDataChanged,
       
    83         
       
    84         /**
       
    85          * Item data's visualizer has changed.
       
    86          * No action required.
       
    87          */
       
    88         EFsTreeListItemVisualizerChanged,
       
    89         
       
    90         /**
       
    91          * Node data's visualizer has changed.
       
    92          * No action required.
       
    93          */
       
    94         EFsTreeListNodeVisualizerChanged,
       
    95         
       
    96         // <cmail> "Base class modifications for using touch"
       
    97         /**
       
    98          * Action started for selected tree item.
       
    99          */
       
   100         EFsTreeListItemTouchAction,
       
   101         
       
   102         /**
       
   103          * Long tap action started for selected tree item. 
       
   104          */
       
   105         EFsTreeListItemTouchLongTap,
       
   106                 
       
   107         /**
       
   108          * Touch focus for list gained. 
       
   109          */
       
   110         EFsTreeListItemTouchFocused,    
       
   111                 
       
   112         // </cmail>
       
   113                 
       
   114         /**
       
   115          * Item/Node was selected in the tree list. It means that the user
       
   116          * pressed a selection (or other, depending on the implementation of
       
   117          * the tree list) key on item/node.
       
   118          * 
       
   119          * No action required.
       
   120          */
       
   121         EFsTreeListItemSelected,
       
   122         
       
   123         /**
       
   124          * Focus will be moved to the specified item/node.
       
   125          * Event triggered just before an item gets focus.
       
   126          * No action required.
       
   127          */
       
   128         EFsTreeListItemWillGetFocused,
       
   129         
       
   130         /**
       
   131          * Focus was moved to the specified item/node.
       
   132          * No action required.
       
   133          */
       
   134         EFsTreeListItemFocused,
       
   135         
       
   136         /**
       
   137          * Item/node was marked.
       
   138          * No action required.
       
   139          */
       
   140         EFsTreeListItemMarked,
       
   141         
       
   142         /**
       
   143          * Item/node was unmarked.
       
   144          * No action required.
       
   145          */
       
   146         EFsTreeListItemUnmarked,
       
   147         
       
   148         /**
       
   149          * Item/node was dimmed.
       
   150          * No action required.
       
   151          */
       
   152         EFsTreeListItemDimmed,
       
   153         
       
   154         /**
       
   155          * Loop event. Focus has moved from the last item item in the list to 
       
   156          * the first or form the first to the last.
       
   157          * 
       
   158          * No action required.
       
   159          */
       
   160         EFsTreeListLoop,
       
   161         
       
   162         /**
       
   163          * List became visible.
       
   164          * No action required.
       
   165          */
       
   166         EFsTreeListShown,
       
   167         
       
   168         /**
       
   169          * List has been hidden.
       
   170          * No action required.
       
   171          */
       
   172         EFsTreeListHidden,
       
   173         
       
   174         /**
       
   175          * Text size in all the items/nodes in the list has increased.
       
   176          * No action required.
       
   177          */
       
   178         EFsTreeListTextSizeIncreased,
       
   179         
       
   180         /**
       
   181          * Text size in all the items/nodes in the list has decreased.
       
   182          * No action required.
       
   183          */
       
   184         EFsTreeListTextSizeDecreased,
       
   185         
       
   186         /**
       
   187          * Node change state to unrolled.
       
   188          * No action required.
       
   189          */
       
   190         EFsTreeListNodeUnrolled,
       
   191         
       
   192         /**
       
   193          * Node change state to rolled.
       
   194          * No action required.
       
   195          */
       
   196         EFsTreeListNodeRolled,
       
   197         
       
   198         /**
       
   199          * List received focus
       
   200          */
       
   201         EFsTreeListFocusReceived,
       
   202 
       
   203         /**
       
   204          * List lost focus
       
   205          */          
       
   206         EFsTreeListFocusLost,
       
   207         
       
   208         /**
       
   209          * Item has been selected
       
   210          */
       
   211         EFsTreeItemSelected,
       
   212         
       
   213         /**
       
   214          * Item with menu has been selected
       
   215          */ 
       
   216         EFsTreeItemWithMenuSelected,
       
   217         
       
   218         /**
       
   219          * Right click on list.
       
   220          */
       
   221         EFsTreeListKeyRightArrow,
       
   222         
       
   223         /**
       
   224          * Left click on list.
       
   225          */
       
   226         EFsTreeListKeyLeftArrow,
       
   227 
       
   228         // <cmail>
       
   229 
       
   230         /**
       
   231          * Event generated when a single node is collapsed.
       
   232          */
       
   233         EFsTreeListItemCollapsed,
       
   234 
       
   235         /**
       
   236          * Event generated when a single node is expanded.
       
   237          */
       
   238         EFsTreeListItemExpanded,
       
   239 
       
   240         /**
       
   241          * Event generated when all nodes are collapsed.
       
   242          */
       
   243         EFsTreeListCollapsedAll,
       
   244 
       
   245         /**
       
   246          * Event generated when all nodes are expanded.
       
   247          */
       
   248         EFsTreeListExpandedAll
       
   249 
       
   250         // </cmail>
       
   251         };    
       
   252 
       
   253 public:
       
   254 
       
   255     /**
       
   256      * Observer of the tree list is notified of changes in the tree list
       
   257      * through this function.
       
   258      * 
       
   259      * @param aEvent Event which happend in the tree list.
       
   260      * @param aId Id of the node/item associated with the event. KFsTreeNoneID
       
   261      *            means that the event is not associated with a node/item.
       
   262      */
       
   263     // <cmail> Touch
       
   264     virtual void TreeListEventL( const TFsTreeListEvent aEvent, 
       
   265                                 const TFsTreeItemId aId = KFsTreeNoneID ) = 0;
       
   266     // </cmail>
       
   267     
       
   268     };
       
   269     
       
   270      
       
   271 #endif // M_FSTREELISTOBSERVER_H