CAknViewAppUi Class Reference

API published in: S60 1st Ed

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

Capability Information

Required Capabilities

None


#include <aknviewappui.h>

Inherits CAknAppUi.


Detailed Description

Base class for view architecture-based applications.

Public Types

typedef CArrayPtrFlat< CViewActivationItem CAknViewActivationQueue
typedef CArrayPtrFlat< CAknView CAknViews

Public Member Functions

IMPORT_C void  BaseConstructL (TInt aAppUiFlags=EStandardApp)
  Initialises this app UI with standard values.
virtual IMPORT_C  ~CAknViewAppUi ()
  Destructor.
IMPORT_C void  ActivateLocalViewL (TUid aViewId)
  Activates a specified application view, without passing any message.
IMPORT_C void  ActivateLocalViewL (TUid aViewId, TUid aCustomMessageId, const TDesC8 &aCustomMessage)
  Activates a specified application view, then passes the message text descriptor aCustomMessage for a message of type aCustomMessageId.
IMPORT_C CAknView View (TUid aView) const
  Gets a pointer to specified application view.
IMPORT_C void  AddViewL (CAknView *aView)
  Registers and adds the view to the app UI.
IMPORT_C void  RemoveView (TUid aViewId)
  Removes and deregisteres the view from the app UI.
IMPORT_C void  ProcessCommandL (TInt aCommand)
  Processes user commands.
IMPORT_C void  StopDisplayingMenuBar ()
  Stops displaying the application’s menu bar.
void  ViewActivatedL (CAknView *aView, const TVwsViewId &aPrevViewId, TUid aCustomMessageId, const TDesC8 &aCustomMessage)
void  ViewDeactivated (CAknView *aView)
IMPORT_C void  SetSplitViewL (const TUid aView1Id, const TUid aView2Id, const TInt aLeftViewSize)
  Combines two views.
IMPORT_C void  RemoveSplitViewL (const TUid aViewId)
  Removes a view combination containing the given view UID.
IMPORT_C TBool  SplitViewActive () const
  Checks if split view is in use.
IMPORT_C TUid  FocusedView () const
  Returns the currently focused view.
IMPORT_C TBool  ViewShown (const TUid aViewId) const
  Checks if the given view is visible on the screen.
IMPORT_C void  EnableLocalScreenClearer (TBool aEnable=ETrue)
  Enables/disables local screen clearer.
TRect  ViewRect (const TUid aViewId) const
  Returns view's rectangle.
TKeyResponse  HandleViewNavigationL (const TKeyEvent &aKeyEvent)
  Handles keyboard initiated navigation between visible split views.

Protected Member Functions

IMPORT_C void  HandleStatusPaneSizeChange ()
  From MEikStatusPaneObserver.
IMPORT_C void  HandleForegroundEventL (TBool aForeground)
  From CCoeAppUi.
IMPORT_C void  HandleWsEventL (const TWsEvent &aEvent, CCoeControl *aDestination)
  From AknAppUi.

Protected Attributes

CAknView iView
CAknViews iViews

Data Structures

class   CViewActivationItem
class   TAknSplitViewContainer
  Container class used to hold information about one split view. More...

Member Typedef Documentation

typedef CArrayPtrFlat<CViewActivationItem> CAknViewAppUi::CAknViewActivationQueue
 
typedef CArrayPtrFlat<CAknView> CAknViewAppUi::CAknViews
 

Constructor & Destructor Documentation

virtual IMPORT_C CAknViewAppUi::~CAknViewAppUi  )  [virtual]
 

Destructor.


Member Function Documentation

IMPORT_C void CAknViewAppUi::ActivateLocalViewL TUid  aViewId,
TUid  aCustomMessageId,
const TDesC8 &  aCustomMessage
 

Activates a specified application view, then passes the message text descriptor aCustomMessage for a message of type aCustomMessageId.

The function leaves if activation of the view fails.

Parameters:
aViewId  Identifier of the view to activate.
aCustomMessageId  Specifies the message type.
aCustomMessage  The message passed to the activated view.
IMPORT_C void CAknViewAppUi::ActivateLocalViewL TUid  aViewId  ) 
 

Activates a specified application view, without passing any message.

The function leaves if activation of the view fails.

Parameters:
aViewId  Identifier of the view to activate.
IMPORT_C void CAknViewAppUi::AddViewL CAknView aView  ) 
 

Registers and adds the view to the app UI.

This function calls CCoeAppUi::RegisterViewL.

Parameters:
aView  The view to be registered and added.
IMPORT_C void CAknViewAppUi::BaseConstructL TInt  aAppUiFlags = EStandardApp  ) 
 

