CEikAppUi Class Reference

class CEikAppUi : public CCoeAppUi

Handles application-wide aspects of the application's user interface such as the menu bar, toolbar pop-up menus, opening and closing files and exiting the application cleanly.

Every GUI application should use its own class derived from CEikAppUi.

An app UI's main role is to handle commands, in its HandleCommandL() function. These may be invoked using the menu bar, toolbar, or hotkeys; the commands that an app UI handles are specified in the application's resource file.

In addition, the app UI normally needs to respond to other kinds of events, by providing suitable implementations of the following virtual functions, all inherited from CCoeAppUi:

Inherits from

Public Member Functions
CEikAppUi()
~CEikAppUi()
CEikAppUiExtra *AppUiExtra()
IMPORT_C CEikApplication *Application()
IMPORT_C TLanguageApplicationLanguageL()
IMPORT_C TRectApplicationRect()
IMPORT_C TRectClientRect()
IMPORT_C voidConstructL()
CEikAppUi *ContainerAppUi()
IMPORT_C voidCreateFileL(const TDesC &)
IMPORT_C CEikDocument *Document()
IMPORT_C TBoolFadeWhenInBackground()
IMPORT_C voidHandleCommandL(TInt)
IMPORT_C TErrorHandlerResponseHandleError(TInt, const SExtendedError &, TDes &, TDes &)
IMPORT_C voidHandleModelChangeL()
IMPORT_C voidHandleResourceChangeL(TInt)
IMPORT_C voidLaunchPopupMenuL(TInt, const TPoint &, TPopupTargetPosType, const CEikHotKeyTable *)
IMPORT_C voidOpenFileL(const TDesC &)
IMPORT_C voidPrepareToExit()
IMPORT_C TBoolProcessCommandParametersL(TApaCommand, TFileName &, const TDesC8 &)
IMPORT_C TBoolProcessCommandParametersL(CApaCommandLine &)
IMPORT_C voidProcessMessageL(TUid, const TDesC8 &)
IMPORT_C voidReportResourceChangedToAppL(TInt)
IMPORT_C voidReportResourceChangedToAppStackL(CEikAppUi *, TInt)
IMPORT_C voidSetDocument(CEikDocument *)
IMPORT_C voidSetEmbeddedDocInfo(MApaEmbeddedDocObserver *, TBool)
voidSetFaded(TBool)
IMPORT_C voidSetFadedL(TBool)
IMPORT_C voidStopDisplayingMenuBar()
Protected Member Functions
IMPORT_C voidBaseConstructL(TInt)
IMPORT_C voidClosePopup()
IMPORT_C voidCreateHotKeyControlL(TInt)
IMPORT_C voidExit()
IMPORT_C voidHandleApplicationSpecificEventL(TInt, const TWsEvent &)
IMPORT_C voidHandleForegroundEventL(TBool)
IMPORT_C MCoeMessageObserver::TMessageResponseHandleMessageL(TUint32, TUid, const TDesC8 &)
IMPORT_C voidHandleScreenDeviceChangedL()
IMPORT_C voidHandleSideBarMenuL(TInt, const TPoint &, TInt, const CEikHotKeyTable *)
IMPORT_C voidHandleSystemEventL(const TWsEvent &)
IMPORT_C voidHandleWsEventL(const TWsEvent &, CCoeControl *)
IMPORT_C MObjectProvider *MopNext()
IMPORT_C TTypeUid::PtrMopSupplyObject(TTypeUid)
IMPORT_C voidProcessCommandL(TInt)
IMPORT_C TBoolProcessCommandParametersL(TApaCommand, TFileName &)
IMPORT_C voidReadAppInfoResourceL(TInt)
IMPORT_C voidSaveAnyChangesL()
IMPORT_C voidSaveL()
IMPORT_C voidSetDocChanged()
Private Member Functions
voidCreateResourceIndependentFurnitureL()
IMPORT_C voidReserved_3()
IMPORT_C voidReserved_4()
IMPORT_C voidSetEmphasis(CCoeControl *, TBool)
TBool ValidFileExistsL(const TDesC &)
IMPORT_C TBoolValidFileType(TUid)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CCoeAppUi::ActivateTopViewL()
CCoeAppUi::ActivateViewL(const TVwsViewId &)
CCoeAppUi::ActivateViewL(const TVwsViewId &,TUid,const TDesC8 &)
CCoeAppUi::AddToStackL(CCoeControl *,TInt,TInt)
CCoeAppUi::AddToStackL(const MCoeView &,CCoeControl *,TInt,TInt)
CCoeAppUi::AddToViewStackL(const MCoeView &,CCoeControl *,TInt,TInt)
CCoeAppUi::AddViewActivationObserverL(MCoeViewActivationObserver *)
CCoeAppUi::AddViewDeactivationObserverL(MCoeViewDeactivationObserver *)
CCoeAppUi::AddViewObserverL(MCoeViewObserver *)
CCoeAppUi::AppHelpContextL()const
CCoeAppUi::CCoeAppUi()
CCoeAppUi::CheckInitializeViewsL(TUid)
CCoeAppUi::CheckSourceOfViewSwitchL(const TSecurityPolicy &,const char *)const
CCoeAppUi::ConstructL(CCoeAppUi *)
CCoeAppUi::CreateActivateViewEventL(const TVwsViewId &,TUid,const TDesC8 &)
CCoeAppUi::DeactivateActiveViewIfOwnerMatchL()
CCoeAppUi::DeactivateActiveViewL()
CCoeAppUi::DeregisterApplicationView()
CCoeAppUi::DeregisterView(const MCoeView &)
CCoeAppUi::DeregisterViewAndRemoveStack(const MCoeView &)
CCoeAppUi::EnableExternalViewSwitches(TBool)
CCoeAppUi::FrameworkCallsRendezvous()const
CCoeAppUi::GetActiveViewId(TVwsViewId &)const
CCoeAppUi::GetDefaultViewId(TVwsViewId &)const
CCoeAppUi::GetSystemDefaultViewL(TVwsViewId &)
CCoeAppUi::GetTopViewId(TVwsViewId &)const
CCoeAppUi::HandleStackChanged()
CCoeAppUi::HandleStackedControlsResourceChange(TInt)
CCoeAppUi::InputCapabilities()const
CCoeAppUi::IsControlOnStack(CCoeControl *)const
CCoeAppUi::IsDisplayingControlBetweenPriorities(TInt,TInt)const
CCoeAppUi::IsDisplayingDialog()const
CCoeAppUi::IsDisplayingMenuOrDialog()const
CCoeAppUi::IsViewConstructed(const TVwsViewId &)const
CCoeAppUi::MonitorWsEvent(const TWsEvent &)
CCoeAppUi::NotifyFontChange(const CCoeFontProvider &)
CCoeAppUi::NotifyNextActivation(MCoeViewActivationObserver &)
CCoeAppUi::NotifyNextActivation(const TVwsViewId &,MCoeViewActivationObserver &)
CCoeAppUi::NotifyNextDeactivation(MCoeViewDeactivationObserver &)
CCoeAppUi::NotifyNextDeactivation(const TVwsViewId &,MCoeViewDeactivationObserver &)
CCoeAppUi::RefetchPixelMappingL()
CCoeAppUi::RegisterApplicationViewL(TUid)
CCoeAppUi::RegisterViewAndAddStackL(MCoeView &)
CCoeAppUi::RegisterViewL(MCoeView &)
CCoeAppUi::RemoveFromStack(CCoeControl *)
CCoeAppUi::RemoveFromViewStack(const MCoeView &,CCoeControl *)
CCoeAppUi::RemoveViewActivationObserver(MCoeViewActivationObserver *)
CCoeAppUi::RemoveViewDeactivationObserver(MCoeViewDeactivationObserver *)
CCoeAppUi::RemoveViewObserver(MCoeViewObserver *)
CCoeAppUi::SetApplicationViewAsDefaultL()
CCoeAppUi::SetCurrentControlStackGroupId(TInt)
CCoeAppUi::SetCustomControl(TInt)
CCoeAppUi::SetDefaultViewL(const MCoeView &)
CCoeAppUi::SetSystemDefaultViewL(const TVwsViewId &)
CCoeAppUi::SetSystemDefaultViewL(const TVwsViewId &,TInt)
CCoeAppUi::SetWindowGroupOrdinal(TInt)
CCoeAppUi::TopFocusedControl()const
CCoeAppUi::UpdateStackedControlFlags(CCoeControl *,TInt,TInt)
CCoeAppUi::UpdateViewServerBackgroundColor(const TRgb &)
CCoeAppUi::UpdateViewStackedControlFlags(const MCoeView &,CCoeControl *,TInt,TInt)
CCoeAppUi::WriteInternalStateOfStackedControlsL(RWriteStream &)const
CCoeAppUi::~CCoeAppUi()
Public Member Enumerations
enumanonymous { EStandardApp = 0x00, ENoAppResourceFile = 0x01, ENonStandardResourceFile = 0x02, ENoScreenFurniture = 0x04, ELastReservedEikAppUiFlag = 0x8000 }
Private Member Enumerations
enumanonymous { EEmbedded = 0x01 }
Protected Attributes
CEikAppUi *iContainerAppUi
CEikDocument *iDocument
MApaEmbeddedDocObserver *iDoorObserver
TBool iEmbeddedAndReadOnly
TInt iFlags
Private Attributes
CEikAppUiExtra *iAppUiExtra
Inherited Attributes
CCoeAppUi::iCoeEnv

