CAknEnv Class Reference

class CAknEnv : public CBase

This class is a Series 60 extension to CEikonEnv. Every Avkon application is provided with an instance of CAvkEnv by the framework, which can be accessed through the iAvkonEnv macro.

Since
Series 60 0.9

Inherits from

Nested Classes and Structures

Public Member Functions
~CAknEnv()
IMPORT_C const AknLayout::CInstance &AknLayout()
IMPORT_C CAknAppUi *AppWithShutterRunning()
IMPORT_C TRgbAvkonColor(TInt)
IMPORT_C voidCancelWsBufferRequest(TInt)
IMPORT_C voidCloseAllIntermediateStates()
IMPORT_C voidCreateCbaObserverL(CEikButtonGroupContainer *, CEikListBox *)
IMPORT_C MAknEditingStateIndicator *EditingStateIndicator()
IMPORT_C voidEndCommandMediation(MEikCommandObserver &)
IMPORT_C voidExecuteEmptyPopupListL(const TDesC *)
IMPORT_C voidExecuteEmptyPopupListL(const TDesC *, const TDesC *, TInt)
IMPORT_C voidExitForegroundAppL()
IMPORT_C MEikMenuObserver *FepMenuObserver()
CAknFontRegistry &FontRegistry()
IMPORT_C voidGetCurrentGlobalUiZoom(TAknUiZoom &)
IMPORT_C voidGetCurrentLayoutId(TAknLayoutId &)
TBool HasBlank()
IMPORT_C voidInformCbaDeletion(CEikButtonGroupContainer *)
TBool IsFeatureLanguage(TInt)
IMPORT_C TBoolLoadAknLayoutL()
IMPORT_C TBoolLoadAknLayoutL(const TAknLayoutConfigScreenMode &)
IMPORT_C voidRegisterIntermediateStateL(MAknIntermediateState *)
voidReloadAknLayoutL()
IMPORT_C voidRemoveCbaObserver()
IMPORT_C voidRequestCommandMediationL(CEikButtonGroupContainer &, MEikCommandObserver &)
IMPORT_C TIntRequestWsBuffer(TInt)
IMPORT_C voidRunAppShutter()
IMPORT_C voidSetFepMenuObserver(MEikMenuObserver *)
IMPORT_C CAknSettingCache &SettingCache()
voidShutOrHideAppL()
IMPORT_C TBoolSplitViewActive()
voidSplitViewActive(const TBool)
IMPORT_C CAknEnv *Static()
IMPORT_C TIntStatusPaneResIdForCurrentLayout(TInt)
IMPORT_C voidStopSchedulerWaitWithBusyMessage(CActiveSchedulerWait &)
IMPORT_C MAknEditingStateIndicator *SwapEditingStateIndicator(MAknEditingStateIndicator *)
CArrayPtr< CAknSystemFont > *SystemFontArray()
voidTransitionEvent(TInt, const TUid &)
voidTransitionEvent(TInt)
IMPORT_C TBoolTransparencyEnabled()
IMPORT_C voidUnRegisterIntermediateState(MAknIntermediateState *)
voidUpdateSystemFontsL()
Private Member Functions
CAknEnv()
voidAssertLayoutLoaded()
IMPORT_C voidConstructL()
voidDoSchedulerStoppedCallBack()
IMPORT_C voidInstallAknEnvAsExtensionL(CEikonEnv *)
TBool LoadAknLayoutL(TAknLayoutId, const TAknLayoutConfigScreenMode &, TAknUiZoom)
TInt PrepareRunInfoArray(const TDesC &)
TInt RealCloseIntermediateStates(TAny *)
TAknUiZoom ResolveCurrentUiZoom()
TBidirectionalState::TRunInfo *RunInfoArray(TInt &)
TInt SchedulerStoppedCallBack(TAny *)
voidSetConeFontSizeArrayL()
voidSetLayoutRequirementsL()
TInt SetRequiredRunInfoArraySize(TInt)
voidSetWsBufferSize()
voidSetWsBufferSize(TInt)
TBool TryLoadAknLayoutL(TAknLayoutId, const TAknLayoutConfigScreenMode &, TAknUiZoom)
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 Attributes
TInt iBusyMsgCount
CAknWaitDialog *iBusyMsgDialog
MEikCommandObserver *iCbaCommandObserver
CCdlEngineRef *iCdlEngRef
CEikonEnv *iCoeEnv
CAknCommandMediator *iCommandMediator
TInt iCurrentWsBufferRequest
CArrayPtr< CBase > *iDeleteArray
MAknEditingStateIndicator *iEditStateIndicator
TInt iFeatureLanguage
MEikMenuObserver *iFepMenuObserver
CAknFontRegistry *iFontRegistry
CIdle *iIdle
TAknLayoutId iLastLayoutId
TInt iLastScreenMode
TAknUiZoom iLastZoom
const AknLayout::CInstance *iLayout
TInt iRequestIdCounter
TBidirectionalState::TRunInfo *iRunInfoArray
TInt iRunInfoArrayLength
CAknSettingCache *iSettingCache
TBool iSplitViewActive
CArrayPtr< MAknIntermediateState > *iStateArray
CArrayPtr< CAknSystemFont > *iSystemFontArray
CTransitionManager *iTransitionManager
RArray< TWsBufferRequest >iWsBufferRequestArray

