CCoeAppUi Class Reference

class CCoeAppUi : public CBase

Application user interface (app UI) base class.

The app UI's responsibilities include owning the application's control stack and views, handling user commands, (see the derived class CEikAppUi), and handling events sent by the OS to the application, for instance being brought to the foreground.

The UI framework class CEikAppUi is derived from this class. UIs may derive further to add their own UI-specific features to the app UI; each application must derive its own concrete app UI class from this.

Inherits from

Nested Classes and Structures

Public Member Functions
CCoeAppUi()
~CCoeAppUi()
IMPORT_C voidActivateTopViewL()
IMPORT_C voidActivateViewL(const TVwsViewId &)
IMPORT_C voidActivateViewL(const TVwsViewId &, TUid, const TDesC8 &)
IMPORT_C voidAddToStackL(const MCoeView &, CCoeControl *, TInt, TInt)
IMPORT_C voidAddToStackL(CCoeControl *, TInt, TInt)
IMPORT_C voidAddToViewStackL(const MCoeView &, CCoeControl *, TInt, TInt)
IMPORT_C voidAddViewActivationObserverL(MCoeViewActivationObserver *)
IMPORT_C voidAddViewDeactivationObserverL(MCoeViewDeactivationObserver *)
IMPORT_C voidAddViewObserverL(MCoeViewObserver *)
IMPORT_C CArrayFix< TCoeHelpContext > *AppHelpContextL()
IMPORT_C voidCheckInitializeViewsL(TUid)
IMPORT_C TBoolCheckSourceOfViewSwitchL(const TSecurityPolicy &, const char *)
IMPORT_C voidConstructL(CCoeAppUi *)
IMPORT_C voidCreateActivateViewEventL(const TVwsViewId &, TUid, const TDesC8 &)
IMPORT_C voidDeactivateActiveViewIfOwnerMatchL()
IMPORT_C voidDeactivateActiveViewL()
IMPORT_C voidDeregisterApplicationView()
IMPORT_C voidDeregisterView(const MCoeView &)
IMPORT_C voidDeregisterViewAndRemoveStack(const MCoeView &)
IMPORT_C TIntEnableExternalViewSwitches(TBool)
IMPORT_C TBoolFrameworkCallsRendezvous()
IMPORT_C TIntGetActiveViewId(TVwsViewId &)
IMPORT_C TIntGetDefaultViewId(TVwsViewId &)
IMPORT_C voidGetSystemDefaultViewL(TVwsViewId &)
IMPORT_C TIntGetTopViewId(TVwsViewId &)
IMPORT_C voidHandleStackChanged()
IMPORT_C voidHandleStackedControlsResourceChange(TInt)
IMPORT_C voidHandleWsEventL(const TWsEvent &, CCoeControl *)
IMPORT_C TCoeInputCapabilitiesInputCapabilities()
TBool IsControlOnStack(CCoeControl *)
IMPORT_C TBoolIsDisplayingControlBetweenPriorities(TInt, TInt)
IMPORT_C TBoolIsDisplayingDialog()
IMPORT_C TBoolIsDisplayingMenuOrDialog()
IMPORT_C TBoolIsViewConstructed(const TVwsViewId &)
voidMonitorWsEvent(const TWsEvent &)
voidNotifyFontChange(const CCoeFontProvider &)
IMPORT_C voidNotifyNextActivation(const TVwsViewId &, MCoeViewActivationObserver &)
IMPORT_C voidNotifyNextActivation(MCoeViewActivationObserver &)
IMPORT_C voidNotifyNextDeactivation(const TVwsViewId &, MCoeViewDeactivationObserver &)
IMPORT_C voidNotifyNextDeactivation(MCoeViewDeactivationObserver &)
IMPORT_C voidPrepareToExit()
voidRefetchPixelMappingL()
IMPORT_C voidRegisterApplicationViewL(TUid)
IMPORT_C voidRegisterViewAndAddStackL(MCoeView &)
IMPORT_C voidRegisterViewL(MCoeView &)
IMPORT_C voidRemoveFromStack(CCoeControl *)
IMPORT_C voidRemoveFromViewStack(const MCoeView &, CCoeControl *)
IMPORT_C voidRemoveViewActivationObserver(MCoeViewActivationObserver *)
IMPORT_C voidRemoveViewDeactivationObserver(MCoeViewDeactivationObserver *)
IMPORT_C voidRemoveViewObserver(MCoeViewObserver *)
IMPORT_C voidSetApplicationViewAsDefaultL()
voidSetCurrentControlStackGroupId(TInt)
IMPORT_C voidSetCustomControl(TInt)
IMPORT_C voidSetDefaultViewL(const MCoeView &)
IMPORT_C voidSetSystemDefaultViewL(const TVwsViewId &, TInt)
IMPORT_C voidSetSystemDefaultViewL(const TVwsViewId &)
IMPORT_C voidSetWindowGroupOrdinal(TInt)
IMPORT_C CCoeControl *TopFocusedControl()
IMPORT_C voidUpdateStackedControlFlags(CCoeControl *, TInt, TInt)
IMPORT_C voidUpdateViewServerBackgroundColor(const TRgb &)
IMPORT_C voidUpdateViewStackedControlFlags(const MCoeView &, CCoeControl *, TInt, TInt)
IMPORT_C voidWriteInternalStateOfStackedControlsL(RWriteStream &)
Protected Member Functions
IMPORT_C voidHandleScreenDeviceChangedL()
Private Member Functions
IMPORT_C voidCCoeAppUi_Reserved_2()
voidDoAddToStackL(CCoeControlStack *, CCoeControl *, TInt, TInt)
voidDoAddToStackL(CCoeControlStack *, CCoeControl *, TInt, TInt, TInt)
voidDoRemoveFromStack(CCoeControlStack *, CCoeControl *, TRemoveCondition)
voidDoUpdateStackedControlFlags(CCoeControlStack *, CCoeControl *, TInt, TInt)
TInt FindPos(CCoeControlStack *, CCoeControl *)
IMPORT_C voidHandleApplicationSpecificEventL(TInt, const TWsEvent &)
IMPORT_C voidHandleForegroundEventL(TBool)
IMPORT_C TKeyResponseHandleKeyEventL(const TKeyEvent &, TEventCode)
IMPORT_C voidHandleSwitchOnEventL(CCoeControl *)
IMPORT_C voidHandleSystemEventL(const TWsEvent &)
IMPORT_C CArrayFix< TCoeHelpContext > *HelpContextL()
IMPORT_C voidSetAndDrawFocus(TBool)
voidSetFocusToControl(CCoeControl *, TBool)
CCoeControl *TopFocusableControl()
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()
Private Member Enumerations
enumTRemoveCondition { ERemoveUnconditionally, ERemoveOnlyIfSharable }
Protected Attributes
CCoeEnv *iCoeEnv
Private Attributes
TInt iCCoeAppUi_Reserved1
CExtra *iExtra
CCoeControlStack *iStack
CCoeViewManager *iViewManager

