|
1 /* |
|
2 * Copyright (c) 2008 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: Data class to hold widget info |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef _XNVIEWDATA_H |
|
20 #define _XNVIEWDATA_H |
|
21 |
|
22 // User inlcudes |
|
23 #include "xnplugindata.h" |
|
24 |
|
25 // Forward declarations |
|
26 class CXnViewManager; |
|
27 |
|
28 // Constants |
|
29 |
|
30 // Class declaration |
|
31 |
|
32 /** |
|
33 * Holds view data in UiEngine |
|
34 * |
|
35 * @ingroup group_xnlayoutengine |
|
36 * @lib xn3layoutengine.lib |
|
37 * @since S60 5.0 |
|
38 */ |
|
39 NONSHARABLE_CLASS( CXnViewData ) : public CXnPluginData |
|
40 { |
|
41 public: |
|
42 // Constructors and destructor |
|
43 |
|
44 /** |
|
45 * Two-phased constructor. |
|
46 */ |
|
47 static CXnViewData* NewL( CXnPluginData& aParent ); |
|
48 static CXnViewData* NewLC( CXnPluginData& aParent ); |
|
49 |
|
50 ~CXnViewData(); |
|
51 |
|
52 private: |
|
53 // private constructors |
|
54 |
|
55 CXnViewData( CXnPluginData& aParent ); |
|
56 void ConstructL(); |
|
57 |
|
58 public: |
|
59 // From CXnPluginData |
|
60 |
|
61 /** |
|
62 * @see CXnPluginData |
|
63 */ |
|
64 void LoadL(); |
|
65 |
|
66 /** |
|
67 * @see CXnPluginData |
|
68 */ |
|
69 void Destroy(); |
|
70 |
|
71 /** |
|
72 * @see CXnPluginData |
|
73 */ |
|
74 void ResourcesL( CArrayPtrSeg< CXnResource >& aList ) const; |
|
75 |
|
76 /** |
|
77 * @see CXnPluginData |
|
78 */ |
|
79 void ControlsL( RPointerArray< CXnControlAdapter >& aList ) const; |
|
80 |
|
81 /** |
|
82 * @see CXnPluginData |
|
83 */ |
|
84 void ContentSourceNodesL( RPointerArray< CXnNode >& aList ) const; |
|
85 |
|
86 /** |
|
87 * @see CXnPluginData |
|
88 */ |
|
89 void InitialFocusNodesL( RPointerArray< CXnNode >& aList ) const; |
|
90 |
|
91 /** |
|
92 * @see CXnPluginData |
|
93 */ |
|
94 void AppearanceNodesL( RPointerArray< CXnNode >& aList ) const; |
|
95 |
|
96 /* |
|
97 * @see CXnPluginData |
|
98 */ |
|
99 void LoadDataPluginsL(); |
|
100 |
|
101 /* |
|
102 * @see CXnPluginData |
|
103 */ |
|
104 void DataPluginsLoadCompletedL( TInt aStatus ); |
|
105 |
|
106 /* |
|
107 * @see CXnPluginData |
|
108 */ |
|
109 void DestroyDataPluginsL(); |
|
110 |
|
111 /* |
|
112 * @see CXnPluginData |
|
113 */ |
|
114 TBool DataPluginsLoaded() const; |
|
115 |
|
116 public: |
|
117 // New functions |
|
118 |
|
119 /** |
|
120 * Sets viewdata to active/ not active |
|
121 * |
|
122 * @param aActive ETrue active, EFalse not active |
|
123 */ |
|
124 void SetActiveL( TBool aActive ); |
|
125 |
|
126 /** |
|
127 * Returns if active or not |
|
128 * |
|
129 * @return ETrue active, EFalse otherwise |
|
130 */ |
|
131 inline TBool Active() const; |
|
132 |
|
133 /** |
|
134 * Sets viewdata to be initial |
|
135 */ |
|
136 inline void SetInitial(); |
|
137 |
|
138 /** |
|
139 * Returns if initial or not |
|
140 * |
|
141 * @return ETrue initial, EFalse otherwise |
|
142 */ |
|
143 inline TBool Initial() const; |
|
144 |
|
145 /** |
|
146 * Sets focused node |
|
147 * |
|
148 * @param aNode Focused node |
|
149 */ |
|
150 inline void SetFocusedNode( CXnNode* aNode ); |
|
151 |
|
152 /** |
|
153 * Returns focused node |
|
154 * |
|
155 * @return focused node |
|
156 */ |
|
157 inline CXnNode* FocusedNode() const; |
|
158 |
|
159 /** |
|
160 * Sets this view data to use empty widget |
|
161 * |
|
162 * @param aUse ETrue use, EFalse don't use |
|
163 */ |
|
164 inline void SetUseEmptyWidget( TBool aUse ); |
|
165 |
|
166 /** |
|
167 * Returns whether empty widget is in use in this view |
|
168 * |
|
169 * @return ETrue if empty widget is used, EFalse otherwise |
|
170 */ |
|
171 inline TBool UseEmptyWidget() const; |
|
172 |
|
173 /** |
|
174 * Finds and reurns plugin/view data for node |
|
175 * |
|
176 * @param aNode Node |
|
177 * @return Plugin data |
|
178 */ |
|
179 CXnPluginData& Plugin( CXnNode* aNode ); |
|
180 |
|
181 /** |
|
182 * Finds and reurns plugin/view data for namespace |
|
183 * |
|
184 * @param aNamespace Namespace |
|
185 * @return Plugin data |
|
186 */ |
|
187 CXnPluginData* Plugin( const TDesC8& aNamespace ); |
|
188 |
|
189 /** |
|
190 * Gets view data's plugin nodes |
|
191 * |
|
192 * @param aList Data returned in list |
|
193 */ |
|
194 void PluginNodesL( RPointerArray< CXnNode >& aList ) const; |
|
195 |
|
196 /** |
|
197 * return view data's view node |
|
198 * |
|
199 * @return View node |
|
200 */ |
|
201 CXnNode* ViewNode() const; |
|
202 |
|
203 /** |
|
204 * Sets view's locking_status attribute (locked/none) to determine if view |
|
205 * is prevented from removing/deleting or not |
|
206 * |
|
207 * @param aLockingStatusString attr. locking_status ("locked"/"none") |
|
208 */ |
|
209 void SetLockingStatus( const TDesC8& aLockingStatusString ); |
|
210 private: |
|
211 // data |
|
212 |
|
213 /** Focused Node, Not owned */ |
|
214 CXnNode* iFocusedNode; |
|
215 |
|
216 }; |
|
217 |
|
218 #include "xnviewdata.inl" |
|
219 |
|
220 #endif // _XNVIEWDATA_H |