Initialises this app UI with standard values.

Parameters:
aAppUiFlags  Application user interface flags.

Reimplemented from CAknAppUi.

IMPORT_C void CAknViewAppUi::EnableLocalScreenClearer TBool  aEnable = ETrue  ) 
 

Enables/disables local screen clearer.

Local screen clearer is used in the view based applications to clear the application window if/when the view itself fails to do this. By default, the clearer is used. This function must be called before the BaseConstructL() to prevent the screen clearer on application start up.

Parameters:
aEnable  ETrue enables local screen clearer. EFalse disables local screen clearer.
IMPORT_C TUid CAknViewAppUi::FocusedView  )  const
 

Returns the currently focused view.

Returns:
UID of the currently focused view.
IMPORT_C void CAknViewAppUi::HandleForegroundEventL TBool  aForeground  )  [protected]
 

From CCoeAppUi.

Handles changes in keyboard focus when an application switches to foreground.

Parameters:
aForeground  ETrue if the application is in the foreground, otherwise EFalse.

Reimplemented from CAknAppUi.

IMPORT_C void CAknViewAppUi::HandleStatusPaneSizeChange  )  [protected, virtual]
 

From MEikStatusPaneObserver.

Handles a change in the position or size of the screen area occupied by the status pane.

Reimplemented from CAknAppUi.

TKeyResponse CAknViewAppUi::HandleViewNavigationL const TKeyEvent &  aKeyEvent  ) 
 

Handles keyboard initiated navigation between visible split views.

Parameters:
aKeyEvent  Keyboard event.
EKeyWasConsumed  if view focus was changed.
IMPORT_C void CAknViewAppUi::HandleWsEventL const TWsEvent &  aEvent,
CCoeControl *  aDestination
[protected]
 

From AknAppUi.

Handles pointer-initiated view switch. Currently this function does nothing but calls base class function.

Parameters:
aEvent  Window server event.
aDestination  Pointer to the control which the event is targeted to.

Reimplemented from CAknAppUi.

IMPORT_C void CAknViewAppUi::ProcessCommandL TInt  aCommand  ) 
 

Processes user commands.

Parameters:
aCommand  A command ID.

Reimplemented from CAknAppUi.

IMPORT_C void CAknViewAppUi::RemoveSplitViewL const TUid  aViewId  ) 
 

Removes a view combination containing the given view UID.

If the view with the given UID is currently visible then the screen is switched to single view and the the given view stays active.

Parameters:
aViewId  UID of a view combination.
IMPORT_C void CAknViewAppUi::RemoveView TUid  aViewId  ) 
 

Removes and deregisteres the view from the app UI.

This function calls CCoeAppUi::DeregisterView.

Parameters:
aViewId  The view to be deregistered and removed.
IMPORT_C void CAknViewAppUi::SetSplitViewL const TUid  aView1Id,
const TUid  aView2Id,
const TInt  aLeftViewSize
 

Combines two views.

If either of the views belongs to another view combination then that combination is removed.

Parameters:
aView1Id  UID of the first (leftmost) view.
aView2Id  UID of the second view.
aLeftViewSize  Size of the first view (in percentages).
IMPORT_C TBool CAknViewAppUi::SplitViewActive  )  const
 

Checks if split view is in use.

Returns:
ETrue if a split view is active.
IMPORT_C void CAknViewAppUi::StopDisplayingMenuBar  ) 
 

Stops displaying the application’s menu bar.

IMPORT_C CAknView* CAknViewAppUi::View TUid  aView  )  const
 

Gets a pointer to specified application view.

Parameters:
aView  ID of the application view.
Returns:
Pointer to application view object, NULL if aView doesn't exists.
void CAknViewAppUi::ViewActivatedL CAknView aView,
const TVwsViewId &  aPrevViewId,
TUid  aCustomMessageId,
const TDesC8 &  aCustomMessage
 
void CAknViewAppUi::ViewDeactivated CAknView aView  ) 
 
TRect CAknViewAppUi::ViewRect const TUid  aViewId  )  const
 

Returns view's rectangle.

Parameters:
aViewId  UID of the view whose rectangle should be returned.
Given  view's drawing area.
IMPORT_C TBool CAknViewAppUi::ViewShown const TUid  aViewId  )  const
 

Checks if the given view is visible on the screen.

Parameters:
aViewId  View to be checked.
Returns:
ETrue if the given view is visible.

Field Documentation

CAknView* CAknViewAppUi::iView [protected]
 
CAknViews* CAknViewAppUi::iViews [protected]
 

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

Copyright © Nokia Corporation 2001-2008
Back to top