Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <EIKENV.H>
Link against: eikcore.lib

Class CEikonEnv

class CEikonEnv : public CCoeEnv;

Description

An environment for creating controls and utility functions for manipulating them.

Every GUI application is provided with an instance of CEikonEnv by the framework, which can be accessed through either CEikonEnv::Static() or the iEikonEnv macro of CEikApplication.

Derivation

Members

Defined in CEikonEnv:


Construction and destruction


~CEikonEnv()

IMPORT_C ~CEikonEnv();

Description

Destructor

Frees any resources allocated by this CEikonEnv during construction.


CEikonEnv()

IMPORT_C CEikonEnv();

Description

Default C++ constructor.

Allocates memory for the new CEikonEnv object; invoke using new(ELeave). The second phase constructor should be called after the constructor for the environment to be correctly initialised.


ConstructL()

IMPORT_C void ConstructL();

Description

Second-phase constructor.

This calls the next overload with ETrue as the parameter.


ConstructL(TBool)

IMPORT_C void ConstructL(TBool aInitialFocusState);

Description

Second-phase constructor.

Calls the next overload with a default window group ID which will be ignored.

Parameters

TBool aInitialFocusState

The window group's initial focus state. If ETrue, keyboard focus is enabled, if EFalse, keyboard focus is disabled.


ConstructL(TBool,TInt)

IMPORT_C void ConstructL(TBool aInitialFocusState, TInt aWindowGroupID);

Description

Second-phase constructor.

Parameters

TBool aInitialFocusState

The window group's initial focus state. If ETrue, keyboard focus is enabled, if EFalse, keyboard focus is disabled.

TInt aWindowGroupID

The window group ID of the parent window

[Top]


Member functions


Version()

IMPORT_C static TVersion Version();

Description

Gets the Uikon version that is currently running.

Return value

TVersion

The Uikon version.


Static()

static inline CEikonEnv* Static();

Description

Gets the CEikonEnv maintained by the framework for the application.

This function should never be run in a thread where such a static Uikon environment does not exist. Code that may run on the server side of an application server is one such case.

Return value

CEikonEnv *

A static CEikonEnv.


ConstructAppFromCommandLineL(const TApaApplicationFactory &,const CApaCommandLine &)

IMPORT_C void ConstructAppFromCommandLineL(const TApaApplicationFactory &aApplicationFactory, const CApaCommandLine &aCommandLine);

Description

Initialises an application

Constructs a new application consisting of a CEikAppUi, a CEikApplication, and a CEikDocument. The new application starts with a new controlling process and runs in this Uikon environment. The new application is passed any command line file using the function CEikAppUi::ProcessCommandParametersL(TApaCommand,TFileName &,const TDesC8 &).

Parameters

const TApaApplicationFactory &aApplicationFactory

The factory to use to create the application

const CApaCommandLine &aCommandLine

The command line used to initialise the new application.

See also:


ControlStackReadyL()

IMPORT_C void ControlStackReadyL();

Description

Called by the framework to finish environment construction once the control stack has been created and is ready.


DestroyEnvironment()

IMPORT_C virtual void DestroyEnvironment();

Description

Framework function


EikAppUi()const

inline CEikAppUi* EikAppUi() const;

Description

Gets the application UI of the application using this CEikonEnv.

Return value

CEikAppUi *

Pointer to the CEikAppUi.


Process()const

inline CEikProcess* Process() const;

Description

Gets the Uikon process that manages the files of applications started in this environment.

Return value

CEikProcess *

The CEikProcess object.


AnnotationFont()const

IMPORT_C const CFont* AnnotationFont() const;

Description

Gets the standard annotation font for this environment.

Return value

const CFont *

Pointer to the annotation font.


TitleFont()const

IMPORT_C const CFont* TitleFont() const;

Description

Gets the standard title font for this environment.

Return value

const CFont *

Pointer to the title font.


LegendFont()const

IMPORT_C const CFont* LegendFont() const;

Description

Gets the standard legend font for this environment.

Return value

const CFont *

Pointer to the legend font.


SymbolFont()const

IMPORT_C const CFont* SymbolFont() const;

Description

Gets the standard symbol font for this environment.

Return value

const CFont *

Pointer to the symbol font.


DenseFont()const

IMPORT_C const CFont* DenseFont() const;

Description

Gets the standard dense font for this environment.

Return value

const CFont *

Pointer to the dense font.


Font(const TLogicalFont &)const

IMPORT_C const CFont* Font(const TLogicalFont &aLogicalFont) const;

Description

Gets the nearest match to the specified font.

The return value is never NULL.

Parameters

const TLogicalFont &aLogicalFont

The font for which a match is sought.

Return value

const CFont *

Pointer to the font that most closely matches aLogicalFont.


UpdateSystemFontsL()

IMPORT_C void UpdateSystemFontsL();

Description

Calls Laf implementation of CEikonEnv::UpdateSystemFontsL() to update local array of system fonts


TexturedBitmap()const

Interface status: deprecated

IMPORT_C const CFbsBitmap* TexturedBitmap() const;

Description

Return value

const CFbsBitmap *


GrayBitmap()const

Interface status: deprecated

IMPORT_C const CFbsBitmap* GrayBitmap() const;

Description

Return value

const CFbsBitmap *


OptionBitmap()const

Interface status: deprecated

IMPORT_C const CFbsBitmap* OptionBitmap() const;

Description

Gets the bitmap that is used by horizontal option buttons in this environment.

Return value

const CFbsBitmap *

A pointer to the option bitmap.


OptionMaskBitmap()const

Interface status: deprecated

IMPORT_C const CFbsBitmap* OptionMaskBitmap() const;

Description

Return value

const CFbsBitmap *


Bitmap(TUid)const

IMPORT_C const CFbsBitmap* Bitmap(TUid aUidBmp) const;

Description

Gets the specified bitmap.

This function returns a bitmap from the list of bitmaps by using the UID as an index.