Constructor & Destructor Documentation

CCoeAppUi()

IMPORT_CCCoeAppUi()

C++ constructor.

To complete construction, call ConstructL().

~CCoeAppUi()

IMPORT_C~CCoeAppUi()

The destructor frees all resources owned by the object, including the control stack and the view server session.

Member Functions Documentation

ActivateTopViewL()

IMPORT_C voidActivateTopViewL()

Activates the top view for this app UI.

This is the most recently active view, if any. Otherwise, it activates the default view. If there is no default view, it activates the first registered view.

ActivateViewL(const TVwsViewId &)

IMPORT_C voidActivateViewL(const TVwsViewId &aViewId)

Activates an application view.

A leave occurs if view activation fails.

Parameters

const TVwsViewId & aViewIdIdentifier of the view to activate.

ActivateViewL(const TVwsViewId &, TUid, const TDesC8 &)

IMPORT_C voidActivateViewL(const TVwsViewId &aViewId,
TUidaCustomMessageId,
const TDesC8 &aCustomMessage
)

Activates an application view and passes a message to it.

A leave occurs if view activation fails.

Notes:

Activation works synchronously so that in general, this method returns when the view is activated.

An application defines and publishes the message UIDs that it recognises. For example, a contacts application might activate an email editor view, passing an email address as a custom message. To do this, the contacts application must use a message UID, and descriptor encoding that the email application has published as being recognisable.

Parameters

const TVwsViewId & aViewIdIdentifies the view to activate.
TUid aCustomMessageIdSpecifies the message type.
const TDesC8 & aCustomMessageThe message to pass to the activated view.

AddToStackL(const MCoeView &, CCoeControl *, TInt, TInt)

IMPORT_C voidAddToStackL(const MCoeView &aView,
CCoeControl *aControl,
TIntaPriority = ECoeStackPriorityDefault,
TIntaStackingFlags = ECoeStackFlagStandard
)

Inserts a control into the app UI's control stack.

Parameters

