Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: eikenv.h
Link against: eikcore.lib

Class CEikonEnv

CEikonEnv

Support

Supported from 6.0

Description

An environment for creating Uikon controls and utility functions for manipulating those controls. Every Uikon 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.

This class is not intended for user derivation.

Derivation

CActiveThe core class of the active object abstraction
CBaseBase class for all classes to be instantiated on the heap
CCoeEnvControl environment
CEikonEnvAn environment for creating Uikon controls and utility functions for manipulating those controls
MApaAppStarterAn interface used by the Application Architecture server to start applications

Defined in CEikonEnv:
AddAlertDialogLikeControlToStackL(), AddDialogLikeControlToStackL(), AddPictureFactoryL(), AddSleepingAlertDialogToStackL(), AddSleepingDialogToStackL(), AddWindowShadow(), AlertWin(), AllocInfoMsg(), AnnotationFont(), AppUiFactory(), Beep(), Bitmap(), BringForwards(), BusyMsgCancel(), BusyMsgL(), CEikonEnv(), ClockDllL(), Color(), ColorList(), ConfirmLossOfAllChangesL(), ConstructAppFromCommandLineL(), ConstructL(), ControlColor(), ControlStackReadyL(), CreateBitmapL(), CreateIconFromMaskedBitmapL(), CreateIconL(), CustomColorArray(), DefaultDisplayMode(), DenseFont(), DocNameIsAFile(), DrawCursor(), EikAppUi(), ExtendedPictureFactory(), Font(), FservAllocInfoMsg(), GetPrinterNamesL(), HandleErrorWithContext(), HideCursor(), InfoMsg(), InfoMsgCancel(), InfoMsgWithAlignment(), InfoMsgWithAlignmentAndDuration(), InfoMsgWithDuration(), InfoWinL(), IsBusy(), IsSystem(), LeaveWithInfoMsg(), LegendFont(), NewDefaultCharFormatLayerL(), NewDefaultParaFormatLayerL(), NewDefaultPrintSetupL(), NewDefaultSingleLineParaFormatLayerL(), NotifyIdleError(), NotifyIdleErrorWhileRedrawing(), NudgeCharMinus(), NudgeCharPlus(), OptionBitmap(), PictureFactory(), Process(), QueryWinL(), RemoveFromStack(), RemovePictureFactory(), RespondsToShutdownEvent(), RespondsToSwitchFilesEvent(), RouseSleepingDialog(), SetAutoForwarding(), SetBusy(), SetColor(), SetDocNameIsAFile(), SetInfoDialog(), SetQueryDialog(), SetRequestInfoDialogFunc(), SetRequestQueryDialogFunc(), SetRespondsToShutdownEvent(), SetRespondsToSwitchFilesEvent(), SetSystem(), Static(), SymbolFont(), SystemCharFormatLayerL(), SystemParaFormatLayerL(), SystemSingleLineParaFormatLayerL(), TitleFont(), UpdateTaskNameL(), VerboseInfoMsg(), Version(), VirtualCursor(), WservAllocInfoMsg(), ~CEikonEnv()

Inherited from CActive:
Cancel(), Deque(), DoCancel(), EPriorityHigh, EPriorityIdle, EPriorityLow, EPriorityStandard, EPriorityUserInput, IsActive(), IsAdded(), Priority(), RunError(), RunL(), SetActive(), SetPriority(), TPriority, iStatus

Inherited from CBase:
operator new()

