CAknNavigationDecorator Class Reference

API published in: S60 1st Ed

Link against: avkon.lib

Capability Information

Required Capabilities

None


#include <aknnavide.h>

Inherits CAknControl, and MAknNavigationDecoratorInterface.


Detailed Description

Decorator class for navigation pane controls.

The class, for example, decorates navigation pane controls with navi arrows.


Public Types

enum   TScrollButton { ELeftButton = 0x0001, ERightButton = 0x0002 }
  Defines scroll buttons. More...
enum   TControlType {
  ENotSpecified, ETabGroup, ENaviLabel, ENaviImage,
  EHintText, EEditorIndicator, ENaviVolume
}
  Defines type of the decorated control. More...
enum   TAknNaviControlLayoutStyle { ENaviControlLayoutNormal = 0x1, ENaviControlLayoutNarrow = 0x2, ENaviControlLayoutWide = 0x4 }
  Defines the navigation control layout style. More...
enum   TAknNaviControlLayoutMode { ENaviControlLayoutModeAutomatic = 0x400, ENaviControlLayoutModeForced = 0x800 }
  Defines the navigation control layout mode. More...

Public Member Functions

IMPORT_C  ~CAknNavigationDecorator ()
  Destructor.
IMPORT_C CCoeControl *  DecoratedControl ()
  Returns the control inside a navigation decorator object.
IMPORT_C void  MakeScrollButtonVisible (TBool aVisible)
  Shows or hides the navigation arrows at the both ends of the navigation pane when current object is shown.
IMPORT_C TBool  ScrollButtonVisible () const
  Gets the State of the visibility of navigation arrows.
IMPORT_C void  SetScrollButtonDimmed (TScrollButton aButton, TBool aDimmed)
  Sets the navigation arrow dimmed (and highlighted).
IMPORT_C TBool  IsScrollButtonDimmed (TScrollButton aButton) const
  Is button dimmed or highlighted.
IMPORT_C void  SetControlType (TControlType aType)
  Sets the type of the decorated control.
IMPORT_C TControlType  ControlType () const
  Returns the type of the decorated control.
virtual IMPORT_C void  SetNaviDecoratorObserver (MAknNaviDecoratorObserver *aObserver)
  Sets observer for navigation decorator events in the decorated control.
void  SetNaviStack (CAknNavigationControlContainer *aContainer)
  Sets the pointer to the default navigation pane control.
IMPORT_C void  HandlePointerEventL (const TPointerEvent &aPointerEvent)
  From CCoeControl.
IMPORT_C void  SetNaviControlLayoutStyle (TAknNaviControlLayoutStyle aStyle)
  Sets the layout style for this objects decorated control.
IMPORT_C TAknNaviControlLayoutStyle  NaviControlLayoutStyle ()
  Gets the current layout style of this objects decorated control (ENaviControlLayoutNormalm ENaviControlLayoutNarrow or ENaviControlLayoutWide).
IMPORT_C TBool  NaviControlLayoutStyleSupported (TAknNaviControlLayoutStyle aStyle)
  Tells if decorated control supports given layout style at the current statuspane layout.
IMPORT_C void  SetNaviControlLayoutMode (TAknNaviControlLayoutMode aMode)
  Sets the layout mode ENaviControlLayoutModeAutomatic or ENaviControlLayoutModeForced.
IMPORT_C TAknNaviControlLayoutMode  NaviControlLayoutMode ()
  Gets the current layout mode of decorated control.
virtual IMPORT_C void  HandleResourceChange (TInt aType)
  Handles a change to the control's resources of type aType which are shared across the environment, e.g.

Static Public Member Functions

static IMPORT_C CAknNavigationDecorator NewL (CAknNavigationControlContainer *aNavigationControlContainer, CCoeControl *aDecoratedControl, TControlType aType=ENotSpecified)
  Creates a new navigation decorator.
static TRect  DecoratedControlRect (TInt aControlType)
  Gets the default rectangle of the given control type.
static TRect  DecoratedControlNarrowRect (TInt aControlType)
  Gets the default rectangle of the navigation pane's default control.
static TRect  DecoratedTabControlRect (TBool aTopAdjacent)
  Gets the default rect of tab group control type relative to navipane in normal layoutstyle (ENaviControlLayoutNormal).

Protected Member Functions

virtual IMPORT_C void  SizeChanged ()
  From CCoeControl.
virtual IMPORT_C TInt  CountComponentControls () const
  From CCoeControl.
virtual IMPORT_C CCoeControl *  ComponentControl (TInt aIndex) const
  From CCoeControl.
IMPORT_C void  HandleControlEventL (CCoeControl *aControl, TCoeEvent aEventType)
  From MCoeControlObserver.

Protected Attributes

CCoeControl *  iDecoratedControl
  Decorated control.
CAknNavigationControlContainer iContainer
  Navigation pane default control.