Constructor & Destructor Documentation

CAknEnv()

IMPORT_CCAknEnv()[private]

~CAknEnv()

IMPORT_C~CAknEnv()

Destructor.

Member Functions Documentation

AknLayout()

IMPORT_C const AknLayout::CInstance &AknLayout()const

Accessor method to layout.

Since
Series 60 2.6

AppWithShutterRunning()

IMPORT_C CAknAppUi *AppWithShutterRunning()[static]

Get pointer to the most embedded application UI with Dialog Shutter running.

AssertLayoutLoaded()

voidAssertLayoutLoaded()[private]

AvkonColor(TInt)

IMPORT_C TRgbAvkonColor(TInt)[static]

Gets the TRgb value of the entry at the specified index in the colour lookup table.

Since
Series 60 0.9

Parameters

TInt

CancelWsBufferRequest(TInt)

IMPORT_C voidCancelWsBufferRequest(TIntaRequestID)

Cancels a request made by call RequestWsBuffer. This should be called in order to save RAM when higher than normal buffer size is no longer required.

Since
Series 60 2.0

Parameters

TInt aRequestIDThe request ID returned by the RequestWsBuffer call which is to be canceled. Negative values are treated as error codes and ignored.

CloseAllIntermediateStates()

IMPORT_C voidCloseAllIntermediateStates()

Closes all intermediate states as a low-priority process.

ConstructL()

IMPORT_C voidConstructL()[private]

CreateCbaObserverL(CEikButtonGroupContainer *, CEikListBox *)

IMPORT_C voidCreateCbaObserverL(CEikButtonGroupContainer *aCba,
CEikListBox *aListBox
)

Create CBA observer. The possible existing one is removed first.

Parameters

CEikButtonGroupContainer * aCbaA control which ProcessCommandL handles the command.
CEikListBox * aListBoxStored to data member iListBox.

DoSchedulerStoppedCallBack()

voidDoSchedulerStoppedCallBack()[private]

EditingStateIndicator()

IMPORT_C MAknEditingStateIndicator *EditingStateIndicator()

Get the editing state indicator.

EndCommandMediation(MEikCommandObserver &)

IMPORT_C voidEndCommandMediation(MEikCommandObserver &aCommandObserver)

Ends mediating MSK commands to specified command observer. If commands are being mediated to the specifed observer, the command mediator is removed from the CBA to end mediation.

Parameters

MEikCommandObserver & aCommandObserverAn observer.

ExecuteEmptyPopupListL(const TDesC *)

IMPORT_C voidExecuteEmptyPopupListL(const TDesC *aEmptyText = 0)

Executes empty popup list.

Parameters

const TDesC * aEmptyText = 0Text indicating empty popup list. NULL if R_AVKON_EMPTY_POPUP_LIST_TEXT used.

ExecuteEmptyPopupListL(const TDesC *, const TDesC *, TInt)

IMPORT_C voidExecuteEmptyPopupListL(const TDesC *aEmptyText,
const TDesC *aTitle,
TIntaSoftkeyId = 0
)