const MCoeView & aViewThe view that contains the control.
CCoeControl * aControlThe control to add to the stack. This may itself be a view.
TInt aPriority = ECoeStackPriorityDefaultAn optional control stack priority. The default value is ECoeStackPriorityDefault. Higher priority controls are offered key events before lower priority controls.
TInt aStackingFlags = ECoeStackFlagStandardThe control's event handling behaviour. The possible values are defined in coeaui.h, beginning with ECoeStackFlagStandard.

AddToStackL(CCoeControl *, TInt, TInt)

IMPORT_C voidAddToStackL(CCoeControl *aControl,
TIntaPriority = ECoeStackPriorityDefault,
TIntaStackingFlags = ECoeStackFlagStandard
)

Inserts a control into the app UI's control stack.

Use the other AddToStackL() overload if the app UI uses multiple views.

Parameters

CCoeControl * aControlThe control to add to the stack.
TInt aPriority = ECoeStackPriorityDefaultAn optional control stack priority. The default value is ECoeStackPriorityDefault. Higher priority controls are offered key events before lower priority controls.
TInt aStackingFlags = ECoeStackFlagStandardThe control's event handling behaviour. The possible values are defined in coeaui.h, beginning with ECoeStackFlagStandard.

AddToViewStackL(const MCoeView &, CCoeControl *, TInt, TInt)

IMPORT_C voidAddToViewStackL(const MCoeView &aView,
CCoeControl *aControl,
TIntaPriority = ECoeStackPriorityDefault,
TIntaStackingFlags = ECoeStackFlagStandard
)

Parameters

const MCoeView & aView
CCoeControl * aControl
TInt aPriority = ECoeStackPriorityDefault
TInt aStackingFlags = ECoeStackFlagStandard

AddViewActivationObserverL(MCoeViewActivationObserver *)

IMPORT_C voidAddViewActivationObserverL(MCoeViewActivationObserver *aViewActivationObserver)

Adds an observer to the list of observers to be notified of view activations.

All view activation observers that have been added to the app UI are notified via their HandleViewActivation() function when any of this app UI's views are activated.

Parameters

MCoeViewActivationObserver * aViewActivationObserverThe observer to add.

AddViewDeactivationObserverL(MCoeViewDeactivationObserver *)

IMPORT_C voidAddViewDeactivationObserverL(MCoeViewDeactivationObserver *aViewDeactivationObserver)

Adds an observer to the list of observers to be notified of view deactivations.

All view deactivation observers that have been added to the app UI are notified via their HandleViewDeactivation() function when any of this app UI's views are deactivated.

Parameters

MCoeViewDeactivationObserver * aViewDeactivationObserverThe observer to add.

AddViewObserverL(MCoeViewObserver *)

IMPORT_C voidAddViewObserverL(MCoeViewObserver *aViewObserver)

Adds the specified observer to the list of view observers.

All view observers added using this function are notified via their HandleViewEventL() function when the app UI receives any view activation or deactivation event.

Parameters

MCoeViewObserver * aViewObserverThe observer to be added to the list.

AppHelpContextL()

IMPORT_C CArrayFix< TCoeHelpContext > *AppHelpContextL()const

Returns a list of help contexts appropriate to the current state of the application.

The array is generated from the help contexts for all visible controls on the app UI's control stack, and from the app UI itself (via CCoeAppUi::HelpContextL()).

CCoeAppUi_Reserved_2()

IMPORT_C voidCCoeAppUi_Reserved_2()[private, virtual]

CheckInitializeViewsL(TUid)

IMPORT_C voidCheckInitializeViewsL(TUidaAppUid)

Ensures that at least one view is registered for the app UI.

It adds an application view as the default if no views have been added, so that the application can participate in the view switching mechanism. It also sets a default view if none has been set.

This is called by the UI framework during application construction.

Parameters

TUid aAppUidThe application's 3rd UID.

CheckSourceOfViewSwitchL(const TSecurityPolicy &, const char *)

IMPORT_C TBoolCheckSourceOfViewSwitchL(const TSecurityPolicy &aSecurityPolicy,
const char *aDiagnostic = NULL
)const

Checks whether the view-server client that initiated the current view-switch matches the security-policy given in the parameter.

This function leaves with KErrUnknown if called outside of an implementation of MCoeView's ViewConstructL or of MCoeView's ViewActivatedL.

TSecurityPolicy

Parameters

const TSecurityPolicy & aSecurityPolicyThe TSecurityPolicy object which the client that initiated the current view switch must match.
const char * aDiagnostic = NULLA string that will be emitted along with any diagnostic message that may be issued if the policy check fails. This string should be enclosed in the __PLATSEC_DIAGNOSTIC_STRING macro which enables it to be easily removed from the system.