Parameters

TUid aUidBmp

The UID of the bitmap to retrieve.

Return value

const CFbsBitmap *

Pointer to the bitmap.


ConfirmLossOfAllChangesL()const

IMPORT_C TBool ConfirmLossOfAllChangesL() const;

Description

Displays a dialog asking the user to confirm that all changes will be lost to the current document, and returns the response.

Return value

TBool

Whether the user wants to lose all changes.


PictureFactory()const

IMPORT_C MPictureFactory* PictureFactory() const;

Description

Gets the picture factory for this environment.

Return value

MPictureFactory *

The picture factory.


ExtendedPictureFactory(TUid)const

IMPORT_C MEikPictureFactory* ExtendedPictureFactory(TUid aPictureType) const;

Description

Gets a picture factory object in the environment which supports the specified picture type.

If none exists, then the function returns NULL.

Parameters

TUid aPictureType

The picture type.

Return value

MEikPictureFactory *

A picture factory which supports the picture type aPictureType. NULL if no such factory exists in this environment.


AddPictureFactoryL(MEikPictureFactory &)

IMPORT_C void AddPictureFactoryL(MEikPictureFactory &aFactory);

Description

Adds the picture factory to the set of factories maintained by the Uikon environment.

Parameters

MEikPictureFactory &aFactory

The picture factory to add.


RemovePictureFactory(TUid)

IMPORT_C void RemovePictureFactory(TUid aFactoryId);

Description

Removes the specified picture factory, if it exists, from the set of picture factories owned by the Uikon environment.

Parameters

TUid aFactoryId

The Id of the picture factory to be removed.


AlertWin(const TDesC &)

IMPORT_C void AlertWin(const TDesC &aMsg);

Description

Displays the environment's alert window containing a single line message.

Parameters

const TDesC16 &aMsg

Message to be displayed in the alert window.


AlertWin(const TDesC &,const TDesC &)

IMPORT_C void AlertWin(const TDesC &aMsg1, const TDesC &aMsg2);

Description

Displays an alert window with a brief message.

Parameters

const TDesC16 &aMsg1

First line of the message.

const TDesC16 &aMsg2

Second line of the message.


Alert()const

inline const MEikAlertWin* Alert() const;

Description

Return value

const MEikAlertWin *


LeaveWithInfoMsg(TInt,...)

IMPORT_C void LeaveWithInfoMsg(TInt aResourceId,...);

Description

Displays a formatted information message and then leaves.

Parameters

TInt aResourceId

ID of a TBUF resource used to hold the string.

...


LeaveWithErrorContext(TInt,const TDesC &)

Interface status: deprecated

IMPORT_C void LeaveWithErrorContext(TInt aError, const TDesC &aContextText);

Description

Parameters

TInt aError

const TDesC16 &aContextText


GetErrorText(TDes &,TInt)const

IMPORT_C void GetErrorText(TDes &aDes, TInt aError) const;

Description

Gets the text for a standard error code.

Parameters

TDes16 &aDes

On return, contains the error text.

TInt aError

Error code.


GetErrorText(TDes &,TInt,TUid)const

IMPORT_C TErrorValidity GetErrorText(TDes &aErrorText, TInt aError, TUid aAppUid) const;

Description

Gets the text for an error code, in the specified application.

It returns whether the error code is valid or not.

Parameters

TDes16 &aErrorText

On return, contains the error text.

TInt aError

Error number.

TUid aAppUid

Application UID.

Return value

CEikonEnv::TErrorValidity

EErrorNumValid if the error code is valid, EErrorNumInvalid if the error code is invalid.


GetErrorTextAndTitle(TDes &,TInt,TDes &)const

IMPORT_C TErrorValidity GetErrorTextAndTitle(TDes &aErrorText, TInt aError, TDes &aTitleText) const;

Description

Gets the text for an error code, in the specified application.

It returns whether the error code is valid or not.

Parameters

TDes16 &aErrorText

On return, contains the error text.

TInt aError

Error number.

TDes16 &aTitleText

On return, contains the title text of the error.

Return value

CEikonEnv::TErrorValidity

EErrorNumValid if the error code is valid, EErrorNumInvalid if the error code is invalid.


ResolveError(TInt,TUid)const

IMPORT_C void ResolveError(TInt aError, TUid aAppUid=TUid::Null()) const;

Description

Displays an error message appropriate to the error code aError in an alert window. The message is read from a resource file and has a maximum of 256 characters.

Parameters

TInt aError

Error code.

TUid aAppUid

Application UID. By default, this is KNullUid. If a non null UID is specified and the error code is not known to UIKON, then the UID enables an application-specific error resource file to be scanned (if one exists) to try to resolve the error.


NotifyIdleErrorWhileRedrawing(TInt)

IMPORT_C void NotifyIdleErrorWhileRedrawing(TInt aError);

Description

Notifies this environment that an idle error occurred while redrawing was in progress.

Parameters

TInt aError

ID of the idle error.


NotifyIdleError(TInt,TInt)

IMPORT_C void NotifyIdleError(TInt aError, TInt aContextResourceId);

Description

Notifies this environment of an idle error.

This function reads the error context text from the resource identified by aContextResourceId. Calling this method will only trigger one error dialog per minute. Calling it any more frequent will result in no action.

Parameters

TInt aError

ID of the idle error.

TInt aContextResourceId

ID of the resource from which the context text is read.


HandleErrorWithContext(TInt,TInt)

IMPORT_C void HandleErrorWithContext(TInt aError, TInt aContextResourceId);

Description

Handles the specified error.

This function reads the error context text from the resource identified by aContextResourceId.

Parameters

TInt aError

ID of the error to handle.

TInt aContextResourceId

ID of the resource from which the context is read.


InfoMsg(const TDesC &)

IMPORT_C void InfoMsg(const TDesC &aDes);

Description

Displays a message in the system default corner of the screen.

