CAknView Class Reference

API published in: S60 1st Ed

Link against: avkon.lib eikcore.lib eiksrv.lib

Capability Information

Required Capabilities

None


#include <aknview.h>

Inherited by CClkDateTimeView.


Detailed Description

This is an abstract base class for a Series 60 application view.

Public Member Functions

IMPORT_C  CAknView ()
  Standard constructor.
IMPORT_C  ~CAknView ()
  Standard destructor.
IMPORT_C void  BaseConstructL (TInt aResId=0)
  This is a second stage constructor initializing this view with standard values.
IMPORT_C void  ConstructMenuAndCbaEarlyL ()
  Constructs invisible button group container and menu if they don't exist yet.
IMPORT_C void  ActivateViewL (const TVwsViewId &aViewId)
  Activate any view in the product.
IMPORT_C void  ActivateViewL (const TVwsViewId &aViewId, TUid aCustomMessageId, const TDesC8 &aCustomMessage)
  Activate any view, then passes the message text aCustomMessage of type aCustomMessageId.
virtual IMPORT_C TUid  Id () const =0
  Returns views id, intended for overriding by sub classes.
virtual IMPORT_C void  HandleStatusPaneSizeChange ()
  Event handler for status pane size changes.
IMPORT_C TVwsViewId  ViewId () const
  From MCoeView.
virtual IMPORT_C void  ProcessCommandL (TInt aCommand)
  From MEikMenuObserver.
virtual IMPORT_C void  HandleCommandL (TInt aCommand)
  Command handling function intended for overriding by sub classes.
virtual IMPORT_C CEikMenuBar MenuBar () const
  Menu bar accessor method.
IMPORT_C TRect  ClientRect () const
  Calculates the client rectangle of the view, taking the applications client rectangle and the views CBA into account.
IMPORT_C void  StopDisplayingMenuBar ()
  This function causes the menu bar to disappear from the screen until it is invoked again by the user.
IMPORT_C TBool  IsForeground () const
  Determines whether the application is foreground.
virtual IMPORT_C void  HandleViewRectChange ()
  Called by the framework when view's rectangle changes.
virtual IMPORT_C void  Redraw () const
  Asks the view to redraw its area.
virtual IMPORT_C void  AknViewActivatedL (const TVwsViewId &aPrevViewId, TUid aCustomMessageId, const TDesC8 &aCustomMessage)
  Avkon view architecture system.
void  AknViewDeactivated ()
  Avkon view architecture system.
void  ProcessForegroundEventL (TBool aForeground)
  Avkon view architecture system.
IMPORT_C CAknToolbar *  Toolbar () const
IMPORT_C void  StopDisplayingToolbar ()
  This function causes toolbar to be hidden.
IMPORT_C TBool  ToolbarShownOnViewActivation () const
  Determines if the toolbar of this view is shown when the view is activated.
IMPORT_C void  ShowToolbarOnViewActivation (TBool aVisible)
  Sets toolbar visibility status of this view according to value given.
void  SaveToolbarStatus (TBool aVisible, TBool aFocused)
  Saves toolbar status of this view according to values given.

Protected Member Functions

IMPORT_C CAknViewAppUi AppUi () const
  Accessor for the applications user interface as a CAknViewAppUi.
IMPORT_C CEikStatusPane StatusPane () const
  Status pane accessor method.
IMPORT_C CEikButtonGroupContainer Cba () const
  Button group container (=CBA) accessor method.
virtual IMPORT_C void  DoActivateL (const TVwsViewId &aPrevViewId, TUid aCustomMessageId, const TDesC8 &aCustomMessage)=0
  Handles a view activation and passes the message of type aCustomMessageId.
virtual void  DoDeactivate ()=0
  View deactivation function intended for overriding by sub classes.
IMPORT_C void  ViewActivatedL (const TVwsViewId &aPrevViewId, TUid aCustomMessageId, const TDesC8 &aCustomMessage)
  From MCoeView.
IMPORT_C void  ViewDeactivated ()
  From MCoeView.
