|
1 /* |
|
2 * Copyright (c) 2006 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 the tree structure. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef M_AKNTREEOBSERVER_H |
|
20 #define M_AKNTREEOBSERVER_H |
|
21 |
|
22 |
|
23 class CAknTree; |
|
24 class CAknTreeItem; |
|
25 |
|
26 |
|
27 /** |
|
28 * Observer interface for the tree structure. |
|
29 * |
|
30 * Observers of the tree are notified of changes in the tree structure |
|
31 * through this interface with appropriate events. |
|
32 * |
|
33 * @lib aknhlist.lib |
|
34 * @since S60 v3.2 |
|
35 */ |
|
36 class MAknTreeObserver |
|
37 { |
|
38 |
|
39 public: |
|
40 |
|
41 /** Tree events. */ |
|
42 enum TEvent |
|
43 { |
|
44 /** New item is added to the tree. */ |
|
45 EItemAdded, |
|
46 /** Item is moved to another location in tree. */ |
|
47 EItemMoved, |
|
48 /** Item is about to be removed from the tree. Observers are notified |
|
49 with this event before the item is removed. */ |
|
50 EItemRemoveBegin, |
|
51 /** Item is removed from the tree. */ |
|
52 EItemRemoveEnd, |
|
53 /** Tree node is expanded. */ |
|
54 ENodeExpanded, |
|
55 /** Tree node is collapsed. */ |
|
56 ENodeCollapsed, |
|
57 /** Content of a item is changed (item need to be redrawn if visible). */ |
|
58 EItemModified, |
|
59 /** Tree has been sorted. */ |
|
60 ETreeSorted |
|
61 }; |
|
62 |
|
63 /** |
|
64 * Notification of a tree event. The event is specified as a parameter. |
|
65 * |
|
66 * @param aEvent Tree event. |
|
67 * |
|
68 * @param aItem Pointer to the tree item that is concerned by the event. |
|
69 * |
|
70 * @param aDrawNow @c ETrue, if the view should be redrawn after the |
|
71 * event. |
|
72 */ |
|
73 virtual void HandleTreeEvent( TEvent aEvent, CAknTreeItem* aItem, |
|
74 TBool aDrawNow ) = 0; |
|
75 |
|
76 }; |
|
77 |
|
78 |
|
79 #endif // M_AKNTREEOBSERVER_H |