2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * Wrappers for standard note types
21 #ifndef __AknNoteWrappers_H__
22 #define __AknNoteWrappers_H__
25 #include <aknnotedialog.h>
26 #include <AknQueryDialog.h>
29 class TResourceReader;
35 void ReadFromResource(TResourceReader& aResReader);
38 CAknNoteDialog::TTimeout iTimeout;
39 CAknNoteDialog::TTone iTone;
44 * Base class for implementing commonly used notes.
46 class CAknNoteWrapper : public CAknNoteDialog
50 * Class default constructor.
52 * Does not do anything
54 IMPORT_C CAknNoteWrapper();
56 * Another class constructor
58 * Accept self pointer to CEikDialog* in order to NULL
59 * client pointer when a non modal note is dismissed.
61 * @param aSelfPtr Address of the dialog pointer
63 IMPORT_C CAknNoteWrapper(CAknNoteWrapper** aSelfPtr);
65 * Construct and display the dialog.
67 * Create a TAknNoteResData object by reading from resource file.
68 * Set the timeout, set the tone (unless they have already been set)
71 * @see SetTimeout, SetTone
73 * @param aResId Resource file ID
75 IMPORT_C TInt ExecuteLD(TInt aResId);
77 * Construct and display the dialog
79 * Construct a TAknNoteResData object by reading from resource file.
80 * Set the prompt calling SetTextL. Set the timeout, set the
81 * tone (unless they have already been set) and call RunLD.
83 * @see SetTimeout, SetTone
85 * @param aResId Resource file ID
86 * @param aPrompt Note text
88 IMPORT_C TInt ExecuteLD(TInt aResId, const TDesC& aPrompt);
92 * HandlePointerEventL Processes the pointer event directed at any note dialogs.
93 * @param aPointerEvent the pointer event to be processed.
95 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
100 IMPORT_C void* ExtensionInterface( TUid aInterface );
102 IMPORT_C virtual void CEikDialog_Reserved_1();
103 IMPORT_C virtual void CEikDialog_Reserved_2();
105 IMPORT_C virtual void CAknNoteDialog_Reserved();
107 TAknNoteResData ReadResDataAndPrepareL(TInt aResId);
112 * HandleDialogPageEventL is the interface method used by CEikDialogPage to
113 * signal the note that the some event happened on dialog page
115 * @param aEventID event to be handled
117 IMPORT_C virtual void HandleDialogPageEventL( TInt aEventID );
119 IMPORT_C virtual void Reserved1();
123 * Helper base class for implementing specialised note classes.
124 * Using this class makes it unneccessary to overload ExecuteLD
125 * in the specialised classes.
127 class CAknResourceNoteDialog : public CAknNoteWrapper
131 * Construct and display the dialog.
133 * Using the resource ID stored in the constructor call the
134 * corresponding ExecuteLD method in CAknNoteWrapper.
136 * @see CAknNoteWrapper::ExecuteLD
139 IMPORT_C TInt ExecuteLD();
141 * Construct, set the prompt and display the dialog.
143 * Using the resource ID stored in the constructor call the
144 * corresponding ExecuteLD method in CAknNoteWrapper.
146 * @see CAknNoteWrapper::ExecuteLD
149 IMPORT_C TInt ExecuteLD(const TDesC& aPrompt);
152 * Handles pointer events
154 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
162 * @param aResId The resource ID
164 inline CAknResourceNoteDialog(TInt aResId)
170 * Another class constructor.
172 * Store resource ID. Accept self pointer to CEikDialog* in order
173 * to NULL the dialog client pointer when a non modal note is
176 * @param aResId The resource ID
177 * @param aSelfPtr Address to itself. The pointer must be valid when the
178 * dialog is dismissed and must not be on the stack.
180 inline CAknResourceNoteDialog(TInt aResId, CAknNoteWrapper** aSelfPtr)
181 : CAknNoteWrapper(aSelfPtr), iResId(aResId)
188 IMPORT_C void* ExtensionInterface( TUid aInterface );
190 IMPORT_C virtual void CEikDialog_Reserved_1();
191 IMPORT_C virtual void CEikDialog_Reserved_2();
193 IMPORT_C virtual void CAknNoteDialog_Reserved();
194 private: // new virtual function
195 IMPORT_C virtual void CAknResourceNoteDialog_Reserved();
202 * Wrapper for CAknNoteDialog implementing a Confirmation Note as
203 * from S60 specifications.
205 class CAknConfirmationNote : public CAknResourceNoteDialog
209 * Default constructor.
211 * Create a CAknResourceNoteDialog using
212 * R_AKN_CONFIRMATION_NOTE
214 IMPORT_C CAknConfirmationNote();
216 * Another class constructor.
218 * Create a CAknResourceNoteDialog using
219 * R_AKN_CONFIRMATION_NOTE_WAIT or R_AKN_CONFIRMATION_NOTE
220 * depending on the specified parameter
222 * @param aWaitingDialog If true use R_AKN_CONFIRMATION_NOTE_WAIT,
223 * else use R_AKN_CONFIRMATION_NOTE
225 IMPORT_C CAknConfirmationNote( TBool aWaitingDialog );
227 * Another class constructor.
229 * Create a CAknResourceNoteDialog using
230 * R_AKN_CONFIRMATION_NOTE. Accept self pointer to CEikDialog*
231 * in order to NULL client pointer when a non modal note is dismissed.
233 * @param aSelfPtr Address of the dialog pointer
235 IMPORT_C CAknConfirmationNote(CAknConfirmationNote** aSelfPtr);
238 * Handles pointer events
240 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
245 IMPORT_C void* ExtensionInterface( TUid aInterface );
247 IMPORT_C virtual void CEikDialog_Reserved_1();
248 IMPORT_C virtual void CEikDialog_Reserved_2();
250 IMPORT_C virtual void CAknNoteDialog_Reserved();
252 IMPORT_C virtual void CAknResourceNoteDialog_Reserved();
256 * Wrapper for CAknNoteDialog implementing an Information Note as
257 * from S60 specifications.
259 class CAknInformationNote : public CAknResourceNoteDialog
263 * Default constructor.
265 * Create a CAknResourceNoteDialog using
266 * R_AKN_INFORMATION_NOTE
268 IMPORT_C CAknInformationNote();
270 * Another class constructor.
272 * Create a CAknResourceNoteDialog using
273 * R_AKN_INFORMATION_NOTE_WAIT or R_AKN_INFORMATION_NOTE
274 * depending on the specified parameter
276 * @param aWaitingDialog If true use R_AKN_INFORMATION_NOTE_WAIT,
277 * else use R_AKN_INFORMATION_NOTE
279 IMPORT_C CAknInformationNote( TBool aWaitingDialog );
281 * Another class constructor.
283 * Create a CAknResourceNoteDialog using
284 * R_AKN_INFORMATION_NOTE. Accept self pointer to CEikDialog*
285 * in order to NULL client pointer when a non modal note is dismissed.
287 * @param aSelfPtr Address of the dialog pointer
289 IMPORT_C CAknInformationNote(CAknInformationNote** aSelfPtr);
292 * Handles pointer events
294 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
299 IMPORT_C void* ExtensionInterface( TUid aInterface );
301 IMPORT_C virtual void CEikDialog_Reserved_1();
302 IMPORT_C virtual void CEikDialog_Reserved_2();
304 IMPORT_C virtual void CAknNoteDialog_Reserved();
306 IMPORT_C virtual void CAknResourceNoteDialog_Reserved();
310 * Wrapper for CAknNoteDialog implementing an Error Note as
311 * from S60 specifications.
313 class CAknErrorNote : public CAknResourceNoteDialog
317 * Default constructor.
319 * Create a CAknResourceNoteDialog using
322 IMPORT_C CAknErrorNote();
324 * Another class constructor.
326 * Create a CAknResourceNoteDialog using
327 * R_AKN_ERROR_NOTE_WAIT or R_AKN_ERROR_NOTE
328 * depending on the specified parameter
330 * @param aWaitingDialog If true use R_AKN_ERROR_NOTE_WAIT,
331 * else use R_AKN_ERROR_NOTE
333 IMPORT_C CAknErrorNote( TBool aWaitingDialog );
335 * Another class constructor.
337 * Create a CAknResourceNoteDialog using
338 * R_AKN_ERROR_NOTE. Accept self pointer to CEikDialog*
339 * in order to NULL client pointer when a non modal note is dismissed.
341 * @param aSelfPtr Address of the dialog pointer
343 IMPORT_C CAknErrorNote(CAknErrorNote** aSelfPtr);
345 * From CCoeControl. Handles pointer event
346 * @param aPointerEvent Pointer event to be handled
348 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
353 IMPORT_C void* ExtensionInterface( TUid aInterface );
355 IMPORT_C virtual void CEikDialog_Reserved_1();
356 IMPORT_C virtual void CEikDialog_Reserved_2();
358 IMPORT_C virtual void CAknNoteDialog_Reserved();
360 IMPORT_C virtual void CAknResourceNoteDialog_Reserved();
364 * Wrapper for CAknNoteDialog implementing a Warning Note as
365 * from S60 specifications.
367 class CAknWarningNote : public CAknResourceNoteDialog
371 * Default constructor.
373 * Create a CAknResourceNoteDialog using
376 IMPORT_C CAknWarningNote();
378 * Another class constructor.
380 * Create a CAknResourceNoteDialog using
381 * R_AKN_WARNING_NOTE_WAIT or R_AKN_WARNING_NOTE
382 * depending on the specified parameter
384 * @param aWaitingDialog If true use R_AKN_WARNING_NOTE_WAIT,
385 * else use R_AKN_WARNING_NOTE
387 IMPORT_C CAknWarningNote( TBool aWaitingDialog );
389 * Another class constructor.
391 * Create a CAknResourceNoteDialog using
392 * R_AKN_WARNING_NOTE. Accept self pointer to CEikDialog*
393 * in order to NULL client pointer when a non modal note is dismissed.
395 * @param aSelfPtr Address of the dialog pointer
397 IMPORT_C CAknWarningNote(CAknWarningNote** aSelfPtr);
400 * Handles pointer events
402 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
407 IMPORT_C void* ExtensionInterface( TUid aInterface );
409 IMPORT_C virtual void CEikDialog_Reserved_1();
410 IMPORT_C virtual void CEikDialog_Reserved_2();
412 IMPORT_C virtual void CAknNoteDialog_Reserved();
414 IMPORT_C virtual void CAknResourceNoteDialog_Reserved();