epoc32/include/mw/aknnotedialog.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@2
     1
/*
williamr@2
     2
* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     3
* All rights reserved.
williamr@2
     4
* This component and the accompanying materials are made available
williamr@4
     5
* under the terms of "Eclipse Public License v1.0"
williamr@2
     6
* which accompanies this distribution, and is available
williamr@4
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@2
     8
*
williamr@2
     9
* Initial Contributors:
williamr@2
    10
* Nokia Corporation - initial contribution.
williamr@2
    11
*
williamr@2
    12
* Contributors:
williamr@2
    13
*
williamr@2
    14
* Description: 
williamr@2
    15
*     Provides the CAknDialog-derived interface to Avkon Notes.
williamr@2
    16
*
williamr@2
    17
*/
williamr@2
    18
williamr@2
    19
williamr@2
    20
#ifndef __AKNNOTEDIALOG__
williamr@2
    21
#define __AKNNOTEDIALOG__
williamr@2
    22
williamr@2
    23
#include <eikdialg.h>
williamr@2
    24
#include "avkon.hrh"
williamr@2
    25
class CEikImage;
williamr@2
    26
class CAknKeySoundSystem;
williamr@2
    27
class CAknNoteControl;
williamr@2
    28
class CAknNoteAttributes;
williamr@2
    29
class CAknNoteDialogExtension;
williamr@2
    30
williamr@2
    31
williamr@2
    32
/**
williamr@2
    33
 * The note dialog.
williamr@2
    34
 *
williamr@2
    35
 * Displays a note to the user for: <UL> <LI> Giving notifications. </LI>
williamr@2
    36
 * <LI> Asking questions. </LI> <LI> Showing progress. </LI> </UL>
williamr@2
    37
 *
williamr@2
    38
 * @see CAknNoteControl, CAknNoteAttributes, CAknText
williamr@2
    39
 */
williamr@2
    40
