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.
     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".
     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 
    26 class CCoeControl;
    27 class CEikonEnv;
    28 class RWindowGroup;
    29 class CEikResourceChange;
    30 
    31 
    32 /** Base class providing functions to construct and display an information message. 
    33 
    34 @publishedAll
    35 @released */
    36 class CEikMsgWin : public CBase
    37 	{
    38 protected:
    39 	IMPORT_C CEikMsgWin(CEikonEnv& aEikonEnv);
    40 public:
    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();
    45 private:
    46 	IMPORT_C virtual void CEikMsgWin_Reserved1();
    47 	IMPORT_C virtual void CEikMsgWin_Reserved2();
    48 protected:
    49 	TDes& PrepareDisplay(TDes& aText, TGulAlignment aCorner);
    50 private:
    51 	virtual void DoStartDisplay(const TDesC& aText)=0;
    52 protected:
    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. */
    60 	CCoeControl* iDummy;
    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;
    68 private:
    69 	CEikResourceChange* iResourceChange;
    70 	TInt iCEikMsgWin_Spare1;
    71 	};
    72 
    73 /**
    74 @publishedAll
    75 @released
    76 */
    77 const TInt KEikInfoMsgMaxLen=RMessageWindow::EMaxTextLength;
    78 
    79 /** Specifies the maximum length of the message buffer. 
    80 
    81 @publishedAll
    82 @released */
    83 typedef TBuf<KEikInfoMsgMaxLen> TEikInfoMsgBuf;
    84 
    85 class CEikInfoMsgWin : public CEikMsgWin, public MEikInfoMsgWin
    86 /** Enables construction of an information message window. 
    87 
    88 @publishedAll 
    89 @released */
    90 	{
    91 public:
    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();
    99 private:
   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();
   106 private:
   107 	TInt iCEikInfoMsgWin_Spare1;
   108 	};
   109 
   110 
   111 /**
   112 @publishedAll
   113 @released
   114 */
   115 const TInt KEikBusyMsgMaxLen=RMessageWindow::EMaxTextLength;
   116 
   117 /**
   118 @publishedAll
   119 @released
   120 */
   121 typedef TBuf<KEikBusyMsgMaxLen> TEikBusyMsgBuf;
   122 
   123 /** 
   124 @publishedAll 
   125 @released
   126 */
   127 class CEikBusyMsgWin : public CEikMsgWin, public MEikBusyMsgWin
   128 	{
   129 public:
   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();
   136 private:
   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();
   142 private:
   143 	virtual void DoStartDisplay(const TDesC& aText);
   144 private:
   145 	TTimeIntervalMicroSeconds32 iInitialDelay;
   146 	TInt iCEikBusyMsgWin_Spare1;
   147 	};
   148 
   149 #endif	// __EIKMSG_H__
   150