Inherited from CCoeEnv:
AddFepObserverL(), AddFocusObserverL(), AddForegroundObserverL(), AddMessageObserverL(), AddObserverOfLoadedFepL(), AddResourceFileL(), AllocReadResourceAsDes16L(), AllocReadResourceAsDes16LC(), AllocReadResourceAsDes8L(), AllocReadResourceAsDes8LC(), AllocReadResourceL(), AllocReadResourceLC(), AppUi(), BringOwnerToFront(), CreateDeviceFontL(), CreateGcL(), CreateResourceReaderLC(), CreateScreenFontL(), DeleteResourceFile(), DestroyEnvironment(), DestroyScreen(), DisableExitChecks(), ErrorContextText(), ErrorText(), ExecuteD(), ExecuteFepSettingsDialogL(), Fep(), FepUid(), FileNamesOfAvailableFepsL(), Flush(), ForEachFepObserverCall(), Format128(), Format256(), FsSession(), HandleError(), InputCapabilitiesChanged(), InstallFepL(), IsRedrawEventPending(), IsWservEventPending(), LastEvent(), LeaveWithErrorText(), NameOfInstalledFepL(), NormalFont(), PrepareToExit(), ReadDesC16ArrayResourceL(), ReadDesC8ArrayResourceL(), ReadDesCArrayResourceL(), ReadResource(), ReadResourceAsDes16(), ReadResourceAsDes8(), ReleaseScreenFont(), RemoveFepObserver(), RemoveFocusObserver(), RemoveForegroundObserver(), RemoveMessageObserver(), RemoveObserverOfLoadedFep(), RootWin(), ScreenDevice(), SetAppUi(), SimulateKeyEventL(), SuppressNextFlush(), SwapSystemGc(), SystemGc(), WsSession()

Inherited from MApaAppStarter:
StartAppL()


Construction and destruction

Description

Applications do not normally need to create a new CEikonEnv. An instance is always available to the application through CEikApplication::iCoeEnv, CEikonEnv::Static() or the iEikonEnv macro of CEikApplication.


CEikonEnv()

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()

void ConstructL();

Description

Second-phase constructor.

Initialises a new CEikonEnv's fields.


ConstructL()

void ConstructL(TBool aInitialFocusState);

Description

Second-phase constructor.

This is called by the previous constructor ConstructL(), with aInitialFocusState of ETrue.

Parameters

TBool aInitialFocusState

Window group initial focus state. If ETrue, keyboard focus is enabled, otherwise keyboard focus is disabled.


~CEikonEnv()

~CEikonEnv();

Description

Destructor

Frees any resources acquired by this CEikonEnv during its construction.


ConstructAppFromCommandLineL()

void ConstructAppFromCommandLineL(const CApaCommandLine& aCommandLine);

Description

Initialises an application

Constructs a new application consisting of a CEikAppUi, a CEikApplication, and a CEikDocument. The new Uikon 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().

Parameters

const CApaCommandLine& aCommandLine

The command line used to initialise the new application.

[Top]


Static functions


Static()

static CEikonEnv* Static();

Description

Gets the CEikonEnv maintained by the framework for the application. Compare CCoeEnv::Static().

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.


Version()

static TVersion Version();

Description

Gets the Uikon version that is currently running.

Return value

TVersion

The Uikon version.


InfoWinL()

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

Description

Displays a modal information dialog (CEikInfoDialog) on the screen with the specified lines of text.

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

Parameters

const TDesC& aFirstLine

First line of dialog text.

const TDesC& aSecondLine

Second line of dialog text.


AddWindowShadow()

static void AddWindowShadow(CCoeControl* aWinArea);

Description

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


QueryWinL()

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

Description

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

Parameters

const TDesC& aFirstLine

First line of query text.

const TDesC& aSecondLine

Second line of query text.

Return value

TBool

User's response.


Beep()

static void Beep();

Description

Emits a beep.


NewDefaultSingleLineParaFormatLayerL()

static CParaFormatLayer* NewDefaultSingleLineParaFormatLayerL();

Description

Creates a paragraph format layer for single line texts.

Return value

CParaFormatLayer*

A new CParaFormatLayer suitable for single line texts.


NewDefaultParaFormatLayerL()

static CParaFormatLayer* NewDefaultParaFormatLayerL();

Description

Creates a default paragraph format layer for text that has more than one line.

Return value

CParaFormatLayer*

A new CParaFormatLayer suitable for text that has more than one line.


NewDefaultCharFormatLayerL()

static CCharFormatLayer* NewDefaultCharFormatLayerL();

Description

Creates a default character format layer.

Return value

CCharFormatLayer*

A new CCharFormatLayer in the default style.


GetPrinterNamesL()

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

Description