Constructor & Destructor Documentation

CEikAppUi()

IMPORT_CCEikAppUi()

~CEikAppUi()

IMPORT_C~CEikAppUi()

Member Functions Documentation

AppUiExtra()

CEikAppUiExtra *AppUiExtra()

Application()

IMPORT_C CEikApplication *Application()const

ApplicationLanguageL()

IMPORT_C TLanguageApplicationLanguageL()const

ApplicationRect()

IMPORT_C TRectApplicationRect()const [virtual]

BaseConstructL(TInt)

IMPORT_C voidBaseConstructL(TIntaAppUiFlags = 0)[protected]

Parameters

TInt aAppUiFlags = 0

ClientRect()

IMPORT_C TRectClientRect()const

ClosePopup()

IMPORT_C voidClosePopup()[protected]

ConstructL()

IMPORT_C voidConstructL()[virtual]

ContainerAppUi()

CEikAppUi *ContainerAppUi()const [inline]

Returns the app UI inside which this app UI is embedded. Embedded app UIs are used for editing embedded documents.

A pointer to this object's container app UI. NULL if this app UI is not embedded

CreateFileL(const TDesC &)

IMPORT_C voidCreateFileL(const TDesC &aFileName)[virtual]

Parameters

const TDesC & aFileName

CreateHotKeyControlL(TInt)