ConstructL(CCoeAppUi *)

IMPORT_C voidConstructL(CCoeAppUi *aPrevious = NULL)

Completes construction of the CCoeAppUi object.

It creates the application's control stack and starts a view server session.

Parameters

CCoeAppUi * aPrevious = NULLIf non-NULL, ConstructL() transfers ownership of all of the controls owned by aPrevious to the new app UI being constructed, adding them to the new app UI's control stack.

CreateActivateViewEventL(const TVwsViewId &, TUid, const TDesC8 &)

IMPORT_C voidCreateActivateViewEventL(const TVwsViewId &aViewId,
TUidaCustomMessageId,
const TDesC8 &aCustomMessage
)

Sends a request to the view server to activate the specified view, and returns without waiting for the request to complete.

Note that this method may return without error but the activation may subsequently fail.

Parameters

const TVwsViewId & aViewIdIdentifies the view to activate.
TUid aCustomMessageIdThe message type.
const TDesC8 & aCustomMessageThe message to pass to the activated view.

DeactivateActiveViewIfOwnerMatchL()

IMPORT_C voidDeactivateActiveViewIfOwnerMatchL()

Deactivates the active view if the current view is owned by this application.

Deactivating the active view is necessary before exiting if the app UI has an active view. This function is called by the UI framework during application closure.

DeactivateActiveViewL()

IMPORT_C voidDeactivateActiveViewL()

Deactivates the active view.

Deactivating the active view is necessary before exiting if the app UI has an active view. In most cases, DeactivateActiveViewIfOwnerMatch should be used instead of this function.

DeactivateActiveViewIfOwnerMatch

DeregisterApplicationView()

IMPORT_C voidDeregisterApplicationView()

Deregisters the application view from the view architecture.

DeregisterView(const MCoeView &)

IMPORT_C voidDeregisterView(const MCoeView &aView)

Deregisters a view.

All views must be deregistered before the application exits. This is usually done in the app UI's destructor.

It has no effect if the specified view does not exist.

Parameters

const MCoeView & aViewThe view to be deregistered.

DeregisterViewAndRemoveStack(const MCoeView &)

IMPORT_C voidDeregisterViewAndRemoveStack(const MCoeView &aView)

Parameters

const MCoeView & aView

DoAddToStackL(CCoeControlStack *, CCoeControl *, TInt, TInt)

voidDoAddToStackL(CCoeControlStack *aStack,
CCoeControl *aControl,
TIntaPriority,
TIntaStackingFlags
)[private]

Parameters

CCoeControlStack * aStack
CCoeControl * aControl
TInt aPriority
TInt aStackingFlags

DoAddToStackL(CCoeControlStack *, CCoeControl *, TInt, TInt, TInt)

voidDoAddToStackL(CCoeControlStack *aStack,
CCoeControl *aControl,
TIntaPriority,
TIntaStackingFlags,
TIntaGroupId
)[private]

Parameters

CCoeControlStack * aStack
CCoeControl * aControl
TInt aPriority
TInt aStackingFlags
TInt aGroupId

DoRemoveFromStack(CCoeControlStack *, CCoeControl *, TRemoveCondition)

voidDoRemoveFromStack(CCoeControlStack *aStack,
CCoeControl *aControl,
TRemoveConditionaRemoveCondition = ERemoveUnconditionally
)[private]

Parameters

CCoeControlStack * aStack
CCoeControl * aControl
TRemoveCondition aRemoveCondition = ERemoveUnconditionally

DoUpdateStackedControlFlags(CCoeControlStack *, CCoeControl *, TInt, TInt)

voidDoUpdateStackedControlFlags(CCoeControlStack *aStack,
CCoeControl *aControl,
TIntaFlags,
TIntaMask
)[private]

Parameters

CCoeControlStack * aStack
CCoeControl * aControl
TInt aFlags
TInt aMask

EnableExternalViewSwitches(TBool)

IMPORT_C TIntEnableExternalViewSwitches(TBoolaEnable)

Enables/disables external view switches for this instance of this application

By default external view switches are enabled.

Parameters

TBool aEnableWhether external view switches should be enabled or not.

FindPos(CCoeControlStack *, CCoeControl *)

TInt FindPos(CCoeControlStack *aStack,
CCoeControl *aControl
)const [private]

Parameters

CCoeControlStack * aStack
CCoeControl * aControl

FrameworkCallsRendezvous()

IMPORT_C TBoolFrameworkCallsRendezvous()const [virtual]

Indicates the default behaviour for synchronizing to the startup (usually SystemStarter).