IMPORT_C TVwsViewIdAndMessage  ViewScreenDeviceChangedL ()
  From MCoeView.
IMPORT_C TTypeUid::Ptr  MopSupplyObject (TTypeUid aId)
  From MObjectProvider.
IMPORT_C MObjectProvider *  MopNext ()
  From MObjectProvider.
virtual IMPORT_C void  SetEmphasis (CCoeControl *aMenuControl, TBool aEmphasis)
  From MEikMenuObserver.
virtual IMPORT_C void  HandleForegroundEventL (TBool aForeground)
  From MEikMenuObserver.

Protected Attributes

CCoeEnv *  iCoeEnv

Data Structures

struct   SAknViewInfo

Constructor & Destructor Documentation

IMPORT_C CAknView::CAknView  ) 
 

Standard constructor.

IMPORT_C CAknView::~CAknView  ) 
 

Standard destructor.


Member Function Documentation

IMPORT_C void CAknView::ActivateViewL const TVwsViewId &  aViewId,
TUid  aCustomMessageId,
const TDesC8 &  aCustomMessage
 

Activate any view, then passes the message text aCustomMessage of type aCustomMessageId.

Calls CCoeAppUi::ActivateViewL( aViewId,aCustomMessageId,aCustomMessage)

Parameters:
aViewId  Identifies the view to activate.
aCustomMessageId  Specifies the message type.
aCustomMessage  The message passed to the activated view.
IMPORT_C void CAknView::ActivateViewL const TVwsViewId &  aViewId  ) 
 

Activate any view in the product.

Calls CCoeAppUi::ActivateViewL( aViewId)

Parameters:
aViewId  Identifies the view to activate.
virtual IMPORT_C void CAknView::AknViewActivatedL const TVwsViewId &  aPrevViewId,
TUid  aCustomMessageId,
const TDesC8 &  aCustomMessage
[virtual]
 

Avkon view architecture system.

Internal use only. Calls DoActivateL.

void CAknView::AknViewDeactivated  ) 
 

Avkon view architecture system.

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

IMPORT_C CAknViewAppUi* CAknView::AppUi  )  const [protected]
 

Accessor for the applications user interface as a CAknViewAppUi.

Returns:
Pointer to user interface instance.
IMPORT_C void CAknView::BaseConstructL TInt  aResId = 0  ) 
 

This is a second stage constructor initializing this view with standard values.

Should be called from derived classes second stage construction functions.

Parameters:
aResId  The numeric ID of the resource (iViewInfo) to be read. If aResId=0, resource file is not accessed.
IMPORT_C CEikButtonGroupContainer* CAknView::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.
IMPORT_C TRect CAknView::ClientRect  )  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.
IMPORT_C void CAknView::ConstructMenuAndCbaEarlyL  ) 
 

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.

virtual IMPORT_C void CAknView::DoActivateL const TVwsViewId &  aPrevViewId,
TUid  aCustomMessageId,
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.

Parameters:
aPrevViewId  Specifies the view previously active.
aCustomMessageId  Specifies the message type.
aCustomMessage  The activation message.

Implemented in CClkDateTimeView.

virtual void CAknView::DoDeactivate  )  [protected, pure virtual]
 

View deactivation function intended for overriding by sub classes.

This function is called by AknViewDeactivated().

Implemented in CClkDateTimeView.

virtual IMPORT_C void CAknView::HandleCommandL TInt  aCommand  )  [virtual]
 

Command handling function intended for overriding by sub classes.

Default implementation is empty.

Parameters:
aCommand  ID of the command to respond to.

Reimplemented in CClkDateTimeView.

virtual IMPORT_C void CAknView::HandleForegroundEventL TBool  aForeground  )  [protected, virtual]
 

From MEikMenuObserver.

Foreground event handling function intended for overriding by sub classes.

Parameters:
aForeground  Indicates the required focus state of the control.
virtual IMPORT_C void CAknView::HandleStatusPaneSizeChange  )  [virtual]
 

Event handler for status pane size changes.

CAknView provides an empty implementation for sub classes that do not want to handle this event.