class CAknNoteDialog : public CEikDialog
williamr@2
    41
{
williamr@2
    42
williamr@2
    43
public:
williamr@2
    44
williamr@2
    45
    /**
williamr@2
    46
     * The timeout in microseconds for automatically deleting the dialog.
williamr@2
    47
     */
williamr@2
    48
    enum TTimeout {
williamr@2
    49
williamr@2
    50
        /** 
williamr@2
    51
         * Deprecated (not used).
williamr@2
    52
         * 
williamr@2
    53
         * @deprecated
williamr@2
    54
         */
williamr@2
    55
    EUndefinedTimeout = 0,   
williamr@2
    56
    /// No timeout  
williamr@2
    57
    ENoTimeout = 0,         
williamr@2
    58
    /// 1.5 seconds 
williamr@2
    59
    EShortTimeout = 1500000,
williamr@2
    60
    /// 3 seconds
williamr@2
    61
    ELongTimeout = 3000000,
williamr@2
    62
    /// 0.5 second
williamr@2
    63
    EShortestTimeout = 500000   
williamr@2
    64
    };
williamr@2
    65
williamr@2
    66
    /**
williamr@2
    67
    * The tone played before the dialog is shown.
williamr@2
    68
    *
williamr@2
    69
    * Application specific tones may be played by casting the application
williamr@2
    70
    * defined Sound ID (SID), to @c TTone.
williamr@2
    71
    */
williamr@2
    72
    enum TTone {
williamr@2
    73
williamr@2
    74
        /** No tone is played. */
williamr@2
    75
        ENoTone = 0,		
williamr@2
    76
williamr@2
    77
        /** A confirmation tone is played. */
williamr@2
    78
        EConfirmationTone = EAvkonSIDConfirmationTone, 
williamr@2
    79
williamr@2
    80
        /** A warning tone is played. */
williamr@2
    81
        EWarningTone = EAvkonSIDWarningTone,      
williamr@2
    82
williamr@2
    83
        /** An error tone is played. */
williamr@2
    84
        EErrorTone = EAvkonSIDErrorTone         
williamr@2
    85
    };
williamr@2
    86
williamr@2
    87
public:
williamr@2
    88
williamr@2
    89
    /**
williamr@2
    90
     * C++ default constructor. 
williamr@2
    91
     *
williamr@2
    92
     * Initialises the tone to @c ENoTone and the timeout to @c ENoTimeout. 
williamr@2
    93
     *
williamr@2
    94
     * @see @c TTone, @c TTimeout.
williamr@2
    95
     */
williamr@2
    96
    IMPORT_C CAknNoteDialog();
williamr@2
    97
williamr@2
    98
    /**
williamr@2
    99
     * C++ default constructor.
williamr@2
   100
     *
williamr@2
   101
     * Initialises the tone to @c aTone and the timeout to @c aTimeout. 
williamr@2
   102
     *
williamr@2
   103
     * @param aTone The tone to be played.
williamr@2
   104
     * @param aTimeout The timeout (microseconds). Default is @c ENoTimeout.
williamr@2
   105
     * @see @c TTone, @c TTimeout.
williamr@2
   106
     */
williamr@2
   107
    IMPORT_C CAknNoteDialog(const TTone& aTone, 
williamr@2
   108
                            const TTimeout& aTimeout = ENoTimeout);
williamr@2
   109
williamr@2
   110
    /**
williamr@2
   111
     * C++ default constructor.
williamr@2
   112
     *
williamr@2
   113
     * Initialises the tone to @c aTone and the timeout to @c aTimeout. 
williamr@2
   114
     * Accepts a pointer to @c CEikDialog*. This must be the address of 
williamr@2
   115
     * the dialog pointer. When the dialog deletes itself after a timeout, 
williamr@2
   116
     * the address pointed to by this pointer is set to NULL. The dialog must
williamr@2
   117
     * not be on the stack, it must be on the heap!
williamr@2
   118
     *
williamr@2
   119
     * @param aSelfPtr Pointer to the address of the dialog.
williamr@2
   120
     * @param aTone = @c ENoTone The tone. 
williamr@2
   121
     * @param aTimeout = @c ENoTimeout The timeout (microseconds). 
williamr@2
   122
     * @see @c TTone, @c TTimeout.
williamr@2
   123
     */
williamr@2
   124
    IMPORT_C CAknNoteDialog(CEikDialog** aSelfPtr, 
williamr@2
   125
                            const TTone& aTone = ENoTone, 
williamr@2
   126
                            const TTimeout& aTimeout = ENoTimeout);
williamr@2
   127
williamr@2
   128
    /**
williamr@2
   129
     * Destructor. 
williamr@2
   130
     *
williamr@2
   131
     * Deletes timer and control attributes. If the self pointer is not null, 
williamr@2
   132
     * sets the pointer to point to NULL. 
williamr@2
   133
     */
williamr@2
   134
    IMPORT_C virtual ~CAknNoteDialog();
williamr@2
   135
williamr@2
   136
    /**
williamr@2
   137
     * Sets the dialog timeout. 
williamr@2
   138
     *
williamr@2
   139
     * @see @c TTimeout.
williamr@2
   140
     * @param aTimeout The dialog timeout.
williamr@2
   141
     */
williamr@2
   142
    IMPORT_C void SetTimeout(const TTimeout& aTimeout);
williamr@2
   143
williamr@2
   144
    /**
williamr@2
   145
     * Sets the dialog tone .
williamr@2
   146
     *
williamr@2
   147
     * @see @c TTone.
williamr@2
   148
     * @param aTone The dialog tone.
williamr@2
   149
     */
williamr@2
   150
    IMPORT_C void SetTone(const TTone& aTone);
williamr@2
   151
williamr@2
   152
    /**
williamr@2
   153
     * Enables or disables text wrapping. 
williamr@2
   154
     *
williamr@2
   155
     * Enables or disables text wrapping depending on the values
williamr@2
   156
     * of @c aEnabled (true enables text wrapping). When text wrapping is
williamr@2
   157
     * disabled a new line in the note dialog starts only after a newline 
williamr@2
   158
     * character in the note text. If a line does not fit into the dialog 
williamr@2
   159
     * width it is clipped (the last character is replaced with an 
williamr@2
   160
     * ellipsis sign).
williamr@2
   161
     *
williamr@2
   162
     * This method must be called before @c SetTextL as it only influences 
williamr@2
   163
     * the wrapping of text that it is yet to be set via API.
williamr@2
   164
     *
williamr@2
   165
     * @param aEnabled @c ETrue for enabling text wrapping, @c EFalse for 
williamr@2
   166
     *        disabling it.
williamr@2
   167
     */
williamr@2
   168
    IMPORT_C void SetTextWrapping(TBool aEnabled);
williamr@2
   169
williamr@2
   170
    /**
williamr@2
   171
     * Enables or disables all text processing done by the dialog.
williamr@2
   172
     * This includes text wrapping, text truncation
williamr@2
   173
     * and reordering of bidirectional text.
williamr@2
   174
     *
williamr@2
   175
     * By default, it is enabled.
williamr@2
   176
     *
williamr@2
   177
     * If text processing is disabled, lines are broken only at explicit 
williamr@2
   178
     * line end characters and they are not truncated, but drawn as long
williamr@2
   179
     * as they fit. Also, the dialog does not handle reordering of 
williamr@2
   180
     * the bidirectional text.
williamr@2
   181
     *
williamr@2
   182
     * This method must be called before the text is set.
williamr@2
   183
     *
williamr@2
   184
     * @param aEnabled Enables or disables all text processing.
williamr@2
   185
     */
williamr@2
   186
    IMPORT_C void SetTextProcessing(TBool aEnabled);
williamr@2
   187
williamr@2
   188
    /**
williamr@2
   189
     * Set the dialog image. 
williamr@2
   190
     *
williamr@2
   191
     * Change the image in the note control. Override the image which was 
williamr@2
   192
     * set in the resource file. The dialog takes ownership of the pointer.
williamr@2
   193
     * The note image is the big image or icon which is top right. 
williamr@2
   194
     *
williamr@2
   195
     * @param aImage Pointer to the new image. 
williamr@2
   196
     */
williamr@2
   197
    IMPORT_C void SetImageL(CEikImage* aImage);
williamr@2
   198
williamr@2
   199
    /**
williamr@2
   200
     * Sets the dialog icon. 
williamr@2
   201
     *
williamr@2
   202
     * Changes the number type icon in the note control. 
williamr@2
   203
     *
williamr@2
   204
     * Overrides the icon which was set in the resource file. The dialog takes 
williamr@2
   205
     * ownership of the pointer The numbertype icon is the small icon which 
williamr@2
   206
     * is bottom left in the note (thumbnail icon). 
williamr@2
   207
     * 
williamr@2
   208
     * @param aIcon Pointer to the icon.
williamr@2
   209
     */
williamr@2
   210
    IMPORT_C void SetIconL(CEikImage* aIcon);
williamr@2
   211
williamr@2
   212
    /**
williamr@2
   213
     * Sets the number in the dialog text. 
williamr@2
   214
     *
williamr@2
   215
     * Sets a number in the note text. If the text specified in the resource 
williamr@2
   216
     * file or via  @c SetTextL() has a \%d in it, e.g. "You have \%d new 
williamr@2
   217
     * messages", this number is inserted at the location specified by \%d.  
williamr@2
   218
     *
williamr@2
   219
     * @param aNumber The number to be inserted in the text.
williamr@2
   220
     */
williamr@2
   221
    IMPORT_C void SetTextNumberL(TInt aNumber);
williamr@2
   222
williamr@2
   223
    /**
williamr@2
   224
     * Sets the text plurality for the dialog. 
williamr@2
   225
     *
williamr@2
   226
     * Indicates whether to use plural or singular text. These texts must 
williamr@2
   227
     * have been specified in the resource file.
williamr@2
   228
     *
williamr@2
   229
     * @see @c SetTextNumberL().
williamr@2
   230
     * @param isPlural @c ETrue if plural text should be used, 
williamr@2
   231
     *        @c EFalse otherwise.
williamr@2
   232
     */
williamr@2
   233
    IMPORT_C void SetTextPluralityL(const TBool isPlural);
williamr@2
   234
williamr@2
   235
    /**
williamr@2
   236
     * Sets the dialog text.
williamr@2
   237
     *
williamr@2
   238
     * This method can set a formatted text, 
williamr@2
   239
     * e.g. "You have 1 new message". It can however set an 
williamr@2
   240
     * unformatted text as well, e.g. "You have \%d messages". The plurality of
williamr@2
   241
     * the dialog must be previously specified - if not singular 
williamr@2
   242
     * plurality is used unless there was no singular text specified in the 
williamr@2
   243
     * resource file.
williamr@2
   244
     *
williamr@2
   245
     * @see @c SetTextNumberL(), @c SetTextPluralityL().
williamr@2
   246
     * @param aLabel The note text.
williamr@2
   247
     */
williamr@2
   248
    IMPORT_C void SetTextL(const TDesC& aLabel);
williamr@2
   249
williamr@2
   250
    /**
williamr@2
   251
     * From @c CCoeControl.
williamr@2
   252
     * 
williamr@2
   253
     * Handles key events. 
williamr@2
   254
     *
williamr@2
   255
     * Any event which is not a key press is forwarded to 
williamr@2
   256
     * @c CEikDialog::OfferKeyEventL.
williamr@2
   257
     '
williamr@2
   258
     * Short key press dismiss the note by calling @c StaticDeleteL.
williamr@2
   259
     *
williamr@2
   260
     * @see @c StaticDeleteL(), @c TKeyEvent, @c TEventCode.
williamr@2
   261
     * @param aKeyEvent Key event details.
williamr@2
   262
     * @param aType Type of event (key down, key press, key release, etc).
williamr@2
   263
     * @return Indicates whether or not the key event was used 
williamr@2
   264
     *         by this control. @c EKeyWasConsumed if the control takes action
williamr@2
   265
     *         on the key event or @c EKeyWasNotConsumed otherwise.
williamr@2
   266
     */
williamr@2
   267
    IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,
williamr@2
   268
                                         TEventCode aType);