GetActiveViewId(TVwsViewId &)

IMPORT_C TIntGetActiveViewId(TVwsViewId &aViewId)const

Gets the ID of the app UI's currently active view.

Parameters

TVwsViewId & aViewIdOn return, contains the ID of the currently active view. This is unchanged if there is no active view.

GetDefaultViewId(TVwsViewId &)

IMPORT_C TIntGetDefaultViewId(TVwsViewId &aViewId)const

Gets this app UI's default view ID.

Parameters

TVwsViewId & aViewIdOn return, contains the ID of the app UI's default view. This is unchanged if there is no default view.

GetSystemDefaultViewL(TVwsViewId &)

IMPORT_C voidGetSystemDefaultViewL(TVwsViewId &aViewId)

Parameters

TVwsViewId & aViewId

GetTopViewId(TVwsViewId &)

IMPORT_C TIntGetTopViewId(TVwsViewId &aViewId)const

Finds and returns the current top view, not necessarily the currently active view

Parameters

TVwsViewId & aViewIdOn return, contains the ID of the current top view. This is unchanged if there is no top view.

HandleApplicationSpecificEventL(TInt, const TWsEvent &)

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

Handles an application-specific event.

This function is called from HandleWsEventL() when the app UI receives a window server event that is not in the standard range (in other words, it has a positive value greater than EEventUser).

This default implementation is empty.

Parameters

TInt aTypeThe application-specific event value, greater than EEventUser.
const TWsEvent & aEventThe window server event that occurred.

HandleForegroundEventL(TBool)

IMPORT_C voidHandleForegroundEventL(TBoolaForeground)[private, virtual]

Handles changes in keyboard focus when the application is brought to the foreground, or put into the background.

This function is called from HandleWsEventL() when an EEventFocusLost or EEventFocusGained event occurs.

This default implementation is empty.

Parameters

TBool aForegroundETrue if the application is being brought to the foreground, EFalse if it is being put into the background.

HandleKeyEventL(const TKeyEvent &, TEventCode)

IMPORT_C TKeyResponseHandleKeyEventL(const TKeyEvent &aKeyEvent,
TEventCodeaType
)[private, virtual]

Handles key events.

This function is called by HandleWsEventL() if a key event occurred but none of the controls in the app UI's control stack consumed it.

Key events are sent to the application by the window server. A key press generates three separate key events in the order EEventKeyDown, EEventKey, and EEventKeyUp. Controls and app UIs are usually only interested in EEventKey events.

This default implementation simply returns EKeyWasNotConsumed. It may need to be overridden if the derived app UI needs to handle certain key events itself. For example, in some applications, arrow keys may be used to navigate between views. In this case, the app UI should override this function to consume the arrow keys.

Parameters

const TKeyEvent & aKeyEventThe key event details, including the key code and any modifiers.
TEventCode aTypeThe type of key event, for instance standard, key up or key down.

HandleScreenDeviceChangedL()

IMPORT_C voidHandleScreenDeviceChangedL()[protected, virtual]

HandleStackChanged()

IMPORT_C voidHandleStackChanged()

Handles changes to the control stack.

This function ensures that the focusable control with the highest priority on the control stack has keyboard focus.

It may need to be called when a control's flag values are modified, by calling UpdateStackedControlFlags(). It is called automatically when a control is added to or removed from the stack.

HandleStackedControlsResourceChange(TInt)

IMPORT_C voidHandleStackedControlsResourceChange(TIntaType)

Handles a change to the application's run-time resources for all controls on the app UI's control stack.

These are resources which are shared across the environment, such as colours, fonts or ZoomFactor.

Parameters

TInt aTypeSpecifies a resource type.

HandleSwitchOnEventL(CCoeControl *)

IMPORT_C voidHandleSwitchOnEventL(CCoeControl *aDestination)[private, virtual]

Handles the special switch on event.

This function is called by HandleWsEventL() if the device is switched on. This default implementation is empty.

Parameters

CCoeControl * aDestinationThe control associated with the event.

HandleSystemEventL(const TWsEvent &)

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

Handles system events generated by the window server.

This method should be overridden by the UI layer like CEikAppUi but not by individual applications. Application events (has a positive value greater than EEventUser) will be sent to HandleApplicationSpecificEventL.

Unrecognized events should be forwarded to the base class.

Parameters

const TWsEvent & aEventThe window server event that occurred.

HandleWsEventL(const TWsEvent &, CCoeControl *)

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

Handles events sent to the application by the window server.

This function is called whenever the window server sends key or pointer events or some other special events to the application. It calls one of a number of functions, according to the type of event.