The message disappears after a few seconds.

Parameters

const TDesC16 &aDes

The message to display.


InfoMsgWithAlignment(TGulAlignment,const TDesC &)

IMPORT_C void InfoMsgWithAlignment(TGulAlignment aCorner, const TDesC &aDes);

Description

Displays a message in the specified corner of the screen.

The message disappears after a few seconds.

Parameters

TGulAlignment aCorner

The screen corner the message is displayed in.

const TDesC16 &aDes

The message to display.


InfoMsg(TInt,...)

IMPORT_C void InfoMsg(TInt aResourceId,...);

Description

Displays a message in the system default corner of the screen.

A TBUF resource string is used to build the message at run-time from arbitrary data in a similar way to C's printf(). The message disappears after a few seconds.

Parameters

TInt aResourceId

ID of a TBUF resource used to hold the string.

...


InfoMsg(TInt,VA_LIST)

IMPORT_C void InfoMsg(TInt aResourceId, VA_LIST aList);

Description

Displays a message in the system default corner of the screen.

A TBUF resource string is used to build the message at run-time from arbitrary data in a similar way to C's printf(). The message disappears after a few seconds.

Parameters

TInt aResourceId

ID of a TBUF resource used to hold the string.

VA_LIST aList

List of values to be formatted.


InfoMsgWithAlignment(TGulAlignment,TInt,...)

IMPORT_C void InfoMsgWithAlignment(TGulAlignment aCorner, TInt aResourceId,...);

Description

Displays a message in the specified corner of the screen.

The information message is built at run-time from a formatting string defined as a TBUF resource and a list of arbitrary data.

Parameters

TGulAlignment aCorner

The corner of the screen the message is displayed in.

TInt aResourceId

ID of a TBUF resource used to hold the string.

...


InfoMsgWithAlignment(TGulAlignment,TInt,VA_LIST)

IMPORT_C void InfoMsgWithAlignment(TGulAlignment aCorner, TInt aResourceId, VA_LIST aList);

Description

Displays a message in the specified corner of the screen.

The information message is built at run-time from a formatting string defined as a TBUF resource and a list of arbitrary data.

Parameters

TGulAlignment aCorner

The corner of the screen the message is displayed in.

TInt aResourceId

ID of a TBUF resource used to hold the string.

VA_LIST aList

List of values to be formatted.


InfoMsgWithDuration(const TDesC &,TTimeIntervalMicroSeconds32)

IMPORT_C void InfoMsgWithDuration(const TDesC &aDes, TTimeIntervalMicroSeconds32 aDuration);

Description

Displays an info message for a specified period.

Parameters

const TDesC16 &aDes

Message to display.

TTimeIntervalMicroSeconds32 aDuration

Duration of message.


InfoMsgWithDuration(TInt,TTimeIntervalMicroSeconds32,...)

IMPORT_C void InfoMsgWithDuration(TInt aResourceId, TTimeIntervalMicroSeconds32 aDuration,...);

Description

Displays an info message for a specified period.

The text displayed is supplied in a resource file, as a string with some formatting information for extra arguments. These extra arguments are supplied through the variable argument list which is also passed into this function.

Parameters

TInt aResourceId

ID of a TBUF resource used to hold the string.

TTimeIntervalMicroSeconds32 aDuration

Duration of the message.

...


InfoMsgWithDuration(TInt,TTimeIntervalMicroSeconds32,VA_LIST)

IMPORT_C void InfoMsgWithDuration(TInt aResourceId, TTimeIntervalMicroSeconds32 aDuration, VA_LIST aList);

Description

Displays an info message for a specified period.

The text displayed is supplied in a resource file, as a string with some formatting information. Values for the formatting information are supplied as extra arguments. These extra arguments are packaged in a VA_LIST object which is also passed into this function.

Parameters

TInt aResourceId

ID of a TBUF resource used to hold the string.

TTimeIntervalMicroSeconds32 aDuration

Duration of message.

VA_LIST aList

List of values.


InfoMsgWithAlignmentAndDuration(TGulAlignment,const TDesC &,TTimeIntervalMicroSeconds32)

IMPORT_C void InfoMsgWithAlignmentAndDuration(TGulAlignment aCorner, const TDesC &aDes, TTimeIntervalMicroSeconds32 aDuration);

Description

Displays an info message with a specified alignment for a specified period.

The text displayed is supplied in a descriptor argument, and aligned using the aCorner parameter.

Parameters

TGulAlignment aCorner

The screen corner the message is displayed in.

const TDesC16 &aDes

Message to display.

TTimeIntervalMicroSeconds32 aDuration

Duration of message.


InfoMsgWithAlignmentAndDuration(TGulAlignment,TInt,TTimeIntervalMicroSeconds32,...)

IMPORT_C void InfoMsgWithAlignmentAndDuration(TGulAlignment aCorner, TInt aResourceId, TTimeIntervalMicroSeconds32 aDuration,...);

Description

Displays an info message with a specified alignment for a specified period.

The text displayed is supplied in a resource file, as a string with some formatting information for extra arguments. These extra arguments are supplied through the variable argument list which is also passed into this function. The text is aligned using the aCorner parameter.

Parameters

TGulAlignment aCorner

The screen corner the message is displayed in.

TInt aResourceId

ID of a TBUF resource used to contain the string.

TTimeIntervalMicroSeconds32 aDuration

Duration of message.

...


InfoMsgWithAlignmentAndDuration(TGulAlignment,TInt,TTimeIntervalMicroSeconds32,VA_LIST)

IMPORT_C void InfoMsgWithAlignmentAndDuration(TGulAlignment aCorner, TInt aResourceId, TTimeIntervalMicroSeconds32 aDuration, VA_LIST aList);

Description

Displays an info message with a specified alignment for a specified period.

The text displayed is supplied in a resource file, as a string with some formatting information. Values for the formatting information are supplied as extra arguments. These extra arguments are packaged in a VA_LIST object which is also passed into this function. The text is aligned using the aCorner parameter.