williamr@2
   269
williamr@2
   270
    /**
williamr@2
   271
     * From @c CCoeControl.
williamr@2
   272
     * 
williamr@2
   273
     * Handles a change to the control's resources of type @c aType
williamr@2
   274
     * which are shared across the environment, e.g. colors or fonts.
williamr@2
   275
     *
williamr@2
   276
     * @param aType Target resource type.
williamr@2
   277
     */
williamr@2
   278
    IMPORT_C void HandleResourceChange(TInt aType);
williamr@2
   279
williamr@2
   280
    /**
williamr@2
   281
     * Do layout and draw the note dialog. 
williamr@2
   282
     *
williamr@2
   283
     * Needed when changing control components (e.g. the text) dynamically. 
williamr@2
   284
     * This is needed because the size of the dialog might change 
williamr@2
   285
     * (e.g. because of bigger text displayed in more lines, etc.)  
williamr@2
   286
     * Set methods call @c LayoutAndDraw() if there is a change that
williamr@2
   287
     * might affect the dialog layout (e.g. text becames bigger and hence
williamr@2
   288
     * requires an extra line).
williamr@2
   289
     *
williamr@2
   290
     * Derived classes that implement this kind of methods should call
williamr@2
   291
     * @c LayoutAndDraw().
williamr@2
   292
     */
