1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
22 #include <eikinfomsgwin.h>
23 #include <eikbusymsgwin.h>
29 class CEikResourceChange;
32 /** Base class providing functions to construct and display an information message.
36 class CEikMsgWin : public CBase
39 IMPORT_C CEikMsgWin(CEikonEnv& aEikonEnv);
41 IMPORT_C void ConstructL(RWindowGroup& aWindowGroup);
42 IMPORT_C virtual ~CEikMsgWin();
43 IMPORT_C void StartDisplay(const TDesC& aText, TGulAlignment aCorner);
44 IMPORT_C void CancelDisplay();
46 IMPORT_C virtual void CEikMsgWin_Reserved1();
47 IMPORT_C virtual void CEikMsgWin_Reserved2();
49 TDes& PrepareDisplay(TDes& aText, TGulAlignment aCorner);
51 virtual void DoStartDisplay(const TDesC& aText)=0;
53 /** A CEikonEnv*, which all applications have. This is required for construction
54 of a CEikMsgWin as it provides access to services which the message window
55 needs, the window server session for example. */
56 CEikonEnv& iEikonEnv_; // the underscore is to prevent a name clash with the iEikonEnv #define
57 /** An empty control required for construction of a blank window. This defines
58 a handle back to the client side object, which is only required if you need
59 to later initiate client side drawing. */
61 /** The window in which the message will be drawn. */
62 RBlankWindow* iBlankWindow;
63 /** An RAnim derived class, which is responsible for interacting with server side
64 classes to provide the message window's animation on the screen. It is constructed
65 by passing in the RWindowBase which it will use to draw its contents to, and
66 also a handle to an animation DLL, which provides the animation functionality. */
67 RMessageWindow* iMessageWindow;
69 CEikResourceChange* iResourceChange;
70 TInt iCEikMsgWin_Spare1;
77 const TInt KEikInfoMsgMaxLen=RMessageWindow::EMaxTextLength;
79 /** Specifies the maximum length of the message buffer.
83 typedef TBuf<KEikInfoMsgMaxLen> TEikInfoMsgBuf;
85 class CEikInfoMsgWin : public CEikMsgWin, public MEikInfoMsgWin
86 /** Enables construction of an information message window.
92 IMPORT_C void ConstructL(RWindowGroup& aWindowGroup, TInt aParam = 0);
93 IMPORT_C CEikInfoMsgWin(CEikonEnv& aEikonEnv);
94 public: //from MEikInfoMsgWin
95 IMPORT_C void StartDisplaySpecifyingDuration(const TDesC& aText, TGulAlignment aCorner, TTimeIntervalMicroSeconds32 aDuration);
96 IMPORT_C void StartDisplay(const TDesC& aText, TGulAlignment aCorner);
97 IMPORT_C void CancelDisplay();
98 IMPORT_C void Release();
100 virtual void DoStartDisplay(const TDesC& aText);
101 IMPORT_C virtual void CEikInfoMsgWin_Reserved1();
102 IMPORT_C virtual void CEikInfoMsgWin_Reserved2();
103 private: // From CEikMsgWin. do not override!
104 IMPORT_C void CEikMsgWin_Reserved1();
105 IMPORT_C void CEikMsgWin_Reserved2();
107 TInt iCEikInfoMsgWin_Spare1;
115 const TInt KEikBusyMsgMaxLen=RMessageWindow::EMaxTextLength;
121 typedef TBuf<KEikBusyMsgMaxLen> TEikBusyMsgBuf;
127 class CEikBusyMsgWin : public CEikMsgWin, public MEikBusyMsgWin
130 IMPORT_C void ConstructL(RWindowGroup& aWindowGroup);
131 IMPORT_C CEikBusyMsgWin(CEikonEnv& aEikonEnv);
132 public: //from MEikBusyMsgWin
133 IMPORT_C void StartDisplaySpecifyingInitialDelay(const TDesC& aText, TGulAlignment aCorner, TTimeIntervalMicroSeconds32 aInitialDelay);
134 IMPORT_C void StartDisplay(const TDesC& aText, TGulAlignment aCorner);
135 IMPORT_C void Release();
137 IMPORT_C virtual void CEikBusyMsgWin_Reserved1();
138 IMPORT_C virtual void CEikBusyMsgWin_Reserved2();
139 private: // From CEikMsgWin. do not override!
140 IMPORT_C void CEikMsgWin_Reserved1();
141 IMPORT_C void CEikMsgWin_Reserved2();
143 virtual void DoStartDisplay(const TDesC& aText);
145 TTimeIntervalMicroSeconds32 iInitialDelay;
146 TInt iCEikBusyMsgWin_Spare1;
149 #endif // __EIKMSG_H__