Parameters

TGulAlignment aCorner

The screen corner the message is displayed in.

TInt aResourceId

ID of a TBUF resource used to contain the string.

TTimeIntervalMicroSeconds32 aDuration

Duration of message.

VA_LIST aList

List of values.


InfoMsgCancel()

IMPORT_C void InfoMsgCancel();

Description

Cancels the currently displaying information message.


VerboseInfoMsg(const TDesC &)

IMPORT_C void VerboseInfoMsg(const TDesC &aDes);

Description

Displays an information message if verbose information reporting has been set.

The message is not displayed if verbose information reporting has not been set.

Parameters

const TDesC16 &aDes

Message to display.


BusyMsgL(const TDesC &)

IMPORT_C void BusyMsgL(const TDesC &aDes);

Description

Displays a flashing busy message in the system default corner of the screen.

Parameters

const TDesC16 &aDes

Message to display.


BusyMsgL(const TDesC &,TGulAlignment)

IMPORT_C void BusyMsgL(const TDesC &aDes, TGulAlignment aCorner);

Description

Displays a flashing busy message in the specified corner of the screen.

Parameters

const TDesC16 &aDes

Message to display.

TGulAlignment aCorner

Corner of the screen in which to display the message.


BusyMsgL(TInt)

IMPORT_C void BusyMsgL(TInt aResourceId);

Description

Displays a flashing busy message in the system default corner of the screen.

The message's text is read from resource.

Parameters

TInt aResourceId

ID of the resource that specifies the text to display.


BusyMsgL(const TDesC &,TTimeIntervalMicroSeconds32)

IMPORT_C void BusyMsgL(const TDesC &aDes, TTimeIntervalMicroSeconds32 aInitialDelay);

Description

Displays a flashing busy message in the system default corner of the screen for a specific amount of time.

Parameters

const TDesC16 &aDes

Message to display.

TTimeIntervalMicroSeconds32 aInitialDelay

Delay in microseconds before the message is first shown.


BusyMsgL(const TDesC &,TGulAlignment,TTimeIntervalMicroSeconds32)

IMPORT_C void BusyMsgL(const TDesC &aDes, TGulAlignment aCorner, TTimeIntervalMicroSeconds32 aInitialDelay);

Description

Displays a flashing busy message for a specific amount of time in the corner of the screen indicated by aCorner.

Parameters

const TDesC16 &aDes

Message to display.

TGulAlignment aCorner

Corner of the screen in which to display the message.

TTimeIntervalMicroSeconds32 aInitialDelay

Delay in microseconds before the message is first shown.


BusyMsgL(TInt,TTimeIntervalMicroSeconds32)

IMPORT_C void BusyMsgL(TInt aResourceId, TTimeIntervalMicroSeconds32 aInitialDelay);

Description

Displays a flashing busy message in the system default corner of the screen for a specific amount of time.

The message's text is read from resource.

Parameters

TInt aResourceId

The ID of a text resource specifying the message text.

TTimeIntervalMicroSeconds32 aInitialDelay

Delay in microseconds before the message is first shown.


BusyMsgCancel()

IMPORT_C void BusyMsgCancel();

Description

Cancels any existing busy message.


QueryWinL(const TDesC &,const TDesC &)

IMPORT_C static TBool QueryWinL(const TDesC &aFirstLine, const TDesC &aSecondLine);

Description

Requests a yes or no response from the user using a modal query dialog.

Parameters

const TDesC16 &aFirstLine

First line of query text.

const TDesC16 &aSecondLine

Second line of query text.

Return value

TBool

User's response.


QueryWinL(TInt,TInt)const

IMPORT_C TBool QueryWinL(TInt aFirstLineId, TInt aSecondLineId=0) const;

Description

Requests a yes or no response from the user using a modal query dialog.

The query text is read from the passed resource IDs.

User input cannot continue outside a modal dialog until the dialog is dismissed, although applications can be switched.

Parameters

TInt aFirstLineId

ID of resource describing the first line.

TInt aSecondLineId

ID of resource describing the second line.

Return value

TBool

User's response to the question, either ETrue or EFalse.


SetQueryDialog(MEikInfoDialog *)

IMPORT_C void SetQueryDialog(MEikInfoDialog *aQueryDialog);

Description

Sets the query dialog.

Parameters

MEikInfoDialog *aQueryDialog

The query dialog.


SetRequestQueryDialogFunc(TRequestDialogFunc)

IMPORT_C void SetRequestQueryDialogFunc(TRequestDialogFunc aQueryDialogFunc);

Description

Sets the request query dialog.

Parameters

TRequestDialogFunc aQueryDialogFunc

Request query dialog.


InfoWinL(const TDesC &,const TDesC &)

IMPORT_C static void InfoWinL(const TDesC &aFirstLine, const TDesC &aSecondLine);

Description

Displays a modal information dialog with the specified lines of text.

Parameters

const TDesC16 &aFirstLine

First line of dialog text.

const TDesC16 &aSecondLine

Second line of dialog text.


InfoWinL(TInt,TInt)const

IMPORT_C void InfoWinL(TInt aFirstLineId, TInt aSecondLineId=0) const;

Description

Displays a modal information dialog with a one or two-line info message read from the passed resources.

Parameters

TInt aFirstLineId

ID of the resource describing the first line.

TInt aSecondLineId

ID of the resource describing the second line.


SetInfoDialog(MEikInfoDialog *)

IMPORT_C void SetInfoDialog(MEikInfoDialog *aInfoDialog);

Description

Sets the dialog.

Parameters

MEikInfoDialog *aInfoDialog

The information dialog.


SetRequestInfoDialogFunc(TRequestDialogFunc)

IMPORT_C void SetRequestInfoDialogFunc(TRequestDialogFunc aInfoDialogFunc);

Description

Sets the request information dialog.

Parameters

