equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * 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 |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
8 * |
8 * |
9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
20 #define CAKNSTYLUSPOPUPMENU_H |
20 #define CAKNSTYLUSPOPUPMENU_H |
21 |
21 |
22 |
22 |
23 #include <e32base.h> |
23 #include <e32base.h> |
24 #include <coecobs.h> // MCoeControlObserver |
24 #include <coecobs.h> // MCoeControlObserver |
|
25 #include <babitflags.h> |
25 |
26 |
26 class CAknPreviewPopUpController; |
27 class CAknPreviewPopUpController; |
27 class CAknStylusPopUpMenuContent; |
28 class CAknStylusPopUpMenuContent; |
28 class MEikMenuObserver; |
29 class MEikMenuObserver; |
29 class TResourceReader; |
30 class TResourceReader; |
139 * |
140 * |
140 * @param aPoint Position of the stylus popup menu. |
141 * @param aPoint Position of the stylus popup menu. |
141 * @param aPosType Position type e.g. left-top corner or right-top corner |
142 * @param aPosType Position type e.g. left-top corner or right-top corner |
142 */ |
143 */ |
143 IMPORT_C void SetPosition( const TPoint& aPoint, TPositionType aPosType ); |
144 IMPORT_C void SetPosition( const TPoint& aPoint, TPositionType aPosType ); |
144 |
145 |
145 /** |
146 /** |
146 * Tells the popup menu to recalculate its position. This can be used e.g. |
147 * Tells the popup menu to recalculate its position. This can be used e.g. |
147 * after layout transition. |
148 * after layout transition. |
148 */ |
149 */ |
149 void UpdatePosition(); |
150 void UpdatePosition(); |
|
151 |
|
152 /** |
|
153 * Removes all menu items. |
|
154 * |
|
155 * @internal |
|
156 * @since s60 v5.2 |
|
157 */ |
|
158 void Clear(); |
|
159 |
150 // from base class CCoeControl |
160 // from base class CCoeControl |
151 |
161 |
152 /** |
162 /** |
153 * Constructs the menu from resource. |
163 * Constructs the menu from resource. |
154 * |
164 * |
165 * @param aEventType The event type. |
175 * @param aEventType The event type. |
166 */ |
176 */ |
167 IMPORT_C void HandleControlEventL( CCoeControl* aControl, |
177 IMPORT_C void HandleControlEventL( CCoeControl* aControl, |
168 TCoeEvent aEventType ); |
178 TCoeEvent aEventType ); |
169 |
179 |
170 public: |
|
171 |
|
172 /** |
|
173 * Resets timer that hides popup. |
|
174 */ |
|
175 void ResetTimer(); |
|
176 |
180 |
177 private: |
181 private: |
178 |
182 |
179 /** |
183 /** |
180 * Default constructor |
184 * Default constructor |
191 /** |
195 /** |
192 * 2nd phase constructor |
196 * 2nd phase constructor |
193 */ |
197 */ |
194 void ConstructL(); |
198 void ConstructL(); |
195 |
199 |
|
200 /** |
|
201 * Starts the CIdle |
|
202 */ |
|
203 void StartControllerIdleL(); |
|
204 |
|
205 /** |
|
206 * CIdle callback function |
|
207 */ |
|
208 static TInt ControllerCallBack( TAny* aThis ); |
|
209 |
|
210 /** |
|
211 * Removes the controller |
|
212 */ |
|
213 void RemoveController(); |
|
214 |
196 private: // data |
215 private: // data |
197 |
216 |
198 /** |
217 /** |
199 * Screen relative position where stylus was tapped. |
218 * Screen relative position where stylus was tapped. |
200 */ |
219 */ |
225 * when an option is selected in the stylus popup menu. |
244 * when an option is selected in the stylus popup menu. |
226 * Not own. |
245 * Not own. |
227 */ |
246 */ |
228 CAknPreviewPopUpController* iPreviewPopup; |
247 CAknPreviewPopUpController* iPreviewPopup; |
229 |
248 |
|
249 /** |
|
250 * An idle time active object |
|
251 * Own |
|
252 */ |
|
253 CIdle* iControllerIdle; |
|
254 |
|
255 /** |
|
256 * Position type |
|
257 */ |
|
258 TInt iPositionType; |
|
259 |
|
260 /** |
|
261 * Internal flags. |
|
262 */ |
|
263 TBitFlags iFlags; |
|
264 |
|
265 /** |
|
266 * Used to track if object has been deleted while calling client callback. |
|
267 */ |
|
268 TBool* iIsDeleted; |
230 }; |
269 }; |
231 |
270 |
232 |
271 |
233 #endif // CAKNSTYLUSPOPUPMENU_H |
272 #endif // CAKNSTYLUSPOPUPMENU_H |