1.1 --- a/epoc32/include/eikmsg.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/eikmsg.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,148 @@
1.4 -eikmsg.h
1.5 +// Copyright (c) 1997-2009 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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.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 +#ifndef __EIKMSG_H__
1.21 +#define __EIKMSG_H__
1.22 +
1.23 +#include <clock.h>
1.24 +#include <gulalign.h>
1.25 +
1.26 +#include <eikinfomsgwin.h>
1.27 +#include <eikbusymsgwin.h>
1.28 +
1.29 +class CCoeControl;
1.30 +class CEikonEnv;
1.31 +class RWindowGroup;
1.32 +class CEikResourceChange;
1.33 +
1.34 +
1.35 +/** Base class providing functions to construct and display an information message.
1.36 +
1.37 +@publishedAll
1.38 +@released */
1.39 +class CEikMsgWin : public CBase
1.40 + {
1.41 +protected:
1.42 + IMPORT_C CEikMsgWin(CEikonEnv& aEikonEnv);
1.43 +public:
1.44 + IMPORT_C void ConstructL(RWindowGroup& aWindowGroup);
1.45 + IMPORT_C virtual ~CEikMsgWin();
1.46 + IMPORT_C void StartDisplay(const TDesC& aText, TGulAlignment aCorner);
1.47 + IMPORT_C void CancelDisplay();
1.48 +private:
1.49 + IMPORT_C virtual void CEikMsgWin_Reserved1();
1.50 + IMPORT_C virtual void CEikMsgWin_Reserved2();
1.51 +protected:
1.52 + TDes& PrepareDisplay(TDes& aText, TGulAlignment aCorner);
1.53 +private:
1.54 + virtual void DoStartDisplay(const TDesC& aText)=0;
1.55 +protected:
1.56 + /** A CEikonEnv*, which all applications have. This is required for construction
1.57 + of a CEikMsgWin as it provides access to services which the message window
1.58 + needs, the window server session for example. */
1.59 + CEikonEnv& iEikonEnv_; // the underscore is to prevent a name clash with the iEikonEnv #define
1.60 + /** An empty control required for construction of a blank window. This defines
1.61 + a handle back to the client side object, which is only required if you need
1.62 + to later initiate client side drawing. */
1.63 + CCoeControl* iDummy;
1.64 + /** The window in which the message will be drawn. */
1.65 + RBlankWindow* iBlankWindow;
1.66 + /** An RAnim derived class, which is responsible for interacting with server side
1.67 + classes to provide the message window's animation on the screen. It is constructed
1.68 + by passing in the RWindowBase which it will use to draw its contents to, and
1.69 + also a handle to an animation DLL, which provides the animation functionality. */
1.70 + RMessageWindow* iMessageWindow;
1.71 +private:
1.72 + CEikResourceChange* iResourceChange;
1.73 + TInt iCEikMsgWin_Spare1;
1.74 + };
1.75 +
1.76 +/**
1.77 +@publishedAll
1.78 +@released
1.79 +*/
1.80 +const TInt KEikInfoMsgMaxLen=RMessageWindow::EMaxTextLength;
1.81 +
1.82 +/** Specifies the maximum length of the message buffer.
1.83 +
1.84 +@publishedAll
1.85 +@released */
1.86 +typedef TBuf<KEikInfoMsgMaxLen> TEikInfoMsgBuf;
1.87 +
1.88 +class CEikInfoMsgWin : public CEikMsgWin, public MEikInfoMsgWin
1.89 +/** Enables construction of an information message window.
1.90 +
1.91 +@publishedAll
1.92 +@released */
1.93 + {
1.94 +public:
1.95 + IMPORT_C void ConstructL(RWindowGroup& aWindowGroup, TInt aParam = 0);
1.96 + IMPORT_C CEikInfoMsgWin(CEikonEnv& aEikonEnv);
1.97 +public: //from MEikInfoMsgWin
1.98 + IMPORT_C void StartDisplaySpecifyingDuration(const TDesC& aText, TGulAlignment aCorner, TTimeIntervalMicroSeconds32 aDuration);
1.99 + IMPORT_C void StartDisplay(const TDesC& aText, TGulAlignment aCorner);
1.100 + IMPORT_C void CancelDisplay();
1.101 + IMPORT_C void Release();
1.102 +private:
1.103 + virtual void DoStartDisplay(const TDesC& aText);
1.104 + IMPORT_C virtual void CEikInfoMsgWin_Reserved1();
1.105 + IMPORT_C virtual void CEikInfoMsgWin_Reserved2();
1.106 +private: // From CEikMsgWin. do not override!
1.107 + IMPORT_C void CEikMsgWin_Reserved1();
1.108 + IMPORT_C void CEikMsgWin_Reserved2();
1.109 +private:
1.110 + TInt iCEikInfoMsgWin_Spare1;
1.111 + };
1.112 +
1.113 +
1.114 +/**
1.115 +@publishedAll
1.116 +@released
1.117 +*/
1.118 +const TInt KEikBusyMsgMaxLen=RMessageWindow::EMaxTextLength;
1.119 +
1.120 +/**
1.121 +@publishedAll
1.122 +@released
1.123 +*/
1.124 +typedef TBuf<KEikBusyMsgMaxLen> TEikBusyMsgBuf;
1.125 +
1.126 +/**
1.127 +@publishedAll
1.128 +@released
1.129 +*/
1.130 +class CEikBusyMsgWin : public CEikMsgWin, public MEikBusyMsgWin
1.131 + {
1.132 +public:
1.133 + IMPORT_C void ConstructL(RWindowGroup& aWindowGroup);
1.134 + IMPORT_C CEikBusyMsgWin(CEikonEnv& aEikonEnv);
1.135 +public: //from MEikBusyMsgWin
1.136 + IMPORT_C void StartDisplaySpecifyingInitialDelay(const TDesC& aText, TGulAlignment aCorner, TTimeIntervalMicroSeconds32 aInitialDelay);
1.137 + IMPORT_C void StartDisplay(const TDesC& aText, TGulAlignment aCorner);
1.138 + IMPORT_C void Release();
1.139 +private:
1.140 + IMPORT_C virtual void CEikBusyMsgWin_Reserved1();
1.141 + IMPORT_C virtual void CEikBusyMsgWin_Reserved2();
1.142 +private: // From CEikMsgWin. do not override!
1.143 + IMPORT_C void CEikMsgWin_Reserved1();
1.144 + IMPORT_C void CEikMsgWin_Reserved2();
1.145 +private:
1.146 + virtual void DoStartDisplay(const TDesC& aText);
1.147 +private:
1.148 + TTimeIntervalMicroSeconds32 iInitialDelay;
1.149 + TInt iCEikBusyMsgWin_Spare1;
1.150 + };
1.151 +
1.152 +#endif // __EIKMSG_H__