MAknNaviDecoratorObserver iNaviDecoratorObserver
  Observer for handling decorator events.

Friends

class  CAknNavigationControlContainer

Member Enumeration Documentation

enum CAknNavigationDecorator::TAknNaviControlLayoutMode
 

Defines the navigation control layout mode.

Enumerator:
ENaviControlLayoutModeAutomatic  This is the default layout mode.

It lets UI framework to decide the proper layout style which is applied to decorated controls in all situations.

ENaviControlLayoutModeForced  ENaviControlLayoutModeForced layout mode can be used to lock the layout style to the current style.
enum CAknNavigationDecorator::TAknNaviControlLayoutStyle
 

Defines the navigation control layout style.

Enumerator:
ENaviControlLayoutNormal  Normal layout style.
ENaviControlLayoutNarrow  Narrow layout style.
ENaviControlLayoutWide  Wide layout style, can be used only in portrait mode, in usual status pane layout (R_AVKON_STATUS_PANE_LAYOUT_USUAL_EXT).

Tabs are not currently supported in wide layout style.

enum CAknNavigationDecorator::TControlType
 

Defines type of the decorated control.

Enumerator:
ENotSpecified  Type not specified.
ETabGroup  Tab group.
ENaviLabel  Label.
ENaviImage  Image.
EHintText  Text.
EEditorIndicator  Indicator.
ENaviVolume  Volume.
enum CAknNavigationDecorator::TScrollButton
 

Defines scroll buttons.

Enumerator:
ELeftButton  Scroll left.
ERightButton  Scroll right.

Constructor & Destructor Documentation

IMPORT_C CAknNavigationDecorator::~CAknNavigationDecorator  ) 
 

Destructor.


Member Function Documentation

virtual IMPORT_C CCoeControl* CAknNavigationDecorator::ComponentControl TInt  aIndex  )  const [protected, virtual]
 

From CCoeControl.

Returns a control determined by control id.

Parameters:
aIndex  Index of a control to be returned.
Returns:
Pointer to the control.
IMPORT_C TControlType CAknNavigationDecorator::ControlType  )  const
 

Returns the type of the decorated control.

Returns:
Control type.
virtual IMPORT_C TInt CAknNavigationDecorator::CountComponentControls  )  const [protected, virtual]
 

From CCoeControl.

Returns the number of controls inside the context pane control.

Returns:
Number of controls.
IMPORT_C CCoeControl* CAknNavigationDecorator::DecoratedControl  )  [virtual]
 

Returns the control inside a navigation decorator object.

Ownership of the control is not changed.

Returns:
Control that is decorated with the decorator.

Implements MAknNavigationDecoratorInterface.

static TRect CAknNavigationDecorator::DecoratedControlNarrowRect TInt  aControlType  )  [static]
 

Gets the default rectangle of the navigation pane's default control.

Parameters:
aControlType  Not used.
Returns:
Rectangle of the navigation pane's default control.
static TRect CAknNavigationDecorator::DecoratedControlRect TInt  aControlType  )  [static]
 

Gets the default rectangle of the given control type.

Parameters:
aControlType  The control type from which default rectangle is asked.
Returns:
Rectangle which tells the default area for given controltype. Coordinates are relative to navipane.
static TRect CAknNavigationDecorator::DecoratedTabControlRect TBool  aTopAdjacent  )  [static]
 

Gets the default rect of tab group control type relative to navipane in normal layoutstyle (ENaviControlLayoutNormal).

Parameters:
aTopAdjacent  ETrue to return a rectangle adjacent to the top of navi pane, EFalse for a rectangle adjacent to the bottom of navi pane.
Returns:
Rectangle which tells the default area for a tab group.
IMPORT_C void CAknNavigationDecorator::HandleControlEventL CCoeControl *  aControl,
TCoeEvent  aEventType
[protected]
 

From MCoeControlObserver.

Handles an event from an observed control.

Parameters:
aControl  Control that caused the event.
aEventType  Type of the event.
IMPORT_C void CAknNavigationDecorator::HandlePointerEventL const TPointerEvent &  aPointerEvent  ) 
 

From CCoeControl.

Handle pointer events.

Parameters:
aPointerEvent  Pointer event to be handled.
virtual IMPORT_C void CAknNavigationDecorator::HandleResourceChange TInt  aType  )  [virtual]
 

Handles a change to the control's resources of type aType which are shared across the environment, e.g.

color scheme change.

Parameters:
aType  Event type.
IMPORT_C TBool CAknNavigationDecorator::IsScrollButtonDimmed TScrollButton  aButton  )  const
 

Is button dimmed or highlighted.

Parameters:
aButton  Navigation arrow.
Returns:
ETrue If the navigation arrow is dimmed, EFalse if it is highlighted.
IMPORT_C void CAknNavigationDecorator::MakeScrollButtonVisible TBool  aVisible  ) 
 