TRequestDialogFunc aInfoDialogFunc

The request information dialog.


AllocInfoMsg()

IMPORT_C void AllocInfoMsg();

Description

Constructs an allocation information message.

The message includes the total number of cells allocated on the current thread's heap and the total space allocated to them.


WservAllocInfoMsg()

IMPORT_C void WservAllocInfoMsg();

Description

Creates a window server allocation information message from resource.

The message indicates the number of resources currently open for the window server session.


FservAllocInfoMsg()

IMPORT_C void FservAllocInfoMsg();

Description

Creates a file server allocation information message from resource.

The message indicates the number of resources currently open for the file server session.


Beep()

Interface status: deprecated

IMPORT_C static void Beep();

Description

Emits a beep.

This method is deprecated.


CreateBitmapL(const TDesC &,TInt)

IMPORT_C CWsBitmap* CreateBitmapL(const TDesC &aFileName, TInt aId);

Description

Loads, allocates and returns a pointer to a bitmap loaded from a multi-bitmap file (.mbm).

If aFileName is an empty TDesC, then a default value of z:.mbm is used. If the default can't be found the alternative default location z:.mbm will be used. If a wildcard character ("*") is specified as the file name, the default application resource file will be used.

If the function leaves it will also display an error dialog to the user.

Parameters

const TDesC16 &aFileName

File name specifying the bitmap file to load.

TInt aId

Number of the bitmap in the file.

Return value

CWsBitmap *

Pointer to the loaded bitmap. Ownership is transferred to the caller.


CreateBitmapL(const TDesC &,TInt,TBool)

IMPORT_C CWsBitmap* CreateBitmapL(const TDesC &aFileName, TInt aId, TBool aShowDlgIfErr);

Description

Loads, allocates and returns a pointer to a bitmap loaded from a multi-bitmap file (.mbm).

If aFileName is an empty TDesC, then a default value of z:.mbm is used. If the default can't be found the alternative default location z:.mbm will be used. If a wildcard character ("*") is specified as the file name, the default application resource file will be used.

Parameters

const TDesC16 &aFileName

File name specifying the bitmap file to load.

TInt aId

Number of the bitmap in the file.

TBool aShowDlgIfErr

If true then the function will also display an error dialog if it leaves.

Return value

CWsBitmap *

Pointer to the loaded bitmap. Ownership is transferred to the caller.


CreateIconL(const TDesC &,TInt,TInt)

IMPORT_C CGulIcon* CreateIconL(const TDesC &aFileName, TInt aBitmapId, TInt aMaskId=KErrNotFound);

Description

Creates an icon.

The icon is created by loading the image bitmap identified by aBitmapId and the mask identified by aMaskId from the resource file aFileName. It returns a pointer to the icon and transfers ownership.

Parameters

const TDesC16 &aFileName

The resource file name. If this is zero, the Uikon resource file will be used. If the wildcard character ('*') is specified, the default application resource file will be used.

TInt aBitmapId

The bitmap ID.

TInt aMaskId

The bitmap mask ID.

Return value

CGulIcon *

Pointer to the created icon.


CreateIconFromMaskedBitmapL(const CApaMaskedBitmap &)

IMPORT_C static CGulIcon* CreateIconFromMaskedBitmapL(const CApaMaskedBitmap &aApaMaskedBitmap);

Description

Creates an icon from a masked bitmap.

The icon is created by copying the image bitmap and mask from the masked bitmap aApaMaskedBitmap. It returns a pointer to the icon and transfers ownership to the caller.

Parameters

const CApaMaskedBitmap &aApaMaskedBitmap

The masked bitmap from which the icon is created.

Return value

CGulIcon *

Pointer to the icon.


LaunchPopupMenuL(TInt,const TPoint &,TPopupTargetPosType,const CEikHotKeyTable *)

IMPORT_C void LaunchPopupMenuL(TInt aResourceId, const TPoint &aTargetPos, TPopupTargetPosType aTargetType=EPopupTargetTopLeft, const CEikHotKeyTable *aHotKeyTable=0);

Description

Allows an application to launch a popup menu, by calling the app UI's CEikonEnv::LaunchPopupMenuL(TInt,const TPoint &,TPopupTargetPosType,const CEikHotKeyTable *) function.

Parameters

TInt aResourceId

ID of the resource that defines the menu to be launched.

const TPoint &aTargetPos

Position of the corner of the menu identified by aTargetType.

TPopupTargetPosType aTargetType

The corner of the menu by which the menu will be positioned.

const CEikHotKeyTable *aHotKeyTable

Optional menu hotkey table.


AddWindowShadow(CCoeControl *)

IMPORT_C static void AddWindowShadow(CCoeControl *aWinArea);

Description

Adds a window shadow of the standard height to a control.

Parameters

CCoeControl *aWinArea


ClockDllL()

IMPORT_C RAnimDll& ClockDllL();

Description

Gets the animated DLL that is used to animate the toolbar clock of the application using this CEikonEnv.

Return value

RAnimDll &

Reference to the RAnimDll.


SystemSingleLineParaFormatLayerL()

IMPORT_C CParaFormatLayer* SystemSingleLineParaFormatLayerL();

Description

Gets the single line paragraph format layer if it exists.

If one does not exist, it calls CEikonEnv::NewDefaultSingleLineParaFormatLayerL() to create a new one.

Return value

CParaFormatLayer *

Single line paragraph format layer.


SystemParaFormatLayerL()

IMPORT_C CParaFormatLayer* SystemParaFormatLayerL();

Description

Gets the paragraph format layer if it exists.

If it does not exist, it calls CEikonEnv::NewDefaultParaFormatLayerL() to create a new one.

Return value

CParaFormatLayer *

Paragraph format layer.


SystemCharFormatLayerL()

IMPORT_C CCharFormatLayer* SystemCharFormatLayerL();

Description

Gets the character format layer, if it exists.

