epoc32/include/mw/AknGlobalNote.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100 (2010-03-31)
branchSymbian3
changeset 4 837f303aceeb
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@4
     1
/*
williamr@4
     2
* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies).
williamr@4
     3
* All rights reserved.
williamr@4
     4
* This component and the accompanying materials are made available
williamr@4
     5
* under the terms of "Eclipse Public License v1.0"
williamr@4
     6
* which accompanies this distribution, and is available
williamr@4
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@4
     8
*
williamr@4
     9
* Initial Contributors:
williamr@4
    10
* Nokia Corporation - initial contribution.
williamr@4
    11
*
williamr@4
    12
* Contributors:
williamr@4
    13
*
williamr@4
    14
* Description: 
williamr@4
    15
*
williamr@4
    16
*/
williamr@4
    17
williamr@4
    18
#ifndef __AKNGLOBALNOTENOTIFY_H__
williamr@4
    19
#define __AKNGLOBALNOTENOTIFY_H__
williamr@4
    20
williamr@4
    21
// INCLUDES
williamr@4
    22
#include <AknNotify.h>
williamr@4
    23
#include <AknNotifyStd.h>
williamr@4
    24
williamr@4
    25
// CLASS DECLARATION
williamr@4
    26
williamr@4
    27
/**
williamr@4
    28
*  This class handles the global notes.
williamr@4
    29
*  
williamr@4
    30
*  @since S60 0.9
williamr@4
    31
*/
williamr@4
    32