Executes empty popup list. aSoftkeyId is soft key rescource used, but shown without left soft key (except R_AVKON_SOFTKEYS_OK_EMPTY).

Parameters

const TDesC * aEmptyTextText indicating empty popup list. NULL if R_AVKON_EMPTY_POPUP_LIST_TEXT used.
const TDesC * aTitleA title of the popup list.
TInt aSoftkeyId = 0

ExitForegroundAppL()

IMPORT_C voidExitForegroundAppL()[static]

Exit foreground application.

FepMenuObserver()

IMPORT_C MEikMenuObserver *FepMenuObserver()

Get the FEP menu observer.

FontRegistry()

CAknFontRegistry &FontRegistry()const

Access to the registry of CAknLayoutFont pointers. Used for runtime checking of CFont pointers.

GetCurrentGlobalUiZoom(TAknUiZoom &)

IMPORT_C voidGetCurrentGlobalUiZoom(TAknUiZoom &aCurrentGlobalUiZoom)const
Get current global zoom
Since
3.1

Parameters

TAknUiZoom & aCurrentGlobalUiZoomOn return, contains current global zoom.

GetCurrentLayoutId(TAknLayoutId &)

IMPORT_C voidGetCurrentLayoutId(TAknLayoutId &aCurrentLayoutId)const
Get current layout ID.
Since
Series 60 2.0

Parameters

TAknLayoutId & aCurrentLayoutIdOn return, contains current layout ID.

HasBlank()

TBool HasBlank()const

InformCbaDeletion(CEikButtonGroupContainer *)

IMPORT_C voidInformCbaDeletion(CEikButtonGroupContainer *aCba)

Remove CBA observer if the right one.

Parameters

CEikButtonGroupContainer * aCbaCBA to be checked.

InstallAknEnvAsExtensionL(CEikonEnv *)

IMPORT_C voidInstallAknEnvAsExtensionL(CEikonEnv *aEnv)[private, static]

Parameters

CEikonEnv * aEnv

IsFeatureLanguage(TInt)

TBool IsFeatureLanguage(TIntaFeatureLanguage)

Parameters

TInt aFeatureLanguage

LoadAknLayoutL()

IMPORT_C TBoolLoadAknLayoutL()

Load an appropriate Avkon layout.

Since
Series 60 2.6

LoadAknLayoutL(const TAknLayoutConfigScreenMode &)

IMPORT_C TBoolLoadAknLayoutL(const TAknLayoutConfigScreenMode &aScreenMode)

Load an appropriate Avkon layout for a particular screen mode.

Since
Series 60 3.1

Parameters

const TAknLayoutConfigScreenMode & aScreenModeThe screen mode which the layout is required for

LoadAknLayoutL(TAknLayoutId, const TAknLayoutConfigScreenMode &, TAknUiZoom)

TBool LoadAknLayoutL(TAknLayoutIdaId,
const TAknLayoutConfigScreenMode &aScreenMode,
TAknUiZoomaUiZoom
)[private]

Parameters

TAknLayoutId aId
const TAknLayoutConfigScreenMode & aScreenMode
TAknUiZoom aUiZoom

PrepareRunInfoArray(const TDesC &)

TInt PrepareRunInfoArray(const TDesC &aLogicalText)[private]

Tests how big run info array the given text requires and tries to increase the size of the array if required.

Parameters

const TDesC & aLogicalTextText in logical order.

RealCloseIntermediateStates(TAny *)

TInt RealCloseIntermediateStates(TAny *aEnv)[private, static]

Parameters

TAny * aEnv

RegisterIntermediateStateL(MAknIntermediateState *)

IMPORT_C voidRegisterIntermediateStateL(MAknIntermediateState *aState)

Register the control implementing intermediate states. Call iAvkonEnv->RegisterIntermediateState(this) in control's ActivateL().

Parameters

MAknIntermediateState * aStateThe control implementing intermediate states.

ReloadAknLayoutL()

voidReloadAknLayoutL()

Re-load the current Avkon layout, in case there are new layout instances present.

Since
Series 60 5.1

RemoveCbaObserver()

IMPORT_C voidRemoveCbaObserver()

Remove CBA observer.

RequestCommandMediationL(CEikButtonGroupContainer &, MEikCommandObserver &)

IMPORT_C voidRequestCommandMediationL(CEikButtonGroupContainer &aCba,
MEikCommandObserver &aCommandObserver
)

Requests mediation of MSK commmands from specified CBA to the given observer. When called for the first time, this method creates an observer that is added to specified CBA to observe MSK commands and to mediate all received events to the given observer. The created observer exists until the CAknEnv instance is destroyed. All subsequent calls to this method replace the previously requested mediation.

Parameters

CEikButtonGroupContainer & aCbaCBA whose MSK is to be observed.
MEikCommandObserver & aCommandObserverAn observer for which the commands are sent.

RequestWsBuffer(TInt)

IMPORT_C TIntRequestWsBuffer(TIntaRequestedBufferSize)

Requests Window Server client buffer used by the application to be of at least the given size. All code that wants to increase (to avoid flicker) or decrease (to save RAM) the buffer compared to the default size should call this method instead of using WS interface directly. A list of all requests is maintained and the highest request is always effective. Only if there are no requests done, the default buffer size is used.

Since
Series 60 2.0

Parameters

TInt aRequestedBufferSizerequested Window Server client buffer size.

ResolveCurrentUiZoom()

TAknUiZoom ResolveCurrentUiZoom()[private]

RunAppShutter()

IMPORT_C voidRunAppShutter()[static]

Run application shutter.

RunInfoArray(TInt &)

TBidirectionalState::TRunInfo *RunInfoArray(TInt &aLength)const [private]

Returns run info array owned by AknEnv.

Parameters

TInt & aLengthLength of the array is returned here.

SchedulerStoppedCallBack(TAny *)

TInt SchedulerStoppedCallBack(TAny *aWaitNote)[private, static]

Parameters

TAny * aWaitNote

SetConeFontSizeArrayL()

voidSetConeFontSizeArrayL()const [private]

Use the currently loaded layout to set the values of the font size array used by CCoeFontProvider.

SetFepMenuObserver(MEikMenuObserver *)

IMPORT_C voidSetFepMenuObserver(MEikMenuObserver *aObserver)

Set the FEP menu observer.

Parameters

MEikMenuObserver * aObserverthe FEP menu observer.

SetLayoutRequirementsL()

voidSetLayoutRequirementsL()[private]

SetRequiredRunInfoArraySize(TInt)

TInt SetRequiredRunInfoArraySize(TIntaLength)[private]

Tries to increase the size of the run info array if it is currently smaller than given length.

Parameters

TInt aLengthLength of the new run info array to be allocated.

SetWsBufferSize()

voidSetWsBufferSize()[private]

SetWsBufferSize(TInt)

voidSetWsBufferSize(TIntaRequestedBufferSize)[private]

Parameters

TInt aRequestedBufferSize

SettingCache()

IMPORT_C CAknSettingCache &SettingCache()const

ShutOrHideAppL()

voidShutOrHideAppL()[static]

SplitViewActive()

IMPORT_C TBoolSplitViewActive()const
Checks if split view is active.
Since
Series 60 5.0

SplitViewActive(const TBool)

voidSplitViewActive(const TBoolaSplitViewActive)
Sets split view flag.
Since
Series 60 5.0

Parameters

const TBool aSplitViewActiveEtrue if split view is active.

Static()

IMPORT_C CAknEnv *Static()[static]

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

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

StatusPaneResIdForCurrentLayout(TInt)

IMPORT_C TIntStatusPaneResIdForCurrentLayout(TIntaResId)const
Tells the type of status pane layout for UI.
Since
Series 60 2.0

Parameters

TInt aResIdresource id for current layout.

StopSchedulerWaitWithBusyMessage(CActiveSchedulerWait &)

IMPORT_C voidStopSchedulerWaitWithBusyMessage(CActiveSchedulerWait &aWait)[static]

Stop the scheduler. If the waiting control can't stop the scheduler immediately, then trying to show a busy note.

Parameters

CActiveSchedulerWait & aWaitScheduler object to be stopped.

SwapEditingStateIndicator(MAknEditingStateIndicator *)

IMPORT_C MAknEditingStateIndicator *SwapEditingStateIndicator(MAknEditingStateIndicator *aIndicator)