For key events, it calls CCoeControl::OfferKeyEventL() for each control on the control stack, beginning with the control at the top (position 0) until a control consumes it. If no control on the stack consumes the key event, the app UI's HandleKeyEventL() is called. Note that CCoeControl::OfferKeyEventL() is not called for controls whose ECoeStackFlagRefusesAllKeys flag is set.

For pointer events, CCoeControl::ProcessPointerEventL() is called on the control specified in aDestination.

For pointer buffer ready events, ProcessPointerBufferReadyL() is called on the control specified in aDestination.

For other events, for instance focus change events, this function calls one of the following CCoeAppUi private virtual functions:

All these functions have empty implementations in this class, and are implemented by derived classes, if required.

CCoeAppUi::HandleWsEventL()

Parameters

const TWsEvent & aEventA window server event.
CCoeControl * aDestinationThe control associated with the event. This is only relevant for pointer events.

HelpContextL()

IMPORT_C CArrayFix< TCoeHelpContext > *HelpContextL()const [private, virtual]

Gets a list of help contexts for the app UI.

This default implementation returns NULL.

InputCapabilities()

IMPORT_C TCoeInputCapabilitiesInputCapabilities()const [virtual]

Returns the input capabilities of the control with focus.

Classes that override CCoeAppUi::HandleKeyEventL() should also override this virtual function. The TCoeInputCapabilities object returned should have attributes that match the behaviour of the HandleKeyEventL() function.

Overriding app UIs should do a base-call and "merge" the returned input capabilities with its own input capabilities. If the overriding InputCapabilities() function needs to get the input capabilities of any top-level control, it should do so by calling CCoeControl::RecursivelyMergedInputCapabilities() on that control.

IsControlOnStack(CCoeControl *)

TBool IsControlOnStack(CCoeControl *aControl)const

Parameters

CCoeControl * aControl

IsDisplayingControlBetweenPriorities(TInt, TInt)

IMPORT_C TBoolIsDisplayingControlBetweenPriorities(TIntaLowerPriority,
TIntaHigherPriority
)const

Tests whether the application is displaying a control between the given control stack priorities.

Parameters

TInt aLowerPriorityLower bound.
TInt aHigherPriorityUpper bound.

IsDisplayingDialog()

IMPORT_C TBoolIsDisplayingDialog()const

Tests whether the application is displaying a dialog.

IsDisplayingMenuOrDialog()

IMPORT_C TBoolIsDisplayingMenuOrDialog()const

Tests whether the application is displaying a menu bar or dialog.

IsViewConstructed(const TVwsViewId &)

IMPORT_C TBoolIsViewConstructed(const TVwsViewId &aViewId)const

Checks if the view has been constructed or not.

Parameters

const TVwsViewId & aViewIdThe id of the view

MonitorWsEvent(const TWsEvent &)

voidMonitorWsEvent(const TWsEvent &aEvent)

Monitor function for passing all windows events to registered monitor observers for optional inspection

Monitor function for passing all windows events to registered monitor observers for optional inspection

Parameters

const TWsEvent & aEventThe windows server event that has occured

NotifyFontChange(const CCoeFontProvider &)

voidNotifyFontChange(const CCoeFontProvider &aFontProvider)

Parameters

const CCoeFontProvider & aFontProvider

NotifyNextActivation(const TVwsViewId &, MCoeViewActivationObserver &)

IMPORT_C voidNotifyNextActivation(const TVwsViewId &aViewId,
MCoeViewActivationObserver &aViewActivationObserver
)

Requests that the next activation of the view identified by aViewId be notified to the specified view activation observer.

The request is cleared after the notification: the observer can only be notified once, and there can be no more than one such request pending.

panic
CONE 39 In debug builds, there was already a request pending when this function was called.

Parameters

const TVwsViewId & aViewIdThe view to be notified about. This can any view registered with the view server.
MCoeViewActivationObserver & aViewActivationObserverThe observer to be notified.

NotifyNextActivation(MCoeViewActivationObserver &)

IMPORT_C voidNotifyNextActivation(MCoeViewActivationObserver &aViewActivationObserver)

Requests that the next activation of any view registered with the view server be notified to the specified observer.

The request is cleared after the notification: the observer can only be notified once, and there can be no more than one such pending request.

panic
CONE 39 In debug builds, there was already a request pending when this function was called.

Parameters

MCoeViewActivationObserver & aViewActivationObserverThe observer to be notified.

NotifyNextDeactivation(const TVwsViewId &, MCoeViewDeactivationObserver &)

