CAknView Class Reference

#include <mw/aknview.h>

class CAknView : public CBase

Inherits from

  • CAknView
    Protected Attributes
    CCoeEnv *iCoeEnv
    Public Member Functions
    CAknView()
    ~CAknView()
    IMPORT_C voidActivateViewL(const TVwsViewId &)
    IMPORT_C voidActivateViewL(const TVwsViewId &, TUid, const TDesC8 &)
    virtual IMPORT_C voidAknViewActivatedL(const TVwsViewId &, TUid, const TDesC8 &)
    voidAknViewDeactivated()
    IMPORT_C voidBaseConstructL(TInt)
    IMPORT_C TRectClientRect()
    IMPORT_C voidConstructMenuAndCbaEarlyL()
    IMPORT_C voidCreateAndSetToolbarL(TInt)
    virtual IMPORT_C voidHandleCommandL(TInt)
    virtual IMPORT_C voidHandleStatusPaneSizeChange()
    virtual IMPORT_C voidHandleViewRectChange()
    pure virtual IMPORT_C TUidId()
    IMPORT_C TBoolIsForeground()
    virtual IMPORT_C CEikMenuBar *MenuBar()
    virtual IMPORT_C voidProcessCommandL(TInt)
    voidProcessForegroundEventL(TBool)
    virtual IMPORT_C voidRedraw()
    voidSaveToolbarStatus(TBool, TBool)
    IMPORT_C voidSetToolbar(CAknToolbar *)
    IMPORT_C voidShowToolbarOnViewActivation(TBool)
    IMPORT_C voidStopDisplayingMenuBar()
    IMPORT_C voidStopDisplayingToolbar()
    IMPORT_C CAknToolbar *Toolbar()
    IMPORT_C TBoolToolbarShownOnViewActivation()
    IMPORT_C TVwsViewIdViewId()
    Protected Member Functions
    IMPORT_C CAknViewAppUi *AppUi()
    IMPORT_C CEikButtonGroupContainer *Cba()
    pure virtual IMPORT_C voidDoActivateL(const TVwsViewId &, TUid, const TDesC8 &)
    pure virtual voidDoDeactivate()
    virtual IMPORT_C voidHandleForegroundEventL(TBool)
    IMPORT_C MObjectProvider *MopNext()
    IMPORT_C TTypeUid::PtrMopSupplyObject(TTypeUid)
    virtual IMPORT_C voidSetEmphasis(CCoeControl *, TBool)
    IMPORT_C CEikStatusPane *StatusPane()
    IMPORT_C voidViewActivatedL(const TVwsViewId &, TUid, const TDesC8 &)
    IMPORT_C voidViewDeactivated()
    IMPORT_C TVwsViewIdAndMessageViewScreenDeviceChangedL()
    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 is an abstract base class for a Series 60 application view.

    Since
    Series 60 0.9

    Member Attribute Documentation

    iCoeEnv

    CCoeEnv *iCoeEnv[protected]

    Constructor & Destructor Documentation

    CAknView ( )

    IMPORT_CCAknView()

    Standard constructor.

    ~CAknView ( )

    IMPORT_C~CAknView()

    Standard destructor.

    Member Function Documentation

    ActivateViewL ( const TVwsViewId & )

    IMPORT_C voidActivateViewL(const TVwsViewId &aViewId)

    Activate any view in the product. Calls CCoeAppUi::ActivateViewL( aViewId)

    ParameterDescription
    aViewIdIdentifies the view to activate.

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

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

    Activate any view, then passes the message text aCustomMessage of type aCustomMessageId. Calls CCoeAppUi::ActivateViewL( aViewId,aCustomMessageId,aCustomMessage)

    ParameterDescription
    aViewIdIdentifies the view to activate.
    aCustomMessageIdSpecifies the message type.
    aCustomMessageThe message passed to the activated view.

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

    IMPORT_C voidAknViewActivatedL(const TVwsViewId &aPrevViewId,
    TUidaCustomMessageId,
    const TDesC8 &aCustomMessage
    )[virtual]

    Avkon view architecture system. Internal use only. Calls DoActivateL.

    AknViewDeactivated ( )

    voidAknViewDeactivated()

    Avkon view architecture system. Internal use only. Function is called by CAknViewAppUi::~CAknViewAppUi() for immediate view deactivation. Calls DoDeactivate.

    AppUi ( )

    IMPORT_C CAknViewAppUi *AppUi()const [protected]

    Accessor for the applications user interface as a CAknViewAppUi.

    Returns: Pointer to user interface instance.

    BaseConstructL ( TInt )

    IMPORT_C voidBaseConstructL(TIntaResId = 0)

    This is a second stage constructor initializing this view with standard values. Should be called from derived classes second stage construction functions.

    ParameterDescription
    aResIdThe numeric ID of the resource (iViewInfo) to be read. If aResId=0, resource file is not accessed.

    Cba ( )

    IMPORT_C CEikButtonGroupContainer *Cba()const [protected]

    Button group container (=CBA) accessor method. This returns the views CBA if there is one, and the applications user interfaces CBA otherwise.

    Returns: Pointer to CEikButtonGroupContainer.

    ClientRect ( )

    IMPORT_C TRectClientRect()const

    Calculates the client rectangle of the view, taking the applications client rectangle and the views CBA into account. Calls CEikAppUi::ClientRect()

    Returns: TRect the area of the screen available to the application for drawing.

    ConstructMenuAndCbaEarlyL ( )

    IMPORT_C voidConstructMenuAndCbaEarlyL()

    Constructs invisible button group container and menu if they don't exist yet. They are placed on the view stack. To be used by views which need to access the menu or cba before the view is activated for the first time.

    CreateAndSetToolbarL ( TInt )

    IMPORT_C voidCreateAndSetToolbarL(TIntaResourceId)
    Creates a new toolbar object with the resource id given and sets it for the view. Deletes old toolbar. If the old toolbar was shown before deleting, then the new toolbar will also be shown.
    Since
    S60 5.0
    ParameterDescription
    aResourceIdResource id of the new toolbar

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

    IMPORT_C voidDoActivateL(const TVwsViewId &aPrevViewId,
    TUidaCustomMessageId,
    const TDesC8 &aCustomMessage
    )[protected, pure virtual]

    Handles a view activation and passes the message of type aCustomMessageId. This function is intended for overriding by sub classes. This function is called by AknViewActivatedL(). Views should not launch waiting or modal notes or dialogs in DoActivateL.

    ParameterDescription
    aPrevViewIdSpecifies the view previously active.
    aCustomMessageIdSpecifies the message type.
    aCustomMessageThe activation message.

    DoDeactivate ( )

    voidDoDeactivate()[protected, pure virtual]

    View deactivation function intended for overriding by sub classes. This function is called by AknViewDeactivated().

    HandleCommandL ( TInt )

    IMPORT_C voidHandleCommandL(TIntaCommand)[virtual]

    Command handling function intended for overriding by sub classes. Default implementation is empty.

    ParameterDescription
    aCommandID of the command to respond to.

    HandleForegroundEventL ( TBool )

    IMPORT_C voidHandleForegroundEventL(TBoolaForeground)[protected, virtual]

    From MEikMenuObserver. Foreground event handling function intended for overriding by sub classes.

    ParameterDescription
    aForegroundIndicates the required focus state of the control.

    HandleStatusPaneSizeChange ( )

    IMPORT_C voidHandleStatusPaneSizeChange()[virtual]

    Event handler for status pane size changes. CAknView provides an empty implementation for sub classes that do not want to handle this event.

    HandleViewRectChange ( )

    IMPORT_C voidHandleViewRectChange()[virtual]
    Called by the framework when view's rectangle changes. The default implementation is empty. This function is not used yet.
    Since
    Series 60 3.0

    Id ( )

    IMPORT_C TUidId()const [pure virtual]

    Returns views id, intended for overriding by sub classes.

    Returns: id for this view.

    IsForeground ( )

    IMPORT_C TBoolIsForeground()const

    Determines whether the application is foreground.

    Returns: ETrue if view is foreground.

    MenuBar ( )

    IMPORT_C CEikMenuBar *MenuBar()const [virtual]

    Menu bar accessor method. This returns the views menu if available, otherwise it returns the applications menu bar.

    Returns: CEikMenuBar pointer to views menu bar.

    MopNext ( )

    IMPORT_C MObjectProvider *MopNext()[protected]

    From MObjectProvider. Gets the parent object provider.

    Returns: Pointer to the parent object provider (MObjectProvider) that is CAknViewAppUi* iAppUi, or NULL.

    MopSupplyObject ( TTypeUid )

    IMPORT_C TTypeUid::PtrMopSupplyObject(TTypeUidaId)[protected]

    From MObjectProvider. Gets an (MAknsControlContext) object whose type is encapsulated by the specified TTypeUid object. Calls SupplyMopObject( TTypeUid aId, CEikButtonGroupContainer* iCba, CEikMenuBar* iMenu ).

    ParameterDescription
    aIdEncapsulates the Uid that identifies the type of object required.

    Returns: Pointer to the MAknsControlContext object provided. Note that the pointer may be NULL.

    ProcessCommandL ( TInt )

    IMPORT_C voidProcessCommandL(TIntaCommand)[virtual]

    From MEikMenuObserver. This function processes user commands by handling aCommand values EAknSoftkeyOptions, EAknCmdExit, EEikCmdCanceled and passing the others to HandleCommandL() for sub class to decide the actions.

    ParameterDescription
    aCommandID of the command to respond to.

    ProcessForegroundEventL ( TBool )

    voidProcessForegroundEventL(TBoolaForeground)

    Avkon view architecture system. Internal use only.

    Redraw ( )

    IMPORT_C voidRedraw()const [virtual]
    Asks the view to redraw its area. Needs to be implemented only by views used in split view architecture. The default implementation is empty. This function is not used yet.
    Since
    Series 60 3.0

    SaveToolbarStatus ( TBool, TBool )

    voidSaveToolbarStatus(TBoolaVisible,
    TBoolaFocused
    )
    Saves toolbar status of this view according to values given. The values are used when view is activated.
    Since
    S60 3.2
    ParameterDescription
    aVisibleto determine if toolbar should be shown.
    aFocusedETrue if toolbar is focused, EFalse if not

    SetEmphasis ( CCoeControl *, TBool )

    IMPORT_C voidSetEmphasis(CCoeControl *aMenuControl,
    TBoolaEmphasis
    )[protected, virtual]

    From MEikMenuObserver. Menu emphasising or de-emphasising function. CEikMenuBar objects call this on their observer. Updates the value of the flags for the (aMenuControl) on the control stack.

    ParameterDescription
    aMenuControlThe control to be emphasised or de-emphasisied.
    aEmphasisETrue to emphasize the menu, EFalse to refuse the focus.

    SetToolbar ( CAknToolbar * )

    IMPORT_C voidSetToolbar(CAknToolbar *aToolbar)
    Sets new toolbar for the view. Deletes old toolbar. If the old toolbar was shown before deleting, then the new toolbar will also be shown.
    Since
    S60 5.0
    ParameterDescription
    aToolbarpointer to new toolbar

    ShowToolbarOnViewActivation ( TBool )

    IMPORT_C voidShowToolbarOnViewActivation(TBoolaVisible)
    Sets toolbar visibility status of this view according to value given. The value is used when view is activated.
    Since
    S60 3.2
    ParameterDescription
    aVisibleto determine if toolbar should be shown.

    StatusPane ( )

    IMPORT_C CEikStatusPane *StatusPane()const [protected]

    Status pane accessor method.

    Returns: Pointer to status pane.

    StopDisplayingMenuBar ( )

    IMPORT_C voidStopDisplayingMenuBar()

    This function causes the menu bar to disappear from the screen until it is invoked again by the user. Calls CEikAppUi::StopDisplayingMenuBar().

    StopDisplayingToolbar ( )

    IMPORT_C voidStopDisplayingToolbar()
    This function causes toolbar to be hidden
    Since
    Series 60 3.1

    Toolbar ( )

    IMPORT_C CAknToolbar *Toolbar()const
    Since
    Series 60 3.1

    Returns: toolbar object.

    ToolbarShownOnViewActivation ( )

    IMPORT_C TBoolToolbarShownOnViewActivation()const
    Determines if the toolbar of this view is shown when the view is activated.
    Since
    S60 3.2

    Returns: ETrue if toolbar is shown.

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

    IMPORT_C voidViewActivatedL(const TVwsViewId &aPrevViewId,
    TUidaCustomMessageId,
    const TDesC8 &aCustomMessage
    )[protected]

    From MCoeView. Takes any action required when this view is activated. Handles this view activation event from view server. Calls CAknViewAppUi::ViewActivatedL()

    ParameterDescription
    aPrevViewIdSpecifies the view previously active.
    aCustomMessageIdSpecifies the message type.
    aCustomMessageActivation message.

    ViewDeactivated ( )

    IMPORT_C voidViewDeactivated()[protected]

    From MCoeView. Takes any action that is required following deactivation of this view. Handles this view deactivation event from viewserver. Calls CAknViewAppUi::ViewDeactivated()

    ViewId ( )

    IMPORT_C TVwsViewIdViewId()const

    From MCoeView. The full view Id for this view. Calls Id()

    Returns: View identification number.

    ViewScreenDeviceChangedL ( )

    IMPORT_C TVwsViewIdAndMessageViewScreenDeviceChangedL()[protected]

    From MCoeView. Screen device changed function from viewserver.

    Returns: TVwsViewIdAndMessage created with default values.