virtual IMPORT_C void CAknView::HandleViewRectChange  )  [virtual]
 

Called by the framework when view's rectangle changes.

The default implementation is empty. This function is not used yet.

virtual IMPORT_C TUid CAknView::Id  )  const [pure virtual]
 

Returns views id, intended for overriding by sub classes.

Returns:
id for this view.

Implemented in CClkDateTimeView.

IMPORT_C TBool CAknView::IsForeground  )  const
 

Determines whether the application is foreground.

Returns:
ETrue if view is foreground.
virtual IMPORT_C CEikMenuBar* CAknView::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.
IMPORT_C MObjectProvider* CAknView::MopNext  )  [protected]
 

From MObjectProvider.

Gets the parent object provider.

Returns:
Pointer to the parent object provider (MObjectProvider) that is CAknViewAppUi* iAppUi, or NULL.
IMPORT_C TTypeUid::Ptr CAknView::MopSupplyObject TTypeUid  aId  )  [protected]
 

From MObjectProvider.

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

Parameters:
aId  Encapsulates the Uid that identifies the type of object required.
Returns:
Pointer to the MAknsControlContext object provided. Note that the pointer may be NULL.
virtual IMPORT_C void CAknView::ProcessCommandL TInt  aCommand  )  [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.

Parameters:
aCommand  ID of the command to respond to.
void CAknView::ProcessForegroundEventL TBool  aForeground  ) 
 

Avkon view architecture system.

Internal use only.

virtual IMPORT_C void CAknView::Redraw  )  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.

void CAknView::SaveToolbarStatus TBool  aVisible,
TBool  aFocused
 

Saves toolbar status of this view according to values given.

The values are used when view is activated.

Parameters:
aVisible  to determine if toolbar should be shown.
aFocused  ETrue if toolbar is focused, EFalse if not
virtual IMPORT_C void CAknView::SetEmphasis CCoeControl *  aMenuControl,
TBool  aEmphasis
[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.

Parameters:
aMenuControl  The control to be emphasised or de-emphasisied.
aEmphasis  ETrue to emphasize the menu, EFalse to refuse the focus.
IMPORT_C void CAknView::ShowToolbarOnViewActivation TBool  aVisible  ) 
 

Sets toolbar visibility status of this view according to value given.

The value is used when view is activated.

Parameters:
aVisible  to determine if toolbar should be shown.
IMPORT_C CEikStatusPane* CAknView::StatusPane  )  const [protected]
 

Status pane accessor method.

Returns:
Pointer to status pane.
IMPORT_C void CAknView::StopDisplayingMenuBar  ) 
 

This function causes the menu bar to disappear from the screen until it is invoked again by the user.

Calls CEikAppUi::StopDisplayingMenuBar().

IMPORT_C void CAknView::StopDisplayingToolbar  ) 
 

This function causes toolbar to be hidden.

IMPORT_C CAknToolbar* CAknView::Toolbar  )  const
 
Returns:
toolbar object.
IMPORT_C TBool CAknView::ToolbarShownOnViewActivation  )  const
 

Determines if the toolbar of this view is shown when the view is activated.

Returns:
ETrue if toolbar is shown.
IMPORT_C void CAknView::ViewActivatedL const TVwsViewId &  aPrevViewId,
TUid  aCustomMessageId,
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()

Parameters:
aPrevViewId  Specifies the view previously active.
aCustomMessageId  Specifies the message type.
aCustomMessage  Activation message.
IMPORT_C void CAknView::ViewDeactivated  )  [protected]
 

From MCoeView.

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

IMPORT_C TVwsViewId CAknView::ViewId  )  const
 

From MCoeView.

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

Returns:
View identification number.
IMPORT_C TVwsViewIdAndMessage CAknView::ViewScreenDeviceChangedL  )  [protected]
 

From MCoeView.

Screen device changed function from viewserver.

Returns:
TVwsViewIdAndMessage created with default values.

Field Documentation

CCoeEnv* CAknView::iCoeEnv [protected]
 

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top