IMPORT_C voidCreateHotKeyControlL(TIntaResourceId)[protected]

Parameters

TInt aResourceId

CreateResourceIndependentFurnitureL()

voidCreateResourceIndependentFurnitureL()[private]

Document()

IMPORT_C CEikDocument *Document()const

Exit()

IMPORT_C voidExit()[protected, virtual]

FadeWhenInBackground()

IMPORT_C TBoolFadeWhenInBackground()

HandleApplicationSpecificEventL(TInt, const TWsEvent &)

IMPORT_C voidHandleApplicationSpecificEventL(TIntaType,
const TWsEvent &aEvent
)[protected, virtual]

Parameters

TInt aType
const TWsEvent & aEvent

HandleCommandL(TInt)

IMPORT_C voidHandleCommandL(TIntaCommand)[virtual]

Parameters

TInt aCommand

HandleError(TInt, const SExtendedError &, TDes &, TDes &)

IMPORT_C TErrorHandlerResponseHandleError(TIntaError,
const SExtendedError &aExtErr,
TDes &aErrorText,
TDes &aContextText
)[virtual]

Parameters

TInt aError
const SExtendedError & aExtErr
TDes & aErrorText
TDes & aContextText

HandleForegroundEventL(TBool)

IMPORT_C voidHandleForegroundEventL(TBoolaForeground)[protected, virtual]