williamr@2
   293
    IMPORT_C void LayoutAndDraw();
williamr@2
   294
williamr@2
   295
    /**
williamr@2
   296
     * From @ CEikDialog. 
williamr@2
   297
     *
williamr@2
   298
     * Executes a dialog.
williamr@2
   299
     *
williamr@2
   300
     * Plays a tone (if one was defined) and simulates user activity.
williamr@2
   301
     * Forwards call to @c CEikDialog::RunLD().
williamr@2
   302
     *
williamr@2
   303
     * @return The ID of the button used to dismiss the dialog.
williamr@2
   304
     */
williamr@2
   305
    IMPORT_C virtual TInt RunLD();
williamr@2
   306
williamr@2
   307
williamr@2
   308
    /**
williamr@2
   309
     * From @c CEikDialog. 
williamr@2
   310
     *
williamr@2
   311
     * Exits a sleeping dialog without deleting it.
williamr@2
   312
     */
williamr@2
   313
    IMPORT_C void ExitSleepingDialog();
williamr@2
   314
williamr@2
   315
protected:
williamr@2
   316
williamr@2
   317
    /**
williamr@2
   318
     * From @c CEikDialog. 
williamr@2
   319
     *
williamr@2
   320
     * Sets the size and the position for the layout. 
williamr@2
   321
     *
williamr@2
   322
     * The dialog height and width are retrieved from the control  
williamr@2
   323
     * (if it exists already).If it does not exist, then default values 
williamr@2
   324
     * are used. The client rect is obtained from the application UI. 
williamr@2
   325
     * @c AknLayoutUtils::LayoutControl  is then executed using the client
williamr@2
   326
     * rect and the note width and height.
williamr@2
   327
     * 
williamr@2
   328
     * @see @c AknLayoutUtils::LayoutControl().
williamr@2
   329
     * @param aSize Not used. 
williamr@2
   330
     */