Gets printer names from a CPrinterModelList

The printer names are returned through aPrinterNameList.

Parameters

CPrinterModelList* aModelNameList

Input list of printer model information.

CDesCArray& aPrinterNameList

On return, contains all the printer names from aModelNameList.

[Top]


Access


AppUiFactory()

MEikAppUiFactory* AppUiFactory() const;

Description

Gets the Application UI factory object.

This object implements the MEikAppUiFactory interface.

Return value

MEikAppUiFactory*

App UI factory interface.


AppUiFactory()

MEikAppUiFactory* AppUiFactory(const CEikAppUi& aAppUi) const;

Support

Supported from 6.1

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.


Process()

CEikProcess* Process() const;

Description

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

Return value

CEikProcess*

The CEikProcess object.


ClockDllL()

RAnimDll& ClockDllL();

Description

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

Return value

RAnimDll&

Reference to the RAnimDll.


EikAppUi()

CEikAppUi* EikAppUi() const;

Description

Gets the application UI of the application using this CEikonEnv.

Return value

CEikAppUi*

Pointer to the CEikAppUi.


NewDefaultPrintSetupL()

CPrintSetup* NewDefaultPrintSetupL();

Description

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

Return value

CPrintSetup*

A default printer setup object.


DefaultDisplayMode()

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.


NudgeCharMinus()

TChar NudgeCharMinus() const;

Description

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

Return value

TChar

Minus nudge character.


NudgeCharPlus()

TChar NudgeCharPlus() const;

Description

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

Return value

TChar

Plus nudge character.


VirtualCursor()

TEikVirtualCursor& VirtualCursor();

Description

Gets the virtual cursor.

Return value

TEikVirtualCursor&

Virtual cursor.

[Top]


Picture factory


PictureFactory()

MPictureFactory* PictureFactory() const;

Description

Gets the picture factory for this environment.

Return value

MPictureFactory*

The picture factory.


ExtendedPictureFactory()

MEikPictureFactory* ExtendedPictureFactory(TUid aPictureType) const;

Support

Supported from 6.1

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()

void AddPictureFactoryL(MEikPictureFactory& aFactory);

Support

Supported from 6.1

Description

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

For a picture factory to be available system wide, AddPictureFactoryL() should normally be called during the InitializeL() method of a CEikLibrary derived class.

Parameters

MEikPictureFactory& aFactory

The picture factory to add.


RemovePictureFactory()

void RemovePictureFactory(TUid aFactoryId);

Support

Supported from 6.1

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.

[Top]


Text functions


SystemCharFormatLayerL()

CCharFormatLayer* SystemCharFormatLayerL();

Description

Gets the character format layer if it exists. If it does not exist, calls CEikonEnv::NewDefaultCharFormatLayerL() to create a new character format layer.

Return value

CCharFormatLayer*

Character format layer.


SystemParaFormatLayerL()

CParaFormatLayer* SystemParaFormatLayerL();

Description

Gets the paragraph format layer if it exists. If it does not exist, calls CEikonEnv::NewDefaultParaFormatLayerL() to create a new paragraph format layer.

Return value

CParaFormatLayer*

Paragraph format layer.


SystemSingleLineParaFormatLayerL()

CParaFormatLayer* SystemSingleLineParaFormatLayerL();

Description

Gets the single line paragraph format layer if it exists. If it does not exist, calls CEikonEnv::NewDefaultSingleLineParaFormatLayerL() to create a new paragraph format layer for single-line texts.

Return value

CParaFormatLayer*

Single line paragraph format layer.


Font()

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

CFont*

Pointer to the font that most closely matches aLogicalFont.


AnnotationFont()

const CFont* AnnotationFont() const;

Description

Gets the standard annotation font for this environment.

Return value

CFont*

Pointer to the annotation font.


TitleFont()

const CFont* TitleFont() const;

Description

Gets the standard title font for this environment.

Return value

CFont*

Pointer to the title font.


LegendFont()

const CFont* LegendFont() const;

Description

Gets the standard legend font for this environment.

Return value

CFont*

Pointer to the legend font.


SymbolFont()