Parameters

TBool aForeground

HandleMessageL(TUint32, TUid, const TDesC8 &)

IMPORT_C MCoeMessageObserver::TMessageResponseHandleMessageL(TUint32aClientHandleOfTargetWindowGroup,
TUidaMessageUid,
const TDesC8 &aMessageParameters
)[protected]

Parameters

TUint32 aClientHandleOfTargetWindowGroup
TUid aMessageUid
const TDesC8 & aMessageParameters

HandleModelChangeL()

IMPORT_C voidHandleModelChangeL()[virtual]

HandleResourceChangeL(TInt)

IMPORT_C voidHandleResourceChangeL(TIntaType)[virtual]

Parameters

TInt aType

HandleScreenDeviceChangedL()

IMPORT_C voidHandleScreenDeviceChangedL()[protected, virtual]

HandleSideBarMenuL(TInt, const TPoint &, TInt, const CEikHotKeyTable *)

IMPORT_C voidHandleSideBarMenuL(TIntaResourceId,
const TPoint &aPos,
TIntaModifiers,
const CEikHotKeyTable *aTable
)[protected]

Parameters

TInt aResourceId
const TPoint & aPos
TInt aModifiers
const CEikHotKeyTable * aTable

HandleSystemEventL(const TWsEvent &)

IMPORT_C voidHandleSystemEventL(const TWsEvent &aEvent)[protected, virtual]

Parameters

const TWsEvent & aEvent

HandleWsEventL(const TWsEvent &, CCoeControl *)

IMPORT_C voidHandleWsEventL(const TWsEvent &aEvent,
CCoeControl *aDestination
)[protected, virtual]

Parameters

const TWsEvent & aEvent
CCoeControl * aDestination

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

IMPORT_C voidLaunchPopupMenuL(TIntaResourceId,
const TPoint &aTargetPos,
TPopupTargetPosTypeaTargetType,
const CEikHotKeyTable *aHotKeyTable = NULL
)

Parameters

TInt aResourceId
const TPoint & aTargetPos
TPopupTargetPosType aTargetType
const CEikHotKeyTable * aHotKeyTable = NULL

MopNext()

IMPORT_C MObjectProvider *MopNext()[protected, virtual]

MopSupplyObject(TTypeUid)

IMPORT_C TTypeUid::PtrMopSupplyObject(TTypeUidaId)[protected, virtual]

Parameters

TTypeUid aId

OpenFileL(const TDesC &)

IMPORT_C voidOpenFileL(const TDesC &aFileName)[virtual]

Parameters

const TDesC & aFileName

PrepareToExit()

IMPORT_C voidPrepareToExit()[virtual]

ProcessCommandL(TInt)

IMPORT_C voidProcessCommandL(TIntaCommand)[protected]

Parameters

TInt aCommand

ProcessCommandParametersL(TApaCommand, TFileName &, const TDesC8 &)

IMPORT_C TBoolProcessCommandParametersL(TApaCommandaCommand,
TFileName &aDocumentName,
const TDesC8 &aTail
)[virtual]

Parameters

TApaCommand aCommand
TFileName & aDocumentName
const TDesC8 & aTail

ProcessCommandParametersL(CApaCommandLine &)

IMPORT_C TBoolProcessCommandParametersL(CApaCommandLine &aCommandLine)[virtual]

Parameters

CApaCommandLine & aCommandLine

ProcessCommandParametersL(TApaCommand, TFileName &)

IMPORT_C TBoolProcessCommandParametersL(TApaCommandaCommand,
TFileName &aDocumentName
)[protected]

Parameters

TApaCommand aCommand
TFileName & aDocumentName

