1 eikmsg.h |
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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef __EIKMSG_H__ |
|
17 #define __EIKMSG_H__ |
|
18 |
|
19 #include <clock.h> |
|
20 #include <gulalign.h> |
|
21 |
|
22 #include <eikinfomsgwin.h> |
|
23 #include <eikbusymsgwin.h> |
|
24 |
|
25 class CCoeControl; |
|
26 class CEikonEnv; |
|
27 class RWindowGroup; |
|
28 class CEikResourceChange; |
|
29 |
|
30 |
|
31 /** Base class providing functions to construct and display an information message. |
|
32 |
|
33 @publishedAll |
|
34 @released */ |
|
35 class CEikMsgWin : public CBase |
|
36 { |
|
37 protected: |
|
38 IMPORT_C CEikMsgWin(CEikonEnv& aEikonEnv); |
|
39 public: |
|
40 IMPORT_C void ConstructL(RWindowGroup& aWindowGroup); |
|
41 IMPORT_C virtual ~CEikMsgWin(); |
|
42 IMPORT_C void StartDisplay(const TDesC& aText, TGulAlignment aCorner); |
|
43 IMPORT_C void CancelDisplay(); |
|
44 private: |
|
45 IMPORT_C virtual void CEikMsgWin_Reserved1(); |
|
46 IMPORT_C virtual void CEikMsgWin_Reserved2(); |
|
47 protected: |
|
48 TDes& PrepareDisplay(TDes& aText, TGulAlignment aCorner); |
|
49 private: |
|
50 virtual void DoStartDisplay(const TDesC& aText)=0; |
|
51 protected: |
|
52 /** A CEikonEnv*, which all applications have. This is required for construction |
|
53 of a CEikMsgWin as it provides access to services which the message window |
|
54 needs, the window server session for example. */ |
|
55 CEikonEnv& iEikonEnv_; // the underscore is to prevent a name clash with the iEikonEnv #define |
|
56 /** An empty control required for construction of a blank window. This defines |
|
57 a handle back to the client side object, which is only required if you need |
|
58 to later initiate client side drawing. */ |
|
59 CCoeControl* iDummy; |
|
60 /** The window in which the message will be drawn. */ |
|
61 RBlankWindow* iBlankWindow; |
|
62 /** An RAnim derived class, which is responsible for interacting with server side |
|
63 classes to provide the message window's animation on the screen. It is constructed |
|
64 by passing in the RWindowBase which it will use to draw its contents to, and |
|
65 also a handle to an animation DLL, which provides the animation functionality. */ |
|
66 RMessageWindow* iMessageWindow; |
|
67 private: |
|
68 CEikResourceChange* iResourceChange; |
|
69 TInt iCEikMsgWin_Spare1; |
|
70 }; |
|
71 |
|
72 /** |
|
73 @publishedAll |
|
74 @released |
|
75 */ |
|
76 const TInt KEikInfoMsgMaxLen=RMessageWindow::EMaxTextLength; |
|
77 |
|
78 /** Specifies the maximum length of the message buffer. |
|
79 |
|
80 @publishedAll |
|
81 @released */ |
|
82 typedef TBuf<KEikInfoMsgMaxLen> TEikInfoMsgBuf; |
|
83 |
|
84 class CEikInfoMsgWin : public CEikMsgWin, public MEikInfoMsgWin |
|
85 /** Enables construction of an information message window. |
|
86 |
|
87 @publishedAll |
|
88 @released */ |
|
89 { |
|
90 public: |
|
91 IMPORT_C void ConstructL(RWindowGroup& aWindowGroup, TInt aParam = 0); |
|
92 IMPORT_C CEikInfoMsgWin(CEikonEnv& aEikonEnv); |
|
93 public: //from MEikInfoMsgWin |
|
94 IMPORT_C void StartDisplaySpecifyingDuration(const TDesC& aText, TGulAlignment aCorner, TTimeIntervalMicroSeconds32 aDuration); |
|
95 IMPORT_C void StartDisplay(const TDesC& aText, TGulAlignment aCorner); |
|
96 IMPORT_C void CancelDisplay(); |
|
97 IMPORT_C void Release(); |
|
98 private: |
|
99 virtual void DoStartDisplay(const TDesC& aText); |
|
100 IMPORT_C virtual void CEikInfoMsgWin_Reserved1(); |
|
101 IMPORT_C virtual void CEikInfoMsgWin_Reserved2(); |
|
102 private: // From CEikMsgWin. do not override! |
|
103 IMPORT_C void CEikMsgWin_Reserved1(); |
|
104 IMPORT_C void CEikMsgWin_Reserved2(); |
|
105 private: |
|
106 TInt iCEikInfoMsgWin_Spare1; |
|
107 }; |
|
108 |
|
109 |
|
110 /** |
|
111 @publishedAll |
|
112 @released |
|
113 */ |
|
114 const TInt KEikBusyMsgMaxLen=RMessageWindow::EMaxTextLength; |
|
115 |
|
116 /** |
|
117 @publishedAll |
|
118 @released |
|
119 */ |
|
120 typedef TBuf<KEikBusyMsgMaxLen> TEikBusyMsgBuf; |
|
121 |
|
122 /** |
|
123 @publishedAll |
|
124 @released |
|
125 */ |
|
126 class CEikBusyMsgWin : public CEikMsgWin, public MEikBusyMsgWin |
|
127 { |
|
128 public: |
|
129 IMPORT_C void ConstructL(RWindowGroup& aWindowGroup); |
|
130 IMPORT_C CEikBusyMsgWin(CEikonEnv& aEikonEnv); |
|
131 public: //from MEikBusyMsgWin |
|
132 IMPORT_C void StartDisplaySpecifyingInitialDelay(const TDesC& aText, TGulAlignment aCorner, TTimeIntervalMicroSeconds32 aInitialDelay); |
|
133 IMPORT_C void StartDisplay(const TDesC& aText, TGulAlignment aCorner); |
|
134 IMPORT_C void Release(); |
|
135 private: |
|
136 IMPORT_C virtual void CEikBusyMsgWin_Reserved1(); |
|
137 IMPORT_C virtual void CEikBusyMsgWin_Reserved2(); |
|
138 private: // From CEikMsgWin. do not override! |
|
139 IMPORT_C void CEikMsgWin_Reserved1(); |
|
140 IMPORT_C void CEikMsgWin_Reserved2(); |
|
141 private: |
|
142 virtual void DoStartDisplay(const TDesC& aText); |
|
143 private: |
|
144 TTimeIntervalMicroSeconds32 iInitialDelay; |
|
145 TInt iCEikBusyMsgWin_Spare1; |
|
146 }; |
|
147 |
|
148 #endif // __EIKMSG_H__ |