author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 15 Sep 2010 12:00:00 +0300 | |
branch | RCL_3 |
changeset 93 | b01126ce0bec |
parent 83 | 5456b4e8b3a8 |
child 102 | ba63c83f4716 |
permissions | -rw-r--r-- |
83 | 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 |
class CFbsBitmap; |
|
28 |
||
29 |
// Class declaration |
|
30 |
||
31 |
/** |
|
32 |
* Holds view data in UiEngine |
|
33 |
* |
|
34 |
* @ingroup group_xnlayoutengine |
|
35 |
* @lib xn3layoutengine.lib |
|
36 |
* @since S60 5.0 |
|
37 |
*/ |
|
38 |
NONSHARABLE_CLASS( CXnViewData ) : public CXnPluginData |
|
39 |
{ |
|
40 |
public: |
|
41 |
// Constructors and destructor |
|
42 |
||
43 |
/** |
|
44 |
* Two-phased constructor. |
|
45 |
*/ |
|
46 |
static CXnViewData* NewL( CXnPluginData& aParent ); |
|
47 |
static CXnViewData* NewLC( CXnPluginData& aParent ); |
|
48 |
||
49 |
~CXnViewData(); |
|
50 |
||
51 |
private: |
|
52 |
// private constructors |
|
53 |
||
54 |
CXnViewData( CXnPluginData& aParent ); |
|
55 |
void ConstructL(); |
|
56 |
||
57 |
public: |
|
58 |
// From CXnPluginData |
|
59 |
||
60 |
/** |
|
61 |
* @see CXnPluginData |
|
62 |
*/ |
|
63 |
TInt Load(); |
|
64 |
||
65 |
/** |
|
66 |
* @see CXnPluginData |
|
67 |
*/ |
|
68 |
void Destroy(); |
|
69 |
||
70 |
/** |
|
71 |
* @see CXnPluginData |
|
72 |
*/ |
|
73 |
void ResourcesL( CArrayPtrSeg< CXnResource >& aList ) const; |
|
74 |
||
75 |
/** |
|
76 |
* @see CXnPluginData |
|
77 |
*/ |
|
78 |
void ControlsL( RPointerArray< CXnControlAdapter >& aList ) const; |
|
79 |
||
80 |
/** |
|
81 |
* @see CXnPluginData |
|
82 |
*/ |
|
83 |
void ContentSourceNodesL( RPointerArray< CXnNode >& aList ) const; |
|
84 |
||
85 |
/** |
|
86 |
* @see CXnPluginData |
|
87 |
*/ |
|
88 |
void InitialFocusNodesL( RPointerArray< CXnNode >& aList ) const; |
|
89 |
||
90 |
/** |
|
91 |
* @see CXnPluginData |
|
92 |
*/ |
|
93 |
void AppearanceNodesL( RPointerArray< CXnNode >& aList ) const; |
|
94 |
||
95 |
/** |
|
96 |
* @see CXnPluginData |
|
97 |
*/ |
|
98 |
void PopupNodesL( RPointerArray< CXnNode >& aList ) const; |
|
99 |
||
100 |
/** |
|
101 |
* @see CXnPluginData |
|
102 |
*/ |
|
103 |
void NotifyPublisherReadyL(); |
|
104 |
||
105 |
public: |
|
106 |
// New functions |
|
107 |
||
108 |
/** |
|
109 |
* Sets viewdata to active/ not active |
|
110 |
* |
|
111 |
* @param aActive ETrue active, EFalse not active |
|
112 |
* @return Activation Error code |
|
113 |
*/ |
|
114 |
TInt SetActive( TBool aActive ); |
|
115 |
||
116 |
/** |
|
117 |
* Returns if active or not |
|
118 |
* |
|
119 |
* @return ETrue active, EFalse otherwise |
|
120 |
*/ |
|
121 |
inline TBool Active() const; |
|
122 |
||
123 |
/** |
|
124 |
* Sets viewdata to be initial |
|
125 |
*/ |
|
126 |
inline void SetInitial(); |
|
127 |
||
128 |
/** |
|
129 |
* Returns if initial or not |
|
130 |
* |
|
131 |
* @return ETrue initial, EFalse otherwise |
|
132 |
*/ |
|
133 |
inline TBool Initial() const; |
|
134 |
||
135 |
/** |
|
136 |
* Sets this view data to use empty widget |
|
137 |
* |
|
138 |
* @param aUse ETrue use, EFalse don't use |
|
139 |
*/ |
|
140 |
inline void SetUseEmptyWidget( TBool aUse ); |
|
141 |
||
142 |
/** |
|
143 |
* Returns whether empty widget is in use in this view |
|
144 |
* |
|
145 |
* @return ETrue if empty widget is used, EFalse otherwise |
|
146 |
*/ |
|
147 |
inline TBool UseEmptyWidget() const; |
|
148 |
||
149 |
/** |
|
150 |
* Finds and reurns plugin/view data for node |
|
151 |
* |
|
152 |
* @param aNode Node |
|
153 |
* @return Plugin data |
|
154 |
*/ |
|
155 |
CXnPluginData* Plugin( CXnNode* aNode ); |
|
156 |
||
157 |
/** |
|
158 |
* Finds and reurns plugin/view data for namespace |
|
159 |
* |
|
160 |
* @param aNamespace Namespace |
|
161 |
* @return Plugin data |
|
162 |
*/ |
|
163 |
CXnPluginData* Plugin( const TDesC8& aNamespace ); |
|
164 |
||
165 |
/** |
|
166 |
* Gets view data's plugin nodes |
|
167 |
* |
|
168 |
* @param aList Data returned in list |
|
169 |
*/ |
|
170 |
void PluginNodesL( RPointerArray< CXnNode >& aList ) const; |
|
171 |
||
172 |
/** |
|
173 |
* return view data's view node |
|
174 |
* |
|
175 |
* @return View node |
|
176 |
*/ |
|
177 |
CXnNode* ViewNode() const; |
|
178 |
||
179 |
/** |
|
180 |
* Set wallpaper image. Ovnership is transferred. |
|
181 |
* |
|
182 |
* @param aBitmap Background image file name. |
|
183 |
*/ |
|
184 |
void SetWallpaperImage( CFbsBitmap* aBitmap ); |
|
185 |
||
186 |
/** |
|
187 |
* Get background image. Ovnership is NOT transferred. |
|
188 |
* |
|
189 |
* @return Pointer to background image. |
|
190 |
* Returns NULL if image has not been set. |
|
191 |
*/ |
|
192 |
CFbsBitmap* WallpaperImage() const; |
|
193 |
||
194 |
/** |
|
195 |
* Set path of the wallpaper image. |
|
196 |
* |
|
197 |
* @param aFileName Image path, including file name. |
|
198 |
*/ |
|
199 |
void SetWallpaperImagePathL( const TDesC& aFileName ); |
|
200 |
||
201 |
/** |
|
202 |
* Get the path of wallpaper image. |
|
203 |
* |
|
204 |
* @return Image path, including file name. |
|
205 |
* Returns KNullCDes if wallpaper has not been set. |
|
206 |
*/ |
|
207 |
const TDesC& WallpaperImagePath() const; |
|
208 |
||
209 |
/** |
|
210 |
* Loads publishers to this view |
|
211 |
*/ |
|
212 |
void LoadPublishers( TInt aReason ); |
|
93
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
213 |
|
83 | 214 |
/** |
215 |
* Destroys all publishers in this view |
|
216 |
* |
|
217 |
* @param aReason Destroy reason |
|
218 |
*/ |
|
219 |
void DestroyPublishers( TInt aReason ); |
|
93
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
220 |
|
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
221 |
/** |
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
222 |
* Gets dirty region of a given node. |
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
223 |
* |
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
224 |
* @return Dirty region if found, otherwise NULL. |
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
225 |
*/ |
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
226 |
TXnDirtyRegion* DirtyRegionL( CXnNode& aNode ); |
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
227 |
|
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
228 |
/** |
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
229 |
* Gets an array of dirty regions. |
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
230 |
* |
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
231 |
* @param aList An array for dirty regions. |
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
232 |
*/ |
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
233 |
void GetDirtyRegions( RPointerArray<TXnDirtyRegion>& aList ); |
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
234 |
|
83 | 235 |
private: |
236 |
// data |
|
237 |
||
238 |
/** Pointer to wallpaper image, Owned */ |
|
239 |
CFbsBitmap* iBgImage; |
|
240 |
/** Path of the wallpaper image, including filename */ |
|
241 |
HBufC* iBgImagePath; |
|
242 |
/** Load error code */ |
|
243 |
TInt iLoadError; |
|
244 |
}; |
|
245 |
||
246 |
#include "xnviewdata.inl" |
|
247 |
||
248 |
#endif // _XNVIEWDATA_H |