Shows or hides the navigation arrows at the both ends of the navigation pane when current object is shown.

Parameters:
aVisible  Boolean value if navigation arrows are shown with the decorated control. Visible if ETrue.
IMPORT_C TAknNaviControlLayoutMode CAknNavigationDecorator::NaviControlLayoutMode  ) 
 

Gets the current layout mode of decorated control.

Can be ENaviControlLayoutModeAutomatic (default) or ENaviControlLayoutModeForced (usually set by the application).

Returns:
Decorated control's current layout mode.
IMPORT_C TAknNaviControlLayoutStyle CAknNavigationDecorator::NaviControlLayoutStyle  ) 
 

Gets the current layout style of this objects decorated control (ENaviControlLayoutNormalm ENaviControlLayoutNarrow or ENaviControlLayoutWide).

Returns:
Current layout style of the navicontrol
IMPORT_C TBool CAknNavigationDecorator::NaviControlLayoutStyleSupported TAknNaviControlLayoutStyle  aStyle  ) 
 

Tells if decorated control supports given layout style at the current statuspane layout.

For ENotSpecified type of controls this always returns EFalse (just for safety) because their implementation is not known.

Parameters:
aStyle  The layout style.
Returns:
ETrue if the control supports given layout style otherwise returns EFalse.
static IMPORT_C CAknNavigationDecorator* CAknNavigationDecorator::NewL CAknNavigationControlContainer aNavigationControlContainer,
CCoeControl *  aDecoratedControl,
TControlType  aType = ENotSpecified
[static]
 

Creates a new navigation decorator.

The object takes ownership of the decorated object at the beginning of the method before any leaving functions.

Parameters:
aNavigationControlContainer  Container control.
aDecoratedControl  Control to be decorated.
aType  = ENotSpecified Control type.
Returns:
Navigation Decorator object that contains decorated object.
IMPORT_C TBool CAknNavigationDecorator::ScrollButtonVisible  )  const
 

Gets the State of the visibility of navigation arrows.

Returns:
ETrue if visible.
IMPORT_C void CAknNavigationDecorator::SetControlType TControlType  aType  ) 
 

Sets the type of the decorated control.

Parameters:
aType  Type of the control.
IMPORT_C void CAknNavigationDecorator::SetNaviControlLayoutMode TAknNaviControlLayoutMode  aMode  ) 
 

Sets the layout mode ENaviControlLayoutModeAutomatic or ENaviControlLayoutModeForced.

See TAknNaviControlLayoutMode for more information.

Parameters:
aMode  New layout mode.
IMPORT_C void CAknNavigationDecorator::SetNaviControlLayoutStyle TAknNaviControlLayoutStyle  aStyle  ) 
 

Sets the layout style for this objects decorated control.

The layout style can be normal or narrow style.

The style is really applied if the decorated control supports it or if the layout mode has been set to forced mode (ENaviControlLayoutModeForced). Additionally narrow mode may not be supported at all in some statuspane configurations (even if forced).

Whether decorated control supports or does not support given style at the currently active statuspane layout can be queried using NaviControlLayoutStyleSupported() method.

Parameters:
aStyle  Can be normal (ENaviControlLayoutNormal), narrow (ENaviControlLayoutNarrow) or wide (ENaviControlLayoutWide).
virtual IMPORT_C void CAknNavigationDecorator::SetNaviDecoratorObserver MAknNaviDecoratorObserver aObserver  )  [virtual]
 

Sets observer for navigation decorator events in the decorated control.

Parameters:
aObserver  Pointer to observer.
void CAknNavigationDecorator::SetNaviStack CAknNavigationControlContainer aContainer  ) 
 

Sets the pointer to the default navigation pane control.

Parameters:
aContainer  Pointer to default control in navigation pane.
IMPORT_C void CAknNavigationDecorator::SetScrollButtonDimmed TScrollButton  aButton,
TBool  aDimmed
 

Sets the navigation arrow dimmed (and highlighted).

Arrows have to be visible so that the dimmed arrow is shown on the screen.

Parameters:
aButton  Navigation arrow to be set (ELeftButton or ERightButton).
aDimmed  ETrue is the button is dimmed, EFalse if the button is set highlighted.
virtual IMPORT_C void CAknNavigationDecorator::SizeChanged  )  [protected, virtual]
 

From CCoeControl.

Handles the size change events.


Friends And Related Function Documentation

friend class CAknNavigationControlContainer [friend]
 

Field Documentation

CAknNavigationControlContainer* CAknNavigationDecorator::iContainer [protected]
 

Navigation pane default control.

CCoeControl* CAknNavigationDecorator::iDecoratedControl [protected]
 

Decorated control.

Own.

MAknNaviDecoratorObserver* CAknNavigationDecorator::iNaviDecoratorObserver [protected]
 

Observer for handling decorator events.


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

Copyright © Nokia Corporation 2001-2008
Back to top