IMPORT_C voidNotifyNextDeactivation(const TVwsViewId &aViewId,
MCoeViewDeactivationObserver &aViewDeactivationObserver
)

Requests that the next deactivation of the view identified by aViewId be notified to the specified view deactivation observer.

The request is cleared after the notification: the observer can only be notified once, and this app UI can have no more than one such request pending.

panic
CONE 39 In debug builds, there was already a request pending when this function was called.

Parameters

const TVwsViewId & aViewIdThe view to be observed. This can any view registered with the view server.
MCoeViewDeactivationObserver & aViewDeactivationObserverThe observer to be notified.

NotifyNextDeactivation(MCoeViewDeactivationObserver &)

IMPORT_C voidNotifyNextDeactivation(MCoeViewDeactivationObserver &aViewDeactivationObserver)

Requests that the next deactivation of any view registered with the view server be notified to the specified view deactivation observer.

The request is cleared after the notification: the observer can only be notified once, and this app UI can have no more than one such request pending.

panic
CONE 39 In debug builds, there was already a request pending when this function was called.

Parameters

MCoeViewDeactivationObserver & aViewDeactivationObserverThe observer to be notified.

PrepareToExit()

IMPORT_C voidPrepareToExit()[virtual]

Performs pre-exit processing on the control environment.

This function is called after the control environment's active scheduler exits, but before the control environment (i.e. the CCoeEnv object) is destroyed. The default implementation is empty, and this function is not implemented by CCoeAppUi, but it may be implemented by derived classes to perform pre-exit processing on the control environment.

RefetchPixelMappingL()

voidRefetchPixelMappingL()

Notify all CCoeFontProvider's that the global logical-to-pixel mapping has changed in CCoeControlStaticSettings

RegisterApplicationViewL(TUid)

IMPORT_C voidRegisterApplicationViewL(TUidaAppUid)

Registers a pseudo-view for the application identified by aAppUid.

The view server is notified that a view exists for the application, which allows it to participate in the view switching mechanism, even though it does not implement any views.

Activating the application view means bringing the application into the foreground.

Parameters

TUid aAppUidThe ID of the application for which a view should be registered.

RegisterViewAndAddStackL(MCoeView &)

IMPORT_C voidRegisterViewAndAddStackL(MCoeView &aView)

Parameters

MCoeView & aView

RegisterViewL(MCoeView &)

IMPORT_C voidRegisterViewL(MCoeView &aView)

Registers a view with the view server.

All views should be registered in the app UI's ConstructL().

Parameters

MCoeView & aViewThe view to be registered.

RemoveFromStack(CCoeControl *)

IMPORT_C voidRemoveFromStack(CCoeControl *aControl)

Removes a control from the app UI's control stack.

This function also handles any focus changes that may occur.

Parameters

CCoeControl * aControlThe control to remove from the stack.

RemoveFromViewStack(const MCoeView &, CCoeControl *)

IMPORT_C voidRemoveFromViewStack(const MCoeView &aView,
CCoeControl *aControl
)

Parameters

const MCoeView & aView
CCoeControl * aControl

RemoveViewActivationObserver(MCoeViewActivationObserver *)

IMPORT_C voidRemoveViewActivationObserver(MCoeViewActivationObserver *aViewActivationObserver)

Removes the specified observer from the list to be notified of view activations.

panic
CONE 38 The observer was not found.

Parameters

MCoeViewActivationObserver * aViewActivationObserverThe observer to remove.

RemoveViewDeactivationObserver(MCoeViewDeactivationObserver *)

IMPORT_C voidRemoveViewDeactivationObserver(MCoeViewDeactivationObserver *aViewDeactivationObserver)

Removes an observer from the list to be notified of view deactivations.

This has no effect if the observer is not found in the list.

Parameters

MCoeViewDeactivationObserver * aViewDeactivationObserverThe observer to remove.

RemoveViewObserver(MCoeViewObserver *)

IMPORT_C voidRemoveViewObserver(MCoeViewObserver *aViewObserver)

Removes the specified observer from the list of view observers.

This has no effect if the specified observer is not found in the list.

Parameters

MCoeViewObserver * aViewObserverThe view observer to be removed from the list.

SetAndDrawFocus(TBool)

IMPORT_C voidSetAndDrawFocus(TBoolaFocus)[private, virtual]

Sets the keyboard focus of a control and draws it.

This is called by HandleWsEventL() when it receives a focus change event and can also be called when a new control is moved to the top of the control stack.

This default implementation is empty. It is intended that an implementation should set the value of a focus flag within the control to the value given by aFocus. This flag indicates whether or not the control has keyboard focus. The function should then draw or change the appearance of the control to indicate whether or not it has focus.