If it does not exist, it calls CEikonEnv::NewDefaultCharFormatLayerL() to create a new one.

Return value

CCharFormatLayer *

Character format layer.


NewDefaultSingleLineParaFormatLayerL()

IMPORT_C static CParaFormatLayer* NewDefaultSingleLineParaFormatLayerL();

Description

Creates a default paragraph format layer suitable for a single line of text.

It has an inter line spacing of zero.

Return value

CParaFormatLayer *

A new CParaFormatLayer suitable for a single line of text. The caller takes ownership.


NewDefaultParaFormatLayerL()

IMPORT_C static CParaFormatLayer* NewDefaultParaFormatLayerL();

Description

Creates a default paragraph format layer suitable for multiple lines of text.

It uses the default inter line spacing, which is UI specific.

Return value

CParaFormatLayer *

A new CParaFormatLayer suitable for text that has more than one line. The caller takes ownership.


NewDefaultCharFormatLayerL()

IMPORT_C static CCharFormatLayer* NewDefaultCharFormatLayerL();

Description

Creates a default character format layer.

Return value

CCharFormatLayer *

A new default CCharFormatLayer. The caller takes ownership.


AddDialogLikeControlToStackL(CCoeControl *)

IMPORT_C void AddDialogLikeControlToStackL(CCoeControl *aControl);

Description

Adds a dialog-like control (with a control stack priority of ECoeStackPriorityDialog) to the control stack.

It leaves with no alert if a control with a priority between ECoeStackPriorityDialog and ECoeStackPriorityFep is already being displayed by the appUi.

Parameters

CCoeControl *aControl

The control to add.


AddAlertDialogLikeControlToStackL(CCoeControl *)

IMPORT_C void AddAlertDialogLikeControlToStackL(CCoeControl *aControl);

Description

Adds an alert dialog-like control (with a control stack priority of ECoeStackPriorityAlert) to the control stack.

Alert dialogs are used to indicate errors to the user.

It leaves with no alert if a control with a priority between ECoeStackPriorityAlert and ECoeStackPriorityFep is already being displayed by the appUi.

Parameters

CCoeControl *aControl

The control to add.


RemoveFromStack(CCoeControl *)

IMPORT_C void RemoveFromStack(CCoeControl *aControl);

Description

Removes a control from the control stack.

Parameters

CCoeControl *aControl

The control to remove.


AddSleepingDialogToStackL(CCoeControl *)

IMPORT_C void AddSleepingDialogToStackL(CCoeControl *aControl);

Description

Adds a sleeping dialog to the control stack, with a control stack priority of ECoeStackPriorityDialog.

Sleeping dialogs pre-allocate their resources - they are not initially visible.

Parameters

CCoeControl *aControl

The control to add.


AddSleepingAlertDialogToStackL(CCoeControl *)

IMPORT_C void AddSleepingAlertDialogToStackL(CCoeControl *aControl);

Description

Adds a sleeping dialog to the control stack, with a control stack priority of ECoeStackPriorityAlert.

Sleeping dialogs pre-allocate their resources - they are not initially visible.

Parameters

CCoeControl *aControl

The control to add.


RouseSleepingDialog(CCoeControl *,TBool)

IMPORT_C void RouseSleepingDialog(CCoeControl *aControl, TBool aRoused);

Description

Sets a sleeping dialog's state.

Parameters

CCoeControl *aControl

The sleeping dialog to rouse or put to sleep.

TBool aRoused

ETrue to rouse aControl, EFalse to put it to sleep.


DrawCursor(const CCoeControl *,const TPoint &,TInt)

IMPORT_C void DrawCursor(const CCoeControl *aControl, const TPoint &aPosition, TInt aWidth);

Description

Calls the other overload of CEikonEnv::DrawCursor(const CCoeControl *,const TPoint &,TInt) using the environment's standard screen font for the cursor's ascent and height.

Parameters

const CCoeControl *aControl

Control to draw in.

const TPoint &aPosition

Position of the cursor's baseline in the control's co-ordinate space.

TInt aWidth

Cursor width.


DrawCursor(const CCoeControl *,const TPoint &,TInt,TInt,TInt)

IMPORT_C void DrawCursor(const CCoeControl *aControl, const TPoint &aPosition, TInt aWidth, TInt aAscent, TInt aHeight);

Description

Draws the text cursor into a control with the specified position and width.

The cursor's height and ascent are by default suitable for this CEikonEnv's normal font. If aControl is not focused when this function is called, a panic is raised.

Parameters

const CCoeControl *aControl

Control to draw into.

const TPoint &aPosition

Position of the cursor's baseline in the control's co-ordinate space.

TInt aWidth

Cursor width.

TInt aAscent

Cursor ascent.

TInt aHeight

Cursor height.


HideCursor(const CCoeControl *)

IMPORT_C void HideCursor(const CCoeControl *aControl);

Description

Removes the text cursor from a control.

In debug builds, a panic is raised when this function is called on a control which is not the cursor owner.

Parameters

const CCoeControl *aControl

Control owning the cursor.


VirtualCursor()

IMPORT_C TEikVirtualCursor& VirtualCursor();

Description

Gets the virtual cursor.

Return value

TEikVirtualCursor &

Virtual cursor.


BringForwards(TBool,TInt)

IMPORT_C void BringForwards(TBool aForwards, TInt aPriority=ECoeWinPriorityAlwaysAtFront);

Description

Repositions the root window group in the stacking hierarchy, or pushes it to the back.

Calls to this function are ignored if the autoforward flag is set to ETrue.

Parameters

TBool aForwards

ETrue to reposition the root window group at aPriority. EFalse to push the root window group to the back.

TInt aPriority

If aForwards is ETrue then this argument determines where the root window group is placed in the stacking hierarchy.


SetAutoForwarding(TBool)

IMPORT_C void SetAutoForwarding(TBool aAutoBringToForeground);

Description

Use this method to set whether the application's window group shall be automatically brought to the foreground when the user taps on it.