const CFont* SymbolFont() const;

Description

Gets the standard symbol font for this environment.

Return value

CFont*

Pointer to the symbol font.


DenseFont()

const CFont* DenseFont() const;

Description

Gets the standard dense font for this environment.

Return value

CFont*

Pointer to the dense font.

[Top]


Bitmap functions


CreateIconFromMaskedBitmapL()

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 application architecture masked bitmap aApaMaskedBitmap. Returns a pointer to the icon and transfers ownership.

Parameters

const CApaMaskedBitmap& aApaMaskedBitmap

The masked bitmap from which the icon is created.

Return value

CGulIcon*

Pointer to the created icon.


CreateIconL()

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

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. Returns a pointer to the icon and transfers ownership.

Parameters

const TDesC& aFileName

The resource file name. If this is zero, the Uikon resource file will be used. If the wildcard '*' is passed as aFileName 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.


Bitmap()

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

CFbsBitmap*

Pointer to the bitmap.


OptionBitmap()

const CFbsBitmap* OptionBitmap() const;

Description

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

Return value

CFbsBitmap*

Pointer to the option bitmap.


CreateBitmapL()

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:\system\data\eikon.mbm is used.

Parameters

const TDesC& 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.

[Top]


Alert window


AlertWin()

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

Description

Displays an alert window with a brief message.

Parameters

const TDesC& aMsg1

First line of the message.

const TDesC& aMsg2

Second line of the message.

[Top]


Query dialogs


QueryWinL()

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

Description

Displays a yes or no query dialog and returns the user's choice. The query text is read from the passed resource IDs.

Parameters

TInt aFirstLineId

ID of resource describing the first line.

TInt aSecondLineId=0

ID of resource describing the second line.

Return value

TBool

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


ConfirmLossOfAllChangesL()

TBool ConfirmLossOfAllChangesL() const;

Description

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

Return value

TBool

Whether the user wants to lose all changes.

[Top]


Information messages

Description

Information messages are brief, informative messages that are displayed in the top-right corner of the screen for a few seconds.


AllocInfoMsg()

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.


FservAllocInfoMsg()

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.


WservAllocInfoMsg()

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.


InfoMsg()

void InfoMsg (TInt aResourceId,VA_LIST aList);

Description

Displays a message in the top-right corner of the screen.

The message window disappears after a few seconds.

A TBUF-resource-specified formatting string may be used to build the message at run-time from arbitrary data in a similar way to C's printf().

Parameters

const TDesC& aDes

Message to display.

TInt aResourceId

ID of a TBUF resource used to format the string (see TBuf::Format()).

...

List of items to be formatted.

VA_LIST aList

List of values to be formatted.


InfoMsgWithAlignment()

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

Description

Displays a message in the specified corner of the screen.

Information messages can be built at run-time from a formatting string defined as a TBUF resource and a list of arbitrary data.

Parameters

TGulAlignment aCorner

The screen corner the message is displayed in.

const TDesC& aDes

Message to display.

TInt aResourceId

ID of a TBUF resource used to format the string (see TBuf::Format()).

...

List of items to be formatted.

VA_LIST aList

List of values to be formatted.


LeaveWithInfoMsg()

void LeaveWithInfoMsg(TInt aResourceId,...);

Description

Displays a formatted information message and then leaves.

This function calls User::Leave(KLeaveWithoutAlert), this is defined in basched.h.

Parameters

TInt aResourceId

ID of a TBUF resource used to format the string (see TBuf::Format()).

...

List of items to be formatted.


InfoMsgCancel()

void InfoMsgCancel();

Description

Cancels the currently displaying information message.


VerboseInfoMsg()

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 TDesC& aDes

Message to display.

[Top]


Busy messages and status


BusyMsgL()

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

Description

Displays a flashing busy message in the lower right corner of the screen.

The message's initial delay and screen corner may optionally be overridden.

Parameters

const TDesC& aDes

Message to display.

TGulAlignment aCorner

Corner of the screen in which to display the message.

TTimeIntervalMicroSeconds32 aInitialDelay