NONSHARABLE_CLASS(CAknGlobalNote) : public CAknNotifyBase
williamr@4
    33
    {
williamr@4
    34
public: 
williamr@4
    35
    /**
williamr@4
    36
    * Two-phased constructor.
williamr@4
    37
    * @return Pointer to new global note object.
williamr@4
    38
    */
williamr@4
    39
    IMPORT_C static CAknGlobalNote* NewL();
williamr@4
    40
    
williamr@4
    41
    /**
williamr@4
    42
    * Two-phased constructor.
williamr@4
    43
    * @return Pointer to new global note object.
williamr@4
    44
    */
williamr@4
    45
    IMPORT_C static CAknGlobalNote* NewLC();
williamr@4
    46
    
williamr@4
    47
    /**
williamr@4
    48
    * Destructor.
williamr@4
    49
    */
williamr@4
    50
    IMPORT_C ~CAknGlobalNote();
williamr@4
    51
williamr@4
    52
   /**
williamr@4
    53
    * Enable or disable all text processing done by the dialog.
williamr@4
    54
    * This includes text wrapping, text truncation
williamr@4
    55
    * and reordering of bidirectional text.
williamr@4
    56
    *
williamr@4
    57
    * By default, it is enabled.
williamr@4
    58
    *
williamr@4
    59
    * If text processing is disabled, lines are broken only at explicit line 
williamr@4
    60
    * end characters and they are not truncated, but drawn as long as they
williamr@4
    61
    * fit. Also, the dialog does not handle reordering of bidirectional text.
williamr@4
    62
    *
williamr@4
    63
    * @since S60 2.0
williamr@4
    64
    * @param aEnabled Enable or disable all text processing.
williamr@4
    65
    */
williamr@4
    66
    IMPORT_C void SetTextProcessing(TBool aEnabled);
williamr@4
    67
williamr@4
    68
    /**
williamr@4
    69
    * Displays the global note.
williamr@4
    70
    * @param aType Note type.
williamr@4
    71
    * @param aNoteText Note text.
williamr@4
    72
    * @return Note ID.
williamr@4
    73
    */
williamr@4
    74
    IMPORT_C TInt ShowNoteL(TAknGlobalNoteType aType, const TDesC& aNoteText);
williamr@4
    75
    
williamr@4
    76
    /**
williamr@4
    77
    * Displays the global note.
williamr@4
    78
    * @param aStatus Reference to request status.
williamr@4
    79
    * @param aType Note type.
williamr@4
    80
    * @param aNoteText Note text.
williamr@4
    81
    * @return Note ID.
williamr@4
    82
    */
williamr@4
    83
    IMPORT_C TInt ShowNoteL(
williamr@4
    84
        TRequestStatus& aStatus, 
williamr@4
    85
        TAknGlobalNoteType aType,
williamr@4
    86
        const TDesC& aNoteText);
williamr@4
    87
    
williamr@4
    88
    /**
williamr@4
    89
    * Cancels the global note.
williamr@4
    90
    * @param aNoteId Note ID.
williamr@4
    91
    */
williamr@4
    92
    IMPORT_C void CancelNoteL(TInt aNoteId);
williamr@4
    93
    
williamr@4
    94
    /**
williamr@4
    95
    * Sets the priority.
williamr@4
    96
    * @param aPriority An integer specifying the new priority.
williamr@4
    97
    */
williamr@4
    98
    IMPORT_C void SetPriority(TInt aPriority);
williamr@4
    99
    
williamr@4
   100
    /**
williamr@4
   101
    * Sets the softkey ID. (Not used)
williamr@4
   102
    * @param aId softkey ID 
williamr@4
   103
    */
williamr@4
   104
    IMPORT_C void SetSoftkeys(TInt aId);
williamr@4
   105
    
williamr@4
   106
    /**
williamr@4
   107
    * Sets the graphic ID and the graphic mask ID.
williamr@4
   108
    * @param aId Graphic ID
williamr@4
   109
    * @param aMaskId Graphic mask ID.
williamr@4
   110
    */
williamr@4
   111
    IMPORT_C void SetGraphic(TInt aId, TInt aMaskId=-1);
williamr@4
   112
    
williamr@4
   113
    /**
williamr@4
   114
    * Sets the animation.
williamr@4
   115
    * @param aResourceId Resource ID of the animation.
williamr@4
   116
    */
williamr@4
   117
    IMPORT_C void SetAnimation(TInt aResourceId);
williamr@4
   118
    
williamr@4
   119
    /**
williamr@4
   120
    * Sets the tone.
williamr@4
   121
    * @param aTone New tone.
williamr@4
   122
    */
williamr@4
   123
    IMPORT_C void SetTone(TInt aTone);  // must be specified in avkon.hrh
williamr@4
   124
    
williamr@4
   125
    /** 
williamr@4
   126
    * Internal, please do not use.
williamr@4
   127
    * @internal
williamr@4
   128
    */
williamr@4
   129
    IMPORT_C static void DoGlobaNoteBufferL(
williamr@4
   130
        TInt16 aType,
williamr@4
   131
        TInt16 aPriority,
williamr@4
   132
        TInt aSoftkeys,
williamr@4
   133
        TInt16 aGraphic,
williamr@4
   134
        TInt16 aGraphicMask,
williamr@4
   135
        TInt aAnimation,
williamr@4
   136
        TInt16 aTone,
williamr@4
   137
        TBool aAdapterUsed,
williamr@4
   138
        TBool aTextProcessingEnabled,
williamr@4
   139
        const TDesC& aNoteText,
williamr@4
   140
        CBufFlat* aBuffer
williamr@4
   141
        );
williamr@4
   142
        
williamr@4
   143
    /** 
williamr@4
   144
    * @internal
williamr@4
   145
    */
williamr@4
   146
    static void DoGlobalNoteBufferL(
williamr@4
   147
        TInt16 aType,
williamr@4
   148
        TInt16 aPriority,
williamr@4
   149
        TInt aSoftkeys,
williamr@4
   150
        TInt16 aGraphic,
williamr@4
   151
        TInt16 aGraphicMask,
williamr@4
   152
        TInt aAnimation,
williamr@4
   153
        TInt16 aTone,
williamr@4
   154
        TBool aAdapterUsed,
williamr@4
   155
        TBool aTextProcessingEnabled,
williamr@4
   156
        const TDesC& aNoteText,
williamr@4
   157
        CBufFlat* aBuffer,
williamr@4
   158
        TInt32 aPreallocatedGlobalNoteId
williamr@4
   159
        );        
williamr@4
   160
williamr@4
   161
private:
williamr@4
   162
    CAknGlobalNote();
williamr@4
   163
    void ConstructL();    
williamr@4
   164
    
williamr@4
   165
    void PrepareBufferL(
williamr@4
   166
        TAknGlobalNoteType aType,
williamr@4
   167
        const TDesC& aNoteText,
williamr@4
   168
        TInt aPreallocatedGlobalNoteId = 0);
williamr@4
   169
williamr@4
   170
private:
williamr@4
   171
    IMPORT_C void CAknNotifyBase_Reserved();
williamr@4
   172
    
williamr@4
   173
private:
williamr@4
   174
    TInt iPriority;
williamr@4
   175
    TInt iSoftkeys;
williamr@4
   176
    TInt iGraphic;
williamr@4
   177
    TInt iGraphicMask;
williamr@4
   178
    TInt iAnimation;
williamr@4
   179
    TInt iTone;
williamr@4
   180
    TBool iTextProcessing;
williamr@4
   181
    
williamr@4
   182
    CBufFlat *iBuffer;
williamr@4
   183
    TPtrC8 iBufferPtr;
williamr@4
   184
williamr@4
   185
    CBufFlat *iCancelBuffer;
williamr@4
   186
    TPtrC8 iCancelBufferPtr;
williamr@4
   187
    
williamr@4
   188
    // Not really used, but needed to prevent buffer handling errors.
williamr@4
   189
    TPckgBuf<SAknGlobalNoteReturnParams> iRetPckg;
williamr@4
   190
    };
williamr@4
   191
williamr@4
   192
#endif // __AKNGLOBALNOTENOTIFY_H__