Parameters

TBool aAutoBringToForeground


NewDefaultPrintSetupL()

IMPORT_C CPrintSetup* NewDefaultPrintSetupL();

Description

Creates and returns a pointer to a new default printer setup object.

Return value

CPrintSetup *

A default printer setup object.


GetPrinterNamesL(CPrinterModelList *,CDesCArray &)

IMPORT_C static void GetPrinterNamesL(CPrinterModelList *aModelNameList, CDesCArray &aPrinterNameList);

Description

Gets the printer names from a CPrinterModelList.

The printer names are returned through aPrinterNameList.

Parameters

CPrinterModelList *aModelNameList

Input list of printer model information.

CDesC16Array &aPrinterNameList

On return, contains all the printer names from aModelNameList.


UpdateTaskNameL()

IMPORT_C void UpdateTaskNameL();

Description

Updates the process and thread name from the caption.


SetBusy(TBool)

IMPORT_C void SetBusy(TBool aBusy);

Description

Sets the application's busy state.

Parameters

TBool aBusy

ETrue to set as busy, EFalse otherwise.


IsBusy()const

IMPORT_C TBool IsBusy() const;

Description

Tests whether the application is marked as busy.

Return value

TBool

ETrue if the application is busy, EFalse otherwise.


SetSystem(TBool)

IMPORT_C void SetSystem(TBool aSystem);

Description

Sets the application's system attribute.

While the system attribute is set, the application cannot be closed down e.g. by using the TApaTask::EndTask function unless the requester has the capability PowerMgmt.

Parameters

TBool aSystem

ETrue to set the system attribute, EFalse to unset it.


IsSystem()const

IMPORT_C TBool IsSystem() const;

Description

Tests the value of the system attribute.

Return value

TBool

ETrue if the system attribute is set, otherwise EFalse.


SetDocNameIsAFile(TBool)

IMPORT_C void SetDocNameIsAFile(TBool aDocNameIsAFile);

Description

Sets whether a document name is a file.

Parameters

TBool aDocNameIsAFile

ETrue to set the document name as a file, EFalse otherwise.


DocNameIsAFile()const

IMPORT_C TBool DocNameIsAFile() const;

Description

Tests whether the document name is a file.

Return value

TBool

ETrue if the document name is a file. EFalse otherwise.


SetRespondsToShutdownEvent(TBool)

IMPORT_C void SetRespondsToShutdownEvent(TBool aRespondsToShutdownEvent);

Description

Sets whether the application responds to shutdown events.

Parameters

TBool aRespondsToShutdownEvent

ETrue if the application responds to shutdown events, EFalse otherwise.


RespondsToShutdownEvent()const

IMPORT_C TBool RespondsToShutdownEvent() const;

Description

Tests whether the application responds to shutdown events.

Return value

TBool

ETrue if the application responds to shutdown events, EFalse otherwise.


SetRespondsToSwitchFilesEvent(TBool)

IMPORT_C void SetRespondsToSwitchFilesEvent(TBool aRespondsToSwitchFilesEvent);

Description

Sets whether the application responds to switch files events.

Parameters

TBool aRespondsToSwitchFilesEvent

ETrue if the application responds to switch files events, EFalse otherwise.


RespondsToSwitchFilesEvent()const

IMPORT_C TBool RespondsToSwitchFilesEvent() const;

Description

Tests whether an application responds to switch files events.

Return value

TBool

ETrue if the application responds to switch files events, EFalse otherwise.


DisplayTaskList()

IMPORT_C void DisplayTaskList();

Description

Displays tasks present in the Task List.


DismissTaskList()

IMPORT_C void DismissTaskList();

Description

Causes the task list, if displayed, to be closed.


ColorList()const

inline CColorList& ColorList() const;

Description

Gets the application's colour list.

The colour list provides member functions to retrieve and modify colours in the list, and to append new arrays of colours to the colour list.

Return value

CColorList &

The application's colour list


Color(TLogicalColor)const

inline TRgb Color(TLogicalColor aLogicalColor) const;

Description

Gets the physical (TRgb) colour which corresponds to a logical colour.

Parameters

TLogicalColor aLogicalColor

A logical colour value.

Return value

TRgb

The physical colour which corresponds to aLogicalColor.


SetColor(TLogicalColor,TRgb)

inline void SetColor(TLogicalColor aLogicalColor, TRgb aColor);

Description

Sets a mapping in the application's colour list between the logical and physical colours specified.

Parameters

TLogicalColor aLogicalColor

A logical colour value.

TRgb aColor

A physical colour value.


ControlColor(TLogicalColor,const CCoeControl &)const

IMPORT_C TRgb ControlColor(TLogicalColor aLogicalColor, const CCoeControl &aControl) const;

Description

Gets the physical (TRgb) colour which corresponds to the logical colour specified from the application's colour list.

If the colour of the control specified in aControl has been overridden using CCoeControl::OverrideColorL(TInt,TRgb), this function will return the overridden colour.

Parameters

TLogicalColor aLogicalColor

A logical colour value.

const CCoeControl &aControl

A pointer to the control itself.

Return value

TRgb

The physical colour which corresponds to aLogicalColor.


CustomColorArray()const

inline CColorArray& CustomColorArray() const;

Description

Gets the custom colour array.

Return value

CColorArray &

The custom colour array.


CreateSystemColorListL()

IMPORT_C CColorList* CreateSystemColorListL();

Description

Creates and returns a system colour list, which is a palette of standard colours used by the system.

The list is read from a system colour scheme file. The function returns NULL if no such file can be found. In this case, clients are expected to create the list using some other means (typically from a resource file).

Return value

CColorList *

Pointer to the system colour list, or NULL.


CreateSystemColorListL(const CColorList &)

IMPORT_C CColorList* CreateSystemColorListL(const CColorList &aColorList);

Description