The number of microseconds for which the message is displayed.

TInt aResourceId

ID of resource describing the busy message to display.


BusyMsgCancel()

void BusyMsgCancel();

Description

Cancels any busy message posted by a BusyMsgL().


IsBusy()

TBool IsBusy() const;

Description

Determines whether the windows group is busy.

Return value

TBool

ETrue if the windows group is busy, EFalse otherwise.


SetBusy()

void SetBusy(TBool aBusy);

Description

Sets windows group busy state.

Parameters

TBool aBusy

ETrue to set as busy, EFalse otherwise.

[Top]


Dialogs and popup menus


SetInfoDialog()

void SetInfoDialog(MEikInfoDialog* aInfoDialog);

Description

Sets the dialog.

Parameters

MEikInfoDialog* aInfoDialog

The information dialog.


SetQueryDialog()

void SetQueryDialog(MEikInfoDialog* aQueryDialog);

Description

Sets the query dialog.

Parameters

MEikInfoDialog* aQueryDialog

The query dialog.


SetRequestInfoDialogFunc()

void SetRequestInfoDialogFunc(TRequestDialogFunc aInfoDialogFunc);

Description

Sets the request information dialog.

Parameters

TRequestDialogFunc aInfoDialogFunc

The request information dialog.


SetRequestQueryDialogFunc()

void SetRequestQueryDialogFunc(TRequestDialogFunc aQueryDialogFunc);

Description

Sets the request query dialog.

Parameters

TRequestDialogFunc aQueryDialogFunc

Request query dialog.


InfoWinL()

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

Description

Displays an information window with a one or two-line message read from the passed resources.

Parameters

TInt aFirstLineId

ID of the resource describing the first line.

TInt aSecondLineId=0

ID of the resource describing the second line.

[Top]


Text cursor drawing


DrawCursor()

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 is 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()

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.

[Top]


Control stack manipulation


ControlStackReadyL()

void ControlStackReadyL();

Description

Initialises the control stack.


AddDialogLikeControlToStackL()

void AddDialogLikeControlToStackL(CCoeControl* aControl);

Description

Adds a dialog-like control to the stack. Leave()s with no alert if there is already a control in existence in the control stack with a priority greater than ECoeStackPriorityDialog and less than ECoeStackPriorityFep.

Parameters

CCoeControl* aControl

The control to add.


AddAlertDialogLikeControlToStackL()

void AddAlertDialogLikeControlToStackL(CCoeControl* aControl);

Description

Adds an alert-dialog-like control to the stack. Leave()s with no alert if there is already a control in existence in the control stack with a priority greater than ECoeStackPriorityAlert and less than ECoeStackPriorityFep.

Parameters

CCoeControl* aControl

The control to add.


RemoveFromStack()

void RemoveFromStack(CCoeControl* aControl);

Description

Removes a control from the control stack.

Parameters

CCoeControl* aControl

The control to remove.

[Top]


Sleeping dialogs


AddSleepingDialogToStackL()

void AddSleepingDialogToStackL(CCoeControl* aControl);

Description

Adds a sleeping dialog to the CONE control stack. The sleeping dialog is not initially visible.

Parameters

CCoeControl* aControl

Control to add.


AddSleepingAlertDialogToStackL()

public: void AddSleepingAlertDialogToStackL(CCoeControl* aControl);

Description

Adds a sleeping dialog to the CONE control stack that when roused is displayed with a priority similar to an alert. The sleeping dialog is not initially visible.

Parameters

CCoeControl* aControl

Control to add.


RouseSleepingDialog()

void RouseSleepingDialog(CCoeControl* aControl, TBool aRoused);

Description

Sets dialog sleep state.

Parameters

CCoeControl* aControl

Control to rouse or put to sleep.

TBool aRoused

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

[Top]


Colour support

Description

The following functions enable custom controls to retrieve colours from the colour list, and to override the system default colour settings.


Color()

TRgb Color(TLogicalColor aLogicalColor) const;

Description

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

Parameters

TLogicalColor aLogicalColor

A logical colour value.

Return value

TRgb

The physical colour which corresponds to aLogicalColor.


