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