Parameters

TBool aFocusETrue sets the control as having keyboard focus. EFalse sets the control as not having keyboard focus.

SetApplicationViewAsDefaultL()

IMPORT_C voidSetApplicationViewAsDefaultL()

Sets the application view to be the default view.

In debug builds, this panics if no application view has been added for this app UI.

SetCurrentControlStackGroupId(TInt)

voidSetCurrentControlStackGroupId(TIntaGroupId)

Parameters

TInt aGroupId

SetCustomControl(TInt)

IMPORT_C voidSetCustomControl(TIntaCustomControl)

Allows customised control of Window Group ordinal position during view activations

Parameters

TInt aCustomControlNon-zero if Customised Control is switched on.

SetDefaultViewL(const MCoeView &)

IMPORT_C voidSetDefaultViewL(const MCoeView &aView)

Sets one of the app UI's views as the default.

The default view should be constructed, drawn, registered and set as the default as early as possible in the app UI's ConstructL() function.

The meaning of the default view varies depending on the UI. It is normally the view that is displayed when the application is launched. It may also be the view that is displayed when the application is brought to the foreground.

Parameters

const MCoeView & aViewThe view to set as the default.

SetFocusToControl(CCoeControl *, TBool)

voidSetFocusToControl(CCoeControl *aControl,
TBoolaFocus
)[private]

Parameters

CCoeControl * aControl
TBool aFocus

SetSystemDefaultViewL(const TVwsViewId &, TInt)

IMPORT_C voidSetSystemDefaultViewL(const TVwsViewId &aViewId,
TIntaMode
)

Parameters

const TVwsViewId & aViewId
TInt aMode

SetSystemDefaultViewL(const TVwsViewId &)

IMPORT_C voidSetSystemDefaultViewL(const TVwsViewId &aViewId)

Parameters

const TVwsViewId & aViewId

SetWindowGroupOrdinal(TInt)

IMPORT_C voidSetWindowGroupOrdinal(TIntaWindowGroupOrdinal)

Changes the default window group ordinal position used when bringing views to the foreground. Only used if CCoeAppUi::SetCustomControl has been called with a positive value.

Parameters

TInt aWindowGroupOrdinalThe customised window group ordinal position.

TopFocusableControl()

CCoeControl *TopFocusableControl()const [private]

TopFocusedControl()

IMPORT_C CCoeControl *TopFocusedControl()const

Returns the top control of this appui which currently has the focus.

UpdateStackedControlFlags(CCoeControl *, TInt, TInt)

IMPORT_C voidUpdateStackedControlFlags(CCoeControl *aControl,
TIntaFlags,
TIntaMask
)

Updates the flag values for a control on the control stack.

The mask defines which flags are modified, while aFlags defines the values they are set to.

panic
CONE 4 The specified control is not on the stack.

Parameters

CCoeControl * aControlThe control to update.
TInt aFlagsContains the required value for each of the flag bits whose bit is set in aMask.
TInt aMaskContains a set bit for each flag bit to modify.

UpdateViewServerBackgroundColor(const TRgb &)

IMPORT_C voidUpdateViewServerBackgroundColor(const TRgb &aBgColor)

Changes the default background color for the View Server screen blanking window

Parameters

const TRgb & aBgColorThe new background color to be used.

UpdateViewStackedControlFlags(const MCoeView &, CCoeControl *, TInt, TInt)

IMPORT_C voidUpdateViewStackedControlFlags(const MCoeView &aView,
CCoeControl *aControl,
TIntaFlags,
TIntaMask
)

Parameters

const MCoeView & aView
CCoeControl * aControl
TInt aFlags
TInt aMask

WriteInternalStateOfStackedControlsL(RWriteStream &)

IMPORT_C voidWriteInternalStateOfStackedControlsL(RWriteStream &aWriteStream)const

Writes the internal state of all CCoeControls on the control stack into aWriteStream. Works in debug builds only.

Parameters

RWriteStream & aWriteStream

Member Enumerations Documentation

Enum TRemoveCondition

Enumerators

ERemoveUnconditionally
ERemoveOnlyIfSharable

Member Data Documentation

TInt iCCoeAppUi_Reserved1

TInt iCCoeAppUi_Reserved1[private]

CCoeEnv * iCoeEnv

CCoeEnv *iCoeEnv[protected]

CExtra * iExtra

CExtra *iExtra[private]

CCoeControlStack * iStack

CCoeControlStack *iStack[private]

CCoeViewManager * iViewManager

CCoeViewManager *iViewManager[private]