ControlColor()

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(), 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.


SetColor()

void SetColor(TLogicalColor aLogicalColor,TRgb aColor);

Description

Sets the 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.


ColorList()

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


CustomColorArray()

CColorArray& CustomColorArray() const;

Description

Gets the custom colour array.

Return value

CColorArray&

The custom colour array.

[Top]


Events


RespondsToShutdownEvent()

TBool RespondsToShutdownEvent() const;

Description

Tests whether an application responds to shutdown events.

Return value

TBool

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


SetRespondsToShutdownEvent()

void SetRespondsToShutdownEvent(TBool aRespondsToShutdownEvent);

Description

Sets whether an application responds to shutdown events.

Parameters

TBool aRespondsToShutdownEvent

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


RespondsToSwitchFilesEvent()

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.


SetRespondsToSwitchFilesEvent()

void SetRespondsToSwitchFilesEvent(TBool aRespondsToSwitchFilesEvent);

Description

Sets whether an application responds to switch files events.

Parameters

TBool aRespondsToSwitchFilesEvent

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

[Top]


Document name


DocNameIsAFile()

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.


SetDocNameIsAFile()

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.

[Top]


System attribute


IsSystem()

TBool IsSystem() const;

Description

Tests the value of the system attribute.

Return value

TBool

ETrue if the system attribute is set, otherwise EFalse.


SetSystem()

void SetSystem(TBool aSystem);

Description

Sets the application's system attribute.

While the system attribute is set, the application cannot be closed down.

Parameters

TBool aSystem

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

[Top]


Error functions


HandleErrorWithContext()

void HandleErrorWithContext(TInt aError,TInt aContextRid);

Description

Handles the specified error. This function reads the error context text from the resource identified by aContextRid.

Parameters

TInt aError

ID of the error to handle.

TInt aContextRid

ID of the resource from which the context is read.


NotifyIdleError()

void NotifyIdleError(TInt aError,TInt aContextRid);

Description

Notifies this environment of an idle error. This function reads the error context text from the resource identified by aContextRid.

Parameters

TInt aError

ID of the idle error.

TInt aContextRid

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


NotifyIdleErrorWhileRedrawing()

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.

[Top]


Utility functions


UpdateTaskNameL()

void UpdateTaskNameL();

Description

Updates the process name from the caption.

[Top]


Restack window group and autoforwarding


BringForwards()

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=ECoeWinPriorityAlwaysAtFront

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


SetAutoForwarding()

void SetAutoForwarding(TBool aForwarding);

Description

Sets auto-forward state.

Parameters

TBool aForwarding

ETrue to set autoforwarding on, EFalse otherwise.

[Top]


Information message


InfoMsgWithDuration()

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

Support

Supported from 6.1

Description

Displays an info message for a specified period.

The text displayed is supplied in a descriptor argument.

Parameters

const TDesC& aDes

Message to display.

const TTimeIntervalMicroSeconds32 aDuration

Duration of message.


InfoMsgWithDuration()

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

Support

Supported from 6.1

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 supplied through the variable argument list which is also passed into this function.

Parameters

TInt aResourceId

Message to display.

TTimeIntervalMicroSeconds32 aDuration

Duration of message.

...

List of items.

See also:


InfoMsgWithDuration()

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

Support

Supported from 6.1

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

Message to display.

TTimeIntervalMicroSeconds32 aDuration

Duration of message.

VA_LIST aList

List of values.

See also:


InfoMsgWithAlignmentAndDuration()

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

Support

Supported from 6.1

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 TDesC& aDes

Message to display.

const TTimeIntervalMicroSeconds32 aDuration

Duration of message.


InfoMsgWithAlignmentAndDuration()

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

Support

Supported from 6.1

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 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

Message to display.

TTimeIntervalMicroSeconds32 aDuration

Duration of message.

...

List of items.

See also:


InfoMsgWithAlignmentAndDuration()

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

Support

Supported from 6.1

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

Message to display.

TTimeIntervalMicroSeconds32 aDuration

Duration of message.

VA_LIST aList

List of values.

See also: