Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



Location: coeauis.h
Link against: cone.lib

Class CCoeAppUiSimple

CCoeAppUiSimple

Support

Supported from 5.0

Description

Simple application UI.

Applications which use this class designate one control to be the root control — which receives all key events for the application. The root control must handle key events itself or channel them to other controls within the application, by calling CCoeControl::OfferKeyEventL().

In practise, most realistic applications use the standard app UI — CCoeAppUi. The main difference is that this class provides a control stack rather than a root control.

Derivation

CBaseBase class for all classes to be instantiated on the heap
CCoeAppUiBaseApplication UI abstract base class
CCoeAppUiSimpleSimple application UI

Defined in CCoeAppUiSimple:
CCoeAppUiSimple(), HandleForegroundEventL(), HandleKeyEventL(), HandleWsEventL(), SetRootControl(), ~CCoeAppUiSimple()

Inherited from CBase:
operator new()

Inherited from CCoeAppUiBase:
PrepareToExit()


Construction and destruction


CCoeAppUiSimple()

CCoeAppUiSimple();

Description

Trivial default constructor.


~CCoeAppUiSimple()

~CCoeAppUiSimple();

Description

Destructor. It frees all resources owned by the object.

[Top]


Member functions


SetRootControl()

void SetRootControl(CCoeControl* aControl);

Description

Sets the simple app UI’s root control. This control will subsequently receive all key events for the application, which it should process or pass to other controls in the application using CCoeControl::OfferKeyEventL().

Parameters

CCoeControl* aControl

The control to be made the root control.


HandleWsEventL()

protected: void HandleWsEventL(const TWsEvent& aEvent,CCoeControl* aDestination);

Description

Handles standard events.

The function is called whenever the window server sends a standard event to the application. It calls one of three functions, according to the type of the event: for key press events it calls HandleKeyEventL(), for pointer events it calls CCoeControl::ProcessPointerEventL() on the control given by aDestination, and for focus changed events it calls HandleForegroundEventL().

Parameters

const TWsEvent& aEvent

The event that occurred.

CCoeControl* aDestination

The control associated with the event.

See also:


HandleKeyEventL()

private: virtual void HandleKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);

Description

Handles key events. It is called by HandleWsEventL() when a key press event occurs. It may be overridden by derived classes. The default implementation calls CCoeControl::OfferKeyEventL() on the root control.

Parameters

const TKeyEvent& aKeyEvent

The key event that occurred.

TEventCode aType

The (key) event type.


HandleForegroundEventL()

private: virtual void HandleForegroundEventL(TBool aForeground);

Description

Handles changes in keyboard focus. This function is called from HandleWsEventL() when an event occurs of type EEventFocusLost or EEventFocusGained.

The default implementation calls CCoeControl::SetFocus() on the application’s root control, passing aForeground as the aFocus parameter. It may be overridden by derived classes.

Parameters

TBool aForeground

Indicates the required focus state of the control.