williamr@2
   331
    IMPORT_C void SetSizeAndPosition(const TSize& aSize);
williamr@2
   332
williamr@2
   333
    /**
williamr@2
   334
     * From @c CEikDialog. 
williamr@2
   335
     *
williamr@2
   336
     * Performs dynamic operations before the layout. 
williamr@2
   337
     *
williamr@2
   338
     * Called by the Uikon framework before the dialog layout is executed, this
williamr@2
   339
     * method can be overrwritten to perform specific operations.
williamr@2
   340
     *
williamr@2
   341
     * The following operations are performed:- <UL> <LI> The control attributes
williamr@2
   342
     * are transferred to the control. The local control attributes are copied 
williamr@2
   343
     * into the real control attributes. The local attributes are then deleted.
williamr@2
   344
     * </LI> <LI> If a timeout has been specified the timer is started. The 
williamr@2
   345
     * callback is StaticDeleteL. </LI> <LI> </LI> </UL> 
williamr@2
   346
     * 
williamr@2
   347
     * @see @c CAknNoteAttributes, @c TTimer, @c SetEditableL().
williamr@2
   348
     */
williamr@2
   349
    IMPORT_C void PreLayoutDynInitL(void);
williamr@2
   350
williamr@2
   351
    /**
williamr@2
   352
     * From @c CEikDialog. 
williamr@2
   353
     *
williamr@2
   354
     * Performs dynamic operations after the layout. 
williamr@2
   355
     *
williamr@2
   356
     * Called by the Uikon framework after the dialog layout is executed, this
williamr@2
   357
     * method can be overrwritten to perform specific operations.
williamr@2
   358
     *
williamr@2
   359
     * The following operations are performed:- <UL> <LI> @c StartAnimationL()
williamr@2
   360
     * is called. </LI> </UL> 
williamr@2
   361
     * 
williamr@2
   362
     * @see @c CAknNoteControl::StartAnimationL().
williamr@2
   363
     */
williamr@2
   364
    IMPORT_C void PostLayoutDynInitL();
williamr@2
   365
williamr@2
   366
    /**
williamr@2
   367
     * Plays a tone. 
williamr@2
   368
     *
williamr@2
   369
     * The tone must be previously specified. The sound ID is set 
williamr@2
   370
     * depending on the tone type. The tone is played using 
williamr@2
   371
     * @c CAknKeySoundSystem::playSound(). Derived classes must call this 
williamr@2
   372
     * method if they override @c RunLD() and they wish to play a tone. 
williamr@2
   373
     *
williamr@2
   374
     * @panic EAknPanicNullPointer
williamr@2
   375
     * @see @c TTone, @c CAknKeySoundSystem, @c CAknNoteDialog::RunLD().
williamr@2
   376
     */
williamr@2
   377
    IMPORT_C void PlayTone();
williamr@2
   378
williamr@2
   379
    /**
williamr@2
   380
     * Indicates that there is user activity. 
williamr@2
   381
     *
williamr@2
   382
     * Resets timers which are monitoring user inactivity. This will disable 
williamr@2
   383
     * functionality that checks for user inactivity by listening to 
williamr@2
   384
     * these timers.
williamr@2
   385
     *
williamr@2
   386
     * Derived classes must call this method if they override @c RunLD()
williamr@2
   387
     * and they wish to report user activity in order to dismiss applications
williamr@2
   388
     * such as the screen saver.
williamr@2
   389
     *
williamr@2
   390
     * @see @c User::ResetInactivityTime().
williamr@2
   391
     */
williamr@2
   392
    IMPORT_C void ReportUserActivity() const;
williamr@2
   393
williamr@2
   394
    /**
williamr@2
   395
     * Deletes the note dialog.
williamr@2
   396
     *
williamr@2
   397
     * Called when the timer completes, this method deletes the dialog. A
williamr@2
   398
     * @c reinterpret_cast to @c CAknNoteDialog* is performed on aThis. If the
williamr@2
   399
     * dialog is not a sleeping note then it is deleted. If it is a sleeping
williamr@2
   400
     * dialog then the timer is stopped, @c OkToExitL() is called with 
williamr@2
   401
     * @c KErrCancel and @c ExitSleepingDialog is executed. 
williamr@2
   402
     * 
williamr@2
   403
     * @see @c TTimer, @c OkToExitL(), @c ExitSleepingDialog().
williamr@2
   404
     * @param aThis Pointer to the dialog.
williamr@2
   405
     * @return Always returns @c EFalse.
williamr@2
   406
     */
williamr@2
   407
    IMPORT_C static TInt StaticDeleteL(TAny* aThis);
williamr@2
   408
williamr@2
   409
    /**
williamr@2
   410
     * Gets the control attributes.
williamr@2
   411
     *
williamr@2
   412
     * If the control has already been created this method return the 
williamr@2
   413
     * attributes stored inside the control. If not then the local 
williamr@2
   414
     * attributes are returned. The local attributes are transferred to the 
williamr@2
   415
     * control in @c PreLayoutDynInitL().
williamr@2
   416
     *
williamr@2
   417
     * Derived classes should use this method when trying to access the control
williamr@2
   418
     * attributes.
williamr@2
   419
     * 
williamr@2
   420
     * @return Control attributes.
williamr@2
   421
     */
williamr@2
   422
    IMPORT_C CAknNoteAttributes* ControlAttributes();
williamr@2
   423
williamr@2
   424
    /**
williamr@2
   425
     * Transfers the control attributes from the dialog to the control.
williamr@2
   426
     *
williamr@2
   427
     * Must be called by derived classes in @c PreLayoutDynInitL()
williamr@2
   428
     * if this method is not called then the set of API methods that were
williamr@2
   429
     * invoked before the control is created will not work.
williamr@2
   430
     */
williamr@2
   431
    IMPORT_C void TransferControlAttributes();
williamr@2
   432
williamr@2
   433
    /**
williamr@2
   434
     * Gets the used sound system.
williamr@2
   435
     *
williamr@2
   436
     * Calls @c iEikonEnv->AppUi()->KeySounds() and returns the pointer 
williamr@2
   437
     * returned by the called method. If there is no application UI 
williamr@2
   438
     * return @c NULL. 
williamr@2
   439
     *
williamr@2
   440
     * @see @c CAknKeySoundSystem, @c CAknAppUi.
williamr@2
   441
     * @return Pointer to the used @c CAknKeySoundSystem or @c NULL.
williamr@2
   442
     * @panic EAknPanicNullPointer
williamr@2
   443
     */
williamr@2
   444
    IMPORT_C CAknKeySoundSystem* SoundSystem() const;
williamr@2
   445
williamr@2
   446
    /**
williamr@2
   447
     * Gets the Note control. 
williamr@2
   448
     *
williamr@2
   449
     * Returns the first control on the active page, which is of type
williamr@2
   450
     * @c CAknNoteControl. If no control is found (usually because the 
williamr@2
   451
     * control has not been created yet) then this method returns @c NULL.
williamr@2
   452
     *
williamr@2
   453
     * Derived classes must use this method to get access to the note
williamr@2
   454
     * control.
williamr@2
   455
     *
williamr@2
   456
     * @return Pointer to the note control or @c NULL.
williamr@2
   457
     */
williamr@2
   458
    IMPORT_C CAknNoteControl* NoteControl();
williamr@2
   459
williamr@2
   460
private:
williamr@2
   461
    
williamr@2
   462
    void DbgCheckSelfPtr(CEikDialog** aSelfPtr);
williamr@2
   463
williamr@2
   464
protected:
williamr@2
   465
williamr@2
   466
    /**
williamr@2
   467
     * Note timeout timer.
williamr@2
   468
     */ 
williamr@2
   469
    CPeriodic*          iTimer;		
williamr@2
   470
williamr@2
   471
    /** 
williamr@2
   472
     * Note timeout in microseconds.
williamr@2
   473
     */ 
williamr@2
   474
    TInt                iTimeoutInMicroseconds; 
williamr@2
   475
williamr@2
   476
    /**
williamr@2
   477
     * Used for notes that are not modal. 
williamr@2
   478
     * The calling application has no way of knowing 
williamr@2
   479
     * when the note is deleted. 
williamr@2
   480
     */
williamr@2
   481
    CEikDialog**        iSelfPtr; 
williamr@2
   482
williamr@2
   483
    /**
williamr@2
   484
     * The tone to be played. 
williamr@2
   485
     */
williamr@2
   486
    TTone               iTone;	
williamr@2
   487