Creates and returns a system colour list, which is a palette of standard colours used by the system, and merges it with the colour list specified. CColorList::AddColorArrayL(TUid,CColorArray *) should be called before this function.

Parameters

const CColorList &aColorList

The color list to merge in.

Return value

CColorList *

Pointer to the system colour list.


UpdateSystemColorListL(const CColorList &)

Capability: WriteDeviceData To protect against tampering.

IMPORT_C void UpdateSystemColorListL(const CColorList &aColorList);

Description

Replaces the system colour list with the list specified.

If no system colour list exists, one is created.

Parameters

const CColorList &aColorList

The new colour list.


PopulateColorArrayL()

IMPORT_C CColorList* PopulateColorArrayL();

Description

Creates and populates a colour list, a palette of standard colours used by the system. If the first attempt fails a separate executable, Z:\SYS\BIN\UPDATESYSTEMCOLORLIST.EXE, is run to update system colours.

Return value

CColorList *

populated colour list. Ownership is passed to caller.


AddLibraryL(TCreateByTypeFunction)

inline TInt AddLibraryL(TCreateByTypeFunction aControlFactory);

Description

Parameters

TCreateByTypeFunction aControlFactory

Return value

TInt


AddLibraryL(TFileName *)

inline TInt AddLibraryL(TFileName *aResourceFile);

Description

Parameters

TBuf *aResourceFile

Return value

TInt


RemoveLibrary(TCreateByTypeFunction)

inline void RemoveLibrary(TCreateByTypeFunction aControlFactory);

Description

Parameters

TCreateByTypeFunction aControlFactory


RemoveLibrary(TInt)

inline void RemoveLibrary(TInt aResourceFileOffset);

Description

Parameters

TInt aResourceFileOffset


NudgeCharMinus()const

inline TChar NudgeCharMinus() const;

Description

Gets the minus nudge character, this could be the left arrow for example.

Return value

TChar

Minus nudge character.


NudgeCharPlus()const

inline TChar NudgeCharPlus() const;

Description

Gets the plus nudge character, this could be the right arrow for example.

Return value

TChar

Plus nudge character.


DefaultDisplayMode()const

IMPORT_C TDisplayMode DefaultDisplayMode() const;

Description

Gets the default display mode for the window server session with the maximum possible number of colours.

Return value

TDisplayMode

Default display mode.


AppUiFactory()const

IMPORT_C MEikAppUiFactory* AppUiFactory() const;

Description

Gets the application UI factory object.

This object implements the MEikAppUiFactory interface.

Return value

MEikAppUiFactory *

App UI factory interface or NULL.


AppUiFactory(const CEikAppUi &)const

IMPORT_C MEikAppUiFactory* AppUiFactory(const CEikAppUi &aAppUi) const;

Description

Gets the application UI factory object for the specified app UI.

If the specified app UI does not exist in this environment, the function returns NULL. Otherwise the function returns an object which implements the MEikAppUiFactory interface.

Parameters

const CEikAppUi &aAppUi

The app UI for this application.

Return value

MEikAppUiFactory *

The app UI factory object, or NULL if aAppUi does't exist in this environment.


HandleError(TInt)

IMPORT_C virtual void HandleError(TInt aError);

Description

Handles an error that has occurred in the application.

It first offers the error to the app UI's CEikonEnv::HandleError(TInt) function. If that does not handle it, this function displays an alert window or an info message containing some appropriate text, read from a system resource file.

Parameters

TInt aError

One of the standard system error codes.


CEikonEnv_Reserved_1()

private: IMPORT_C virtual void CEikonEnv_Reserved_1();

Description


CEikonEnv_Reserved_2()

private: IMPORT_C virtual void CEikonEnv_Reserved_2();

Description


CEikonEnv_Reserved_3()

private: IMPORT_C virtual void CEikonEnv_Reserved_3();

Description


CEikonEnv_Reserved_4()

private: IMPORT_C virtual void CEikonEnv_Reserved_4();

Description


CEikonEnv_Reserved_5()

private: IMPORT_C virtual void CEikonEnv_Reserved_5();

Description


DestroyScreen()

private: IMPORT_C virtual void DestroyScreen();

Description

Framework function


InitSystemFontsL()

private: IMPORT_C virtual void InitSystemFontsL();

Description

Framework function. Creates array of system fonts.


ResourceFileVersionNumber()const

private: IMPORT_C virtual TInt ResourceFileVersionNumber() const;

Description

Framework function

Return value

TInt


QueryDialog()const

IMPORT_C MEikInfoDialog* QueryDialog() const;

Description

Gets the query dialog for this environment.

Return value

MEikInfoDialog *

The query dialog.


InfoDialog()const

IMPORT_C MEikInfoDialog* InfoDialog() const;

Description

Gets the info dialog for this environment.

Return value

MEikInfoDialog *

The info dialog.


AppServer()const

IMPORT_C CEikAppServer* AppServer() const;

Description

Gets required application server for running the application.

Return value

CEikAppServer *

Pointer to the application server which is derived from CEikAppServer.


StartedAsServerApp()const

IMPORT_C TBool StartedAsServerApp() const;

Description

Gets whether server is required or not.

Return value

TBool

ETrue if application requires a server, EFalse otherwise.


CEikonEnv_Reserved_6()

private: IMPORT_C virtual void CEikonEnv_Reserved_6();

Description


CEikonEnv_Reserved_7()

private: IMPORT_C virtual void CEikonEnv_Reserved_7();

Description


CEikonEnv_Reserved_8()

private: IMPORT_C virtual void CEikonEnv_Reserved_8();

Description


CEikonEnv_Reserved_9()

private: IMPORT_C virtual void CEikonEnv_Reserved_9();

Description


CEikonEnv_Reserved_10()

private: IMPORT_C virtual void CEikonEnv_Reserved_10();

Description

[Top]


Member enumerations


Enum TErrorValidity

TErrorValidity

Description

EErrorNumValid

EErrorNumInvalid