Swap the editing state indicator.

Parameters

MAknEditingStateIndicator * aIndicatorThe new editing state indicator.

SystemFontArray()

CArrayPtr< CAknSystemFont > *SystemFontArray()const

Access to the system font array that is owned by CEikonEnv. The member accessed by this is set during CEikonEnv construction and may be null during application startup.

TransitionEvent(TInt, const TUid &)

voidTransitionEvent(TIntaEvent,
const TUid &aAppUid
)

Parameters

TInt aEvent
const TUid & aAppUid

TransitionEvent(TInt)

voidTransitionEvent(TIntaEvent)

Parameters

TInt aEvent

TransparencyEnabled()

IMPORT_C TBoolTransparencyEnabled()const

Return if Transparency is Enabled .

Since
5.0

TryLoadAknLayoutL(TAknLayoutId, const TAknLayoutConfigScreenMode &, TAknUiZoom)

TBool TryLoadAknLayoutL(TAknLayoutIdaId,
const TAknLayoutConfigScreenMode &aScreenMode,
TAknUiZoomaUiZoom
)[private]

Parameters

TAknLayoutId aId
const TAknLayoutConfigScreenMode & aScreenMode
TAknUiZoom aUiZoom

UnRegisterIntermediateState(MAknIntermediateState *)

IMPORT_C voidUnRegisterIntermediateState(MAknIntermediateState *aState)

Unregister the control implementing intermediate states. Call iAvkonEnv->UnRegisterIntermediateState(this) in control's destructor.

Parameters

MAknIntermediateState * aStateThe control implementing intermediate states.

UpdateSystemFontsL()

voidUpdateSystemFontsL()

Member Data Documentation

TInt iBusyMsgCount

TInt iBusyMsgCount[private]

CAknWaitDialog * iBusyMsgDialog

CAknWaitDialog *iBusyMsgDialog[private]

MEikCommandObserver * iCbaCommandObserver

MEikCommandObserver *iCbaCommandObserver[private]

CCdlEngineRef * iCdlEngRef

CCdlEngineRef *iCdlEngRef[private]

CEikonEnv * iCoeEnv

CEikonEnv *iCoeEnv[private]

CAknCommandMediator * iCommandMediator

CAknCommandMediator *iCommandMediator[private]

TInt iCurrentWsBufferRequest

TInt iCurrentWsBufferRequest[private]

CArrayPtr< CBase > * iDeleteArray

CArrayPtr< CBase > *iDeleteArray[private]

MAknEditingStateIndicator * iEditStateIndicator

MAknEditingStateIndicator *iEditStateIndicator[private]

TInt iFeatureLanguage

TInt iFeatureLanguage[private]

MEikMenuObserver * iFepMenuObserver

MEikMenuObserver *iFepMenuObserver[private]

CAknFontRegistry * iFontRegistry

CAknFontRegistry *iFontRegistry[private]

CIdle * iIdle

CIdle *iIdle[private]

TAknLayoutId iLastLayoutId

TAknLayoutId iLastLayoutId[private]

TInt iLastScreenMode

TInt iLastScreenMode[private]

TAknUiZoom iLastZoom

TAknUiZoom iLastZoom[private]

const AknLayout::CInstance * iLayout

const AknLayout::CInstance *iLayout[private]

TInt iRequestIdCounter

TInt iRequestIdCounter[private]

TBidirectionalState::TRunInfo * iRunInfoArray

TBidirectionalState::TRunInfo *iRunInfoArray[private]

TInt iRunInfoArrayLength

TInt iRunInfoArrayLength[private]

CAknSettingCache * iSettingCache

CAknSettingCache *iSettingCache[private]

TBool iSplitViewActive

TBool iSplitViewActive[private]

CArrayPtr< MAknIntermediateState > * iStateArray

CArrayPtr< MAknIntermediateState > *iStateArray[private]

CArrayPtr< CAknSystemFont > * iSystemFontArray

CArrayPtr< CAknSystemFont > *iSystemFontArray[private]

CTransitionManager * iTransitionManager

CTransitionManager *iTransitionManager[private]

RArray< TWsBufferRequest > iWsBufferRequestArray

RArray< TWsBufferRequest >iWsBufferRequestArray[private]