1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/mw/AknGlobalNote.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,192 @@
1.4 +/*
1.5 +* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +
1.21 +#ifndef __AKNGLOBALNOTENOTIFY_H__
1.22 +#define __AKNGLOBALNOTENOTIFY_H__
1.23 +
1.24 +// INCLUDES
1.25 +#include <AknNotify.h>
1.26 +#include <AknNotifyStd.h>
1.27 +
1.28 +// CLASS DECLARATION
1.29 +
1.30 +/**
1.31 +* This class handles the global notes.
1.32 +*
1.33 +* @since S60 0.9
1.34 +*/
1.35 +NONSHARABLE_CLASS(CAknGlobalNote) : public CAknNotifyBase
1.36 + {
1.37 +public:
1.38 + /**
1.39 + * Two-phased constructor.
1.40 + * @return Pointer to new global note object.
1.41 + */
1.42 + IMPORT_C static CAknGlobalNote* NewL();
1.43 +
1.44 + /**
1.45 + * Two-phased constructor.
1.46 + * @return Pointer to new global note object.
1.47 + */
1.48 + IMPORT_C static CAknGlobalNote* NewLC();
1.49 +
1.50 + /**
1.51 + * Destructor.
1.52 + */
1.53 + IMPORT_C ~CAknGlobalNote();
1.54 +
1.55 + /**
1.56 + * Enable or disable all text processing done by the dialog.
1.57 + * This includes text wrapping, text truncation
1.58 + * and reordering of bidirectional text.
1.59 + *
1.60 + * By default, it is enabled.
1.61 + *
1.62 + * If text processing is disabled, lines are broken only at explicit line
1.63 + * end characters and they are not truncated, but drawn as long as they
1.64 + * fit. Also, the dialog does not handle reordering of bidirectional text.
1.65 + *
1.66 + * @since S60 2.0
1.67 + * @param aEnabled Enable or disable all text processing.
1.68 + */
1.69 + IMPORT_C void SetTextProcessing(TBool aEnabled);
1.70 +
1.71 + /**
1.72 + * Displays the global note.
1.73 + * @param aType Note type.
1.74 + * @param aNoteText Note text.
1.75 + * @return Note ID.
1.76 + */
1.77 + IMPORT_C TInt ShowNoteL(TAknGlobalNoteType aType, const TDesC& aNoteText);
1.78 +
1.79 + /**
1.80 + * Displays the global note.
1.81 + * @param aStatus Reference to request status.
1.82 + * @param aType Note type.
1.83 + * @param aNoteText Note text.
1.84 + * @return Note ID.
1.85 + */
1.86 + IMPORT_C TInt ShowNoteL(
1.87 + TRequestStatus& aStatus,
1.88 + TAknGlobalNoteType aType,
1.89 + const TDesC& aNoteText);
1.90 +
1.91 + /**
1.92 + * Cancels the global note.
1.93 + * @param aNoteId Note ID.
1.94 + */
1.95 + IMPORT_C void CancelNoteL(TInt aNoteId);
1.96 +
1.97 + /**
1.98 + * Sets the priority.
1.99 + * @param aPriority An integer specifying the new priority.
1.100 + */
1.101 + IMPORT_C void SetPriority(TInt aPriority);
1.102 +
1.103 + /**
1.104 + * Sets the softkey ID. (Not used)
1.105 + * @param aId softkey ID
1.106 + */
1.107 + IMPORT_C void SetSoftkeys(TInt aId);
1.108 +
1.109 + /**
1.110 + * Sets the graphic ID and the graphic mask ID.
1.111 + * @param aId Graphic ID
1.112 + * @param aMaskId Graphic mask ID.
1.113 + */
1.114 + IMPORT_C void SetGraphic(TInt aId, TInt aMaskId=-1);
1.115 +
1.116 + /**
1.117 + * Sets the animation.
1.118 + * @param aResourceId Resource ID of the animation.
1.119 + */
1.120 + IMPORT_C void SetAnimation(TInt aResourceId);
1.121 +
1.122 + /**
1.123 + * Sets the tone.
1.124 + * @param aTone New tone.
1.125 + */
1.126 + IMPORT_C void SetTone(TInt aTone); // must be specified in avkon.hrh
1.127 +
1.128 + /**
1.129 + * Internal, please do not use.
1.130 + * @internal
1.131 + */
1.132 + IMPORT_C static void DoGlobaNoteBufferL(
1.133 + TInt16 aType,
1.134 + TInt16 aPriority,
1.135 + TInt aSoftkeys,
1.136 + TInt16 aGraphic,
1.137 + TInt16 aGraphicMask,
1.138 + TInt aAnimation,
1.139 + TInt16 aTone,
1.140 + TBool aAdapterUsed,
1.141 + TBool aTextProcessingEnabled,
1.142 + const TDesC& aNoteText,
1.143 + CBufFlat* aBuffer
1.144 + );
1.145 +
1.146 + /**
1.147 + * @internal
1.148 + */
1.149 + static void DoGlobalNoteBufferL(
1.150 + TInt16 aType,
1.151 + TInt16 aPriority,
1.152 + TInt aSoftkeys,
1.153 + TInt16 aGraphic,
1.154 + TInt16 aGraphicMask,
1.155 + TInt aAnimation,
1.156 + TInt16 aTone,
1.157 + TBool aAdapterUsed,
1.158 + TBool aTextProcessingEnabled,
1.159 + const TDesC& aNoteText,
1.160 + CBufFlat* aBuffer,
1.161 + TInt32 aPreallocatedGlobalNoteId
1.162 + );
1.163 +
1.164 +private:
1.165 + CAknGlobalNote();
1.166 + void ConstructL();
1.167 +
1.168 + void PrepareBufferL(
1.169 + TAknGlobalNoteType aType,
1.170 + const TDesC& aNoteText,
1.171 + TInt aPreallocatedGlobalNoteId = 0);
1.172 +
1.173 +private:
1.174 + IMPORT_C void CAknNotifyBase_Reserved();
1.175 +
1.176 +private:
1.177 + TInt iPriority;
1.178 + TInt iSoftkeys;
1.179 + TInt iGraphic;
1.180 + TInt iGraphicMask;
1.181 + TInt iAnimation;
1.182 + TInt iTone;
1.183 + TBool iTextProcessing;
1.184 +
1.185 + CBufFlat *iBuffer;
1.186 + TPtrC8 iBufferPtr;
1.187 +
1.188 + CBufFlat *iCancelBuffer;
1.189 + TPtrC8 iCancelBufferPtr;
1.190 +
1.191 + // Not really used, but needed to prevent buffer handling errors.
1.192 + TPckgBuf<SAknGlobalNoteReturnParams> iRetPckg;
1.193 + };
1.194 +
1.195 +#endif // __AKNGLOBALNOTENOTIFY_H__