williamr@2
   488
    /**
williamr@2
   489
     * Note control attributes.
williamr@2
   490
     */
williamr@2
   491
    CAknNoteAttributes* iControlAttributes;  
williamr@2
   492
williamr@2
   493
private:
williamr@2
   494
williamr@2
   495
    //TInt iSpare; 
williamr@2
   496
    CAknNoteDialogExtension* iNoteExtension;
williamr@2
   497
williamr@2
   498
public:
williamr@2
   499
williamr@2
   500
    /**
williamr@2
   501
     * Set timeout, tone, resource ID and then initialize and launch 
williamr@2
   502
     * the dialog. 
williamr@2
   503
     * 
williamr@2
   504
     * This method is deprecated and should not be used.
williamr@2
   505
     * 
williamr@2
   506
     * @deprecated
williamr@2
   507
     * @param aTimeout Wanted timeout in microseconds.
williamr@2
   508
     * @param aTone Alarm tone.
williamr@2
   509
     * @param aResourceID The ID of the wanted resource.
williamr@2
   510
     * @return Zero, unless it is a waiting dialog. For a waiting dialog,
williamr@2
   511
     *         the return value is the ID of the button that closed the dialog,
williamr@2
   512
     *         or zero if it was the cancel button (@c EEikBidCancel).
williamr@2
   513
     */
williamr@2
   514
    IMPORT_C TInt ExecuteDlgLD(const TTimeout aTimeout,
williamr@2
   515
                               const TTone aTone,
williamr@2
   516
                               TInt aResourceID);
williamr@2
   517
williamr@2
   518
    /**
williamr@2
   519
     * Set tone, resource ID and then initialize and launch 
williamr@2
   520
     * the dialog. 
williamr@2
   521
     * 
williamr@2
   522
     * This method is deprecated and should not be used.
williamr@2
   523
     * 
williamr@2
   524
     * @deprecated
williamr@2
   525
     * @param aTone Alarm tone.
williamr@2
   526
     * @param aResourceID The ID of the wanted resource.
williamr@2
   527
     * @return Zero, unless it is a waiting dialog. For a waiting dialog,
williamr@2
   528
     *         the return value is the ID of the button that closed the dialog,
williamr@2
   529
     *         or zero if it was the cancel button (@c EEikBidCancel).
williamr@2
   530
     */
williamr@2
   531
    IMPORT_C TInt ExecuteDlgLD(const TTone aTone,TInt aResourceID);
williamr@2
   532
williamr@2
   533
    /**
williamr@2
   534
     * Set note control ID, resource ID and then initialize and launch 
williamr@2
   535
     * the dialog. 
williamr@2
   536
     * 
williamr@2
   537
     * This method is deprecated and should not be used.
williamr@2
   538
     * 
williamr@2
   539
     * @deprecated
williamr@2
   540
     * @param aResourceId The ID of the wanted resource.
williamr@2
   541
     * @param aNoteControlId Not used. 
williamr@2
   542
     * @return Zero, unless it is a waiting dialog. For a waiting dialog,
williamr@2
   543
     *         the return value is the ID of the button that closed the dialog,
williamr@2
   544
     *         or zero if it was the cancel button (@c EEikBidCancel).
williamr@2
   545
     */
williamr@2
   546
    IMPORT_C TInt ExecuteDlgLD(TInt aResourceId, TInt aNoteControlId=0);
williamr@2
   547
williamr@2
   548
    /**
williamr@2
   549
     * Set timeout and tone and run the dialog.
williamr@2
   550
     *
williamr@2
   551
     * This method is deprecated and should not be used.
williamr@2
   552
     *
williamr@2
   553
     * @deprecated
williamr@2
   554
     * @param aTimeout Wanted timeout in microseconds.
williamr@2
   555
     * @param aTone Wanted alarm tone.
williamr@2
   556
     * @return The ID of the button used to dismiss the dialog.
williamr@2
   557
     */
williamr@2
   558
    IMPORT_C TInt RunDlgLD(const TTimeout aTimeout,const TTone aTone);
williamr@2
   559
williamr@2
   560
    /**
williamr@2
   561
     * Set tone and run the dialog.
williamr@2
   562
     *
williamr@2
   563
     * This method is deprecated and should not be used.
williamr@2
   564
     *
williamr@2
   565
     * @deprecated
williamr@2
   566
     * @param aTone Wanted alarm tone.
williamr@2
   567
     * @return The ID of the button used to dismiss the dialog.
williamr@2
   568
     */    
