epoc32/include/mw/eikmsg.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
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@4
     4
// under the terms of "Eclipse Public License v1.0"
williamr@2
     5
// which accompanies this distribution, and is available
williamr@4
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.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@4
    25
williamr@2
    26
class CCoeControl;
williamr@2
    27
class CEikonEnv;
williamr@2
    28
class RWindowGroup;
williamr@2
    29
class CEikResourceChange;
williamr@2
    30
williamr@2
    31
williamr@2
    32
/** Base class providing functions to construct and display an information message. 
williamr@2
    33
williamr@2
    34
@publishedAll
williamr@2
    35
@released */
williamr@2
    36
class CEikMsgWin : public CBase
williamr@2
    37
	{
williamr@2
    38
protected:
williamr@2
    39
	IMPORT_C CEikMsgWin(CEikonEnv& aEikonEnv);
williamr@2
    40
public:
williamr@2
    41
	IMPORT_C void ConstructL(RWindowGroup& aWindowGroup);
williamr@2
    42
	IMPORT_C virtual ~CEikMsgWin();
williamr@2
    43
	IMPORT_C void StartDisplay(const TDesC& aText, TGulAlignment aCorner);
williamr@2
    44
	IMPORT_C void CancelDisplay();
williamr@2
    45
private:
williamr@2
    46
	IMPORT_C virtual void CEikMsgWin_Reserved1();
williamr@2
    47
	IMPORT_C virtual void CEikMsgWin_Reserved2();
williamr@2
    48
protected:
williamr@2
    49
	TDes& PrepareDisplay(TDes& aText, TGulAlignment aCorner);
williamr@2
    50
private:
williamr@2
    51
	virtual void DoStartDisplay(const TDesC& aText)=0;
williamr@2
    52
protected:
williamr@2
    53
	/** A CEikonEnv*, which all applications have. This is required for construction 
williamr@2
    54
	of a CEikMsgWin as it provides access to services which the message window 
williamr@2
    55
	needs, the window server session for example. */
williamr@2
    56
	CEikonEnv& iEikonEnv_; // the underscore is to prevent a name clash with the iEikonEnv #define
williamr@2
    57
	/** An empty control required for construction of a blank window. This defines 
williamr@2
    58
	a handle back to the client side object, which is only required if you need 
williamr@2
    59
	to later initiate client side drawing. */
williamr@2
    60
	CCoeControl* iDummy;
williamr@2
    61
	/** The window in which the message will be drawn. */
williamr@2
    62
	RBlankWindow* iBlankWindow;
williamr@2
    63
	/** An RAnim derived class, which is responsible for interacting with server side 
williamr@2
    64
	classes to provide the message window's animation on the screen. It is constructed 
williamr@2
    65
	by passing in the RWindowBase which it will use to draw its contents to, and 
williamr@2
    66
	also a handle to an animation DLL, which provides the animation functionality. */
williamr@2
    67
	RMessageWindow* iMessageWindow;
williamr@2
    68
private:
williamr@2
    69
	CEikResourceChange* iResourceChange;
williamr@2
    70
	TInt iCEikMsgWin_Spare1;
williamr@2
    71
	};
williamr@2
    72
williamr@2
    73
/**
williamr@2
    74
@publishedAll
williamr@2
    75
@released
williamr@2
    76
*/
williamr@2
    77
const TInt KEikInfoMsgMaxLen=RMessageWindow::EMaxTextLength;
williamr@2
    78
williamr@2
    79
/** Specifies the maximum length of the message buffer. 
williamr@2
    80
williamr@2
    81
@publishedAll
williamr@2
    82
@released */
williamr@2
    83
typedef TBuf<KEikInfoMsgMaxLen> TEikInfoMsgBuf;
williamr@2
    84
williamr@2
    85
class CEikInfoMsgWin : public CEikMsgWin, public MEikInfoMsgWin
williamr@2
    86
