CAknEnv Class Reference

#include <mw/aknenv.h>

class CAknEnv : public CBase

Inherits from

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

    Detailed Description

    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

    Constructor & Destructor Documentation

    ~CAknEnv ( )

    IMPORT_C~CAknEnv()

    Destructor.

    Member Function Documentation

    AknLayout ( )

    IMPORT_C const AknLayout::CInstance &AknLayout()const

    Accessor method to layout.

    Since
    Series 60 2.6

    Returns: Reference to the Layout.

    AppWithShutterRunning ( )

    IMPORT_C CAknAppUi *AppWithShutterRunning()[static]

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

    Returns: Pointer to the most embedded application UI with Dialog Shutter running. NULL if no any Dialog Shutter running.

    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

    Returns: The TRgb value of the colour lookup table at the aIndex.

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

    CreateCbaObserverL ( CEikButtonGroupContainer *, CEikListBox * )

    IMPORT_C voidCreateCbaObserverL(CEikButtonGroupContainer *aCba,
    CEikListBox *aListBox
    )

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

    ParameterDescription
    aCbaA control which ProcessCommandL handles the command.
    aListBoxStored to data member iListBox.

    EditingStateIndicator ( )

    IMPORT_C MAknEditingStateIndicator *EditingStateIndicator()

    Get the editing state indicator.

    Returns: Pointer to 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.

    ParameterDescription
    aCommandObserverAn observer.

    ExecuteEmptyPopupListL ( const TDesC * )

    IMPORT_C voidExecuteEmptyPopupListL(const TDesC *aEmptyText = 0)

    Executes empty popup list.

    ParameterDescription
    aEmptyTextText 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).

    ParameterDescription
    aEmptyTextText indicating empty popup list. NULL if R_AVKON_EMPTY_POPUP_LIST_TEXT used.
    aTitleA title of the popup list.

    ExitForegroundAppL ( )

    IMPORT_C voidExitForegroundAppL()[static]

    Exit foreground application.

    FepMenuObserver ( )

    IMPORT_C MEikMenuObserver *FepMenuObserver()

    Get the FEP menu observer.

    Returns: Pointer to 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
    ParameterDescription
    aCurrentGlobalUiZoomOn return, contains current global zoom.

    GetCurrentLayoutId ( TAknLayoutId & )

    IMPORT_C voidGetCurrentLayoutId(TAknLayoutId &aCurrentLayoutId)const
    Get current layout ID.
    Since
    Series 60 2.0
    ParameterDescription
    aCurrentLayoutIdOn return, contains current layout ID.

    HasBlank ( )

    TBool HasBlank()const

    InformCbaDeletion ( CEikButtonGroupContainer * )

    IMPORT_C voidInformCbaDeletion(CEikButtonGroupContainer *aCba)

    Remove CBA observer if the right one.

    ParameterDescription
    aCbaCBA to be checked.

    IsFeatureLanguage ( TInt )

    TBool IsFeatureLanguage(TIntaFeatureLanguage)

    LoadAknLayoutL ( )

    IMPORT_C TBoolLoadAknLayoutL()

    Load an appropriate Avkon layout.

    Since
    Series 60 2.6

    Returns: EFalse if the layout is already loaded.

    LoadAknLayoutL ( const TAknLayoutConfigScreenMode & )

    IMPORT_C TBoolLoadAknLayoutL(const TAknLayoutConfigScreenMode &aScreenMode)

    Load an appropriate Avkon layout for a particular screen mode.

    Since
    Series 60 3.1
    ParameterDescription
    aScreenModeThe screen mode which the layout is required for

    Returns: EFalse if the layout is already loaded.

    RegisterIntermediateStateL ( MAknIntermediateState * )

    IMPORT_C voidRegisterIntermediateStateL(MAknIntermediateState *aState)

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

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

    ParameterDescription
    aCbaCBA whose MSK is to be observed.
    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
    ParameterDescription
    aRequestedBufferSizerequested Window Server client buffer size.

    Returns: Request ID. This is used when the request is canceled. In OOM situation, KErrNoMemory is returned. CancelWsBufferRequest ignores negative values as error codes so it is OK to pass any value returned by this method to CancelWsBufferRequest.

    RunAppShutter ( )

    IMPORT_C voidRunAppShutter()[static]

    Run application shutter.

    SetFepMenuObserver ( MEikMenuObserver * )

    IMPORT_C voidSetFepMenuObserver(MEikMenuObserver *aObserver)

    Set the FEP menu observer.

    ParameterDescription
    aObserverthe FEP menu observer.

    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

    Returns: ETrue if split view is active.

    SplitViewActive ( const TBool )

    voidSplitViewActive(const TBoolaSplitViewActive)
    Sets split view flag.
    Since
    Series 60 5.0
    ParameterDescription
    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.

    Returns: A static CAknEnv.

    StatusPaneResIdForCurrentLayout ( TInt )

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

    Returns: Resource id equivalent type of status pane 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.

    ParameterDescription
    aWaitScheduler object to be stopped.

    SwapEditingStateIndicator ( MAknEditingStateIndicator * )

    IMPORT_C MAknEditingStateIndicator *SwapEditingStateIndicator(MAknEditingStateIndicator *aIndicator)

    Swap the editing state indicator.

    ParameterDescription
    aIndicatorThe new editing state indicator.

    Returns: The old 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
    )

    TransitionEvent ( TInt )

    voidTransitionEvent(TIntaEvent)

    TransparencyEnabled ( )

    IMPORT_C TBoolTransparencyEnabled()const

    Return if Transparency is Enabled .

    Since
    5.0

    Returns: if Transparency is Enabled.

    UnRegisterIntermediateState ( MAknIntermediateState * )

    IMPORT_C voidUnRegisterIntermediateState(MAknIntermediateState *aState)

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

    ParameterDescription
    aStateThe control implementing intermediate states.

    UpdateSystemFontsL ( )

    voidUpdateSystemFontsL()