williamr@2
   569
    IMPORT_C TInt RunDlgLD(const TTone aTone);
williamr@2
   570
williamr@2
   571
    /**
williamr@2
   572
     * Run the dialog.
williamr@2
   573
     *
williamr@2
   574
     * This method is deprecated and should not be used.
williamr@2
   575
     *
williamr@2
   576
     * @deprecated
williamr@2
   577
     * @return The ID of the button used to dismiss the dialog.
williamr@2
   578
     */    IMPORT_C TInt RunDlgLD();
williamr@2
   579
williamr@2
   580
    /**
williamr@2
   581
     * Set NoteControlID and run the dialog.
williamr@2
   582
     *
williamr@2
   583
     * This method is deprecated and should not be used.
williamr@2
   584
     *
williamr@2
   585
     * @deprecated
williamr@2
   586
     * @param aNoteControlId Not used.
williamr@2
   587
     * @return The ID of the button used to dismiss the dialog.
williamr@2
   588
     */    
williamr@2
   589
    IMPORT_C TInt RunDlgLD(TInt aNoteControlId);
williamr@2
   590
williamr@2
   591
    /** 
williamr@2
   592
     * Sets a new label for the specified dialog.
williamr@2
   593
     *
williamr@2
   594
     * This method is deprecated. @c SetTextL() method should be used 
williamr@2
   595
     * instead.
williamr@2
   596
     *
williamr@2
   597
     * @param aControlId Not used.
williamr@2
   598
     * @param aLabel The new label.
williamr@2
   599
     */ 
williamr@2
   600
    IMPORT_C void SetCurrentLabelL(TInt aControlId,const TDesC& aLabel);
williamr@2
   601
williamr@2
   602
private: 
williamr@2
   603
williamr@2
   604
    IMPORT_C virtual void CEikDialog_Reserved_1();
williamr@2
   605
williamr@2
   606
    IMPORT_C virtual void CEikDialog_Reserved_2();	
williamr@2
   607
williamr@2
   608
private: // new virtual function.
williamr@2
   609
williamr@2
   610
    IMPORT_C virtual void CAknNoteDialog_Reserved();
williamr@2
   611
williamr@2
   612
protected:
williamr@2
   613
williamr@2
   614
    // This method id reserved for CEikAlert usage
williamr@2
   615
    /** 
williamr@2
   616
     * Sets an indication that memory should not be allocated.
williamr@2
   617
     * 
williamr@2
   618
     * This method is reserved for CEikAlert usage.
williamr@2
   619
     */ 
williamr@2
   620
    IMPORT_C void SetNoMemoryAllocation();
williamr@2
   621
williamr@2
   622
williamr@2
   623
private: // from eikdialog
williamr@2
   624
williamr@2
   625
    IMPORT_C void SizeChanged();
williamr@2
   626
williamr@2
   627
    void SetSkinBackGroundRect(); 
williamr@2
   628
williamr@2
   629
private:
williamr@2
   630
williamr@2
   631
    void CreateExtensionL();
williamr@2
   632
williamr@2
   633
    static TInt CallbackStartAnimationL(TAny* aThis);
williamr@2
   634
williamr@2
   635
public:
williamr@2
   636
williamr@2
   637
    /**
williamr@2
   638
     * From @c CCoeControl.
williamr@2
   639
     *
williamr@2
   640
     * Processes the pointer event directed to the dialog.
williamr@2
   641
     * 
williamr@2
   642
     * @param aPointerEvent The pointer event directed to the notedialog.
williamr@2
   643
     */
williamr@2
   644
    IMPORT_C virtual void HandlePointerEventL(
williamr@2
   645
                                        const TPointerEvent& aPointerEvent);
williamr@2
   646
williamr@2
   647
private:
williamr@2
   648
williamr@2
   649
    /**
williamr@2
   650
    * From @c CAknControl.
williamr@2
   651
    */
williamr@2
   652
    IMPORT_C void* ExtensionInterface( TUid aInterface );
williamr@2
   653
    };
williamr@2
   654
williamr@2
   655
williamr@2
   656
#endif  // __AKNNOTEDIALOG__
williamr@2
   657
williamr@2
   658
// End of file