ProcessMessageL(TUid, const TDesC8 &)

IMPORT_C voidProcessMessageL(TUidaUid,
const TDesC8 &aParams
)[virtual]

Parameters

TUid aUid
const TDesC8 & aParams

ReadAppInfoResourceL(TInt)

IMPORT_C voidReadAppInfoResourceL(TIntaResourceFileOffset = 0)[protected]

Parameters

TInt aResourceFileOffset = 0

ReportResourceChangedToAppL(TInt)

IMPORT_C voidReportResourceChangedToAppL(TIntaType)[virtual]

Parameters

TInt aType

ReportResourceChangedToAppStackL(CEikAppUi *, TInt)

IMPORT_C voidReportResourceChangedToAppStackL(CEikAppUi *aTopApp,
TIntaEventId
)

Parameters

CEikAppUi * aTopApp
TInt aEventId

Reserved_3()

IMPORT_C voidReserved_3()[private, virtual]

Reserved_4()

IMPORT_C voidReserved_4()[private, virtual]

SaveAnyChangesL()

IMPORT_C voidSaveAnyChangesL()[protected]

SaveL()

IMPORT_C voidSaveL()[protected]

SetDocChanged()

IMPORT_C voidSetDocChanged()[protected]

SetDocument(CEikDocument *)

IMPORT_C voidSetDocument(CEikDocument *aDocument)

Parameters

CEikDocument * aDocument

SetEmbeddedDocInfo(MApaEmbeddedDocObserver *, TBool)

IMPORT_C voidSetEmbeddedDocInfo(MApaEmbeddedDocObserver *aObserver,
TBoolaReadOnly
)

Parameters

MApaEmbeddedDocObserver * aObserver
TBool aReadOnly

SetEmphasis(CCoeControl *, TBool)

IMPORT_C voidSetEmphasis(CCoeControl *aMenuWindow,
TBoolaEmphasis
)[private]

Parameters

CCoeControl * aMenuWindow
TBool aEmphasis

SetFaded(TBool)

voidSetFaded(TBoolaFaded)[inline]

Parameters

TBool aFaded

SetFadedL(TBool)

IMPORT_C voidSetFadedL(TBoolaFaded)[virtual]

Parameters

TBool aFaded

StopDisplayingMenuBar()

IMPORT_C voidStopDisplayingMenuBar()[virtual]

ValidFileExistsL(const TDesC &)

TBool ValidFileExistsL(const TDesC &aFileName)[private]

Parameters

const TDesC & aFileName

ValidFileType(TUid)

IMPORT_C TBoolValidFileType(TUidaFileUid)const [private, virtual]

Parameters

TUid aFileUid

Member Enumerations Documentation

Enum anonymous

Application resource file and screen furniture flags, passed to BaseConstructL().

Enumerators

EStandardApp = 0x00

Application uses a standard resource file.

ENoAppResourceFile = 0x01

Application has no resource file.

ENonStandardResourceFile = 0x02

Application uses a different resource file from the standard.

ENoScreenFurniture = 0x04

Application uses no screen furniture.

ELastReservedEikAppUiFlag = 0x8000

Indicates the last value in the enum.

Enum anonymous

Enumerators

EEmbedded = 0x01

Member Data Documentation

CEikAppUiExtra * iAppUiExtra

CEikAppUiExtra *iAppUiExtra[private]

CEikAppUi * iContainerAppUi

CEikAppUi *iContainerAppUi[protected]

A pointer to the containing app UI. This is NULL for non-embedded apps.

CEikDocument * iDocument

CEikDocument *iDocument[protected]

A pointer to the application's document.

MApaEmbeddedDocObserver * iDoorObserver

MApaEmbeddedDocObserver *iDoorObserver[protected]

Embedded document observer.

TBool iEmbeddedAndReadOnly

TBool iEmbeddedAndReadOnly[protected]

Indicates whether or not this is the app UI for an embedded, read-only document.

TInt iFlags

TInt iFlags[protected]