/** Enables construction of an information message window. 
williamr@2
    87
williamr@2
    88
@publishedAll 
williamr@2
    89
@released */
williamr@2
    90
	{
williamr@2
    91
public:
williamr@2
    92
	IMPORT_C void ConstructL(RWindowGroup& aWindowGroup, TInt aParam = 0);
williamr@2
    93
	IMPORT_C CEikInfoMsgWin(CEikonEnv& aEikonEnv);
williamr@2
    94
public:  //from MEikInfoMsgWin
williamr@2
    95
	IMPORT_C void StartDisplaySpecifyingDuration(const TDesC& aText, TGulAlignment aCorner, TTimeIntervalMicroSeconds32 aDuration);	
williamr@2
    96
	IMPORT_C void StartDisplay(const TDesC& aText, TGulAlignment aCorner);
williamr@2
    97
	IMPORT_C void CancelDisplay();
williamr@2
    98
	IMPORT_C void Release();
williamr@2
    99
private:
williamr@2
   100
	virtual void DoStartDisplay(const TDesC& aText);
williamr@2
   101
	IMPORT_C virtual void CEikInfoMsgWin_Reserved1();
williamr@2
   102
	IMPORT_C virtual void CEikInfoMsgWin_Reserved2();
williamr@2
   103
private: // From CEikMsgWin. do not override!
williamr@2
   104
	IMPORT_C void CEikMsgWin_Reserved1();
williamr@2
   105
	IMPORT_C void CEikMsgWin_Reserved2();
williamr@2
   106
private:
williamr@2
   107
	TInt iCEikInfoMsgWin_Spare1;
williamr@2
   108
	};
williamr@2
   109
williamr@2
   110
williamr@2
   111
/**
williamr@2
   112
@publishedAll
williamr@2
   113
@released
williamr@2
   114
*/
williamr@2
   115
const TInt KEikBusyMsgMaxLen=RMessageWindow::EMaxTextLength;
williamr@2
   116
williamr@2
   117
/**
williamr@2
   118
@publishedAll
williamr@2
   119
@released
williamr@2
   120
*/
williamr@2
   121
typedef TBuf<KEikBusyMsgMaxLen> TEikBusyMsgBuf;
williamr@2
   122
williamr@2
   123
/** 
williamr@2
   124
@publishedAll 
williamr@2
   125
@released
williamr@2
   126
*/
williamr@2
   127
class CEikBusyMsgWin : public CEikMsgWin, public MEikBusyMsgWin
williamr@2
   128
	{
williamr@2
   129
public:
williamr@2
   130
	IMPORT_C void ConstructL(RWindowGroup& aWindowGroup);
williamr@2
   131
	IMPORT_C CEikBusyMsgWin(CEikonEnv& aEikonEnv);
williamr@2
   132
public:   //from MEikBusyMsgWin
williamr@2
   133
	IMPORT_C void StartDisplaySpecifyingInitialDelay(const TDesC& aText, TGulAlignment aCorner, TTimeIntervalMicroSeconds32 aInitialDelay);
williamr@2
   134
	IMPORT_C void StartDisplay(const TDesC& aText, TGulAlignment aCorner);
williamr@2
   135
	IMPORT_C void Release();
williamr@2
   136
private:
williamr@2
   137
	IMPORT_C virtual void CEikBusyMsgWin_Reserved1();
williamr@2
   138
	IMPORT_C virtual void CEikBusyMsgWin_Reserved2();
williamr@2
   139
private: // From CEikMsgWin. do not override!
williamr@2
   140
	IMPORT_C void CEikMsgWin_Reserved1();
williamr@2
   141
	IMPORT_C void CEikMsgWin_Reserved2();
williamr@2
   142
private:
williamr@2
   143
	virtual void DoStartDisplay(const TDesC& aText);
williamr@2
   144
private:
williamr@2
   145
	TTimeIntervalMicroSeconds32 iInitialDelay;
williamr@2
   146
	TInt iCEikBusyMsgWin_Spare1;
williamr@2
   147
	};
williamr@2
   148
williamr@2
   149
#endif	// __EIKMSG_H__
williamr@4
   150