CAknNavigationDecorator Class Reference

#include <mw/aknnavide.h>

Link against: mpxcollectionviewhg.lib

class CAknNavigationDecorator : public CAknControl

Inherits from

Protected Attributes
CAknNavigationControlContainer *iContainer
CCoeControl *iDecoratedControl
MAknNaviDecoratorObserver *iNaviDecoratorObserver
Public Member Enumerations
enumTAknNaviControlLayoutMode { ENaviControlLayoutModeAutomatic, ENaviControlLayoutModeForced }
enumTAknNaviControlLayoutStyle { ENaviControlLayoutNormal, ENaviControlLayoutNarrow, ENaviControlLayoutWide }
enumTControlType { ENotSpecified, ETabGroup, ENaviLabel, ENaviImage, ..., ENaviVolume }
enumTScrollButton { ELeftButton, ERightButton }
Public Member Functions
~CAknNavigationDecorator()
IMPORT_C TControlTypeControlType()
IMPORT_C CCoeControl *DecoratedControl()
TRect DecoratedControlNarrowRect(TInt)
TRect DecoratedControlRect(TInt, TBool)
TRect DecoratedTabControlRect(TBool, TBool)
virtual IMPORT_C voidHandlePointerEventL(const TPointerEvent &)
virtual IMPORT_C voidHandleResourceChange(TInt)
IMPORT_C TBoolIsScrollButtonDimmed(TScrollButton)
IMPORT_C voidMakeScrollButtonVisible(TBool)
IMPORT_C TAknNaviControlLayoutModeNaviControlLayoutMode()
IMPORT_C TAknNaviControlLayoutStyleNaviControlLayoutStyle()
IMPORT_C TBoolNaviControlLayoutStyleSupported(TAknNaviControlLayoutStyle)
IMPORT_C CAknNavigationDecorator *NewL(CAknNavigationControlContainer *, CCoeControl *, TControlType)
IMPORT_C TBoolScrollButtonVisible()
IMPORT_C voidSetControlType(TControlType)
IMPORT_C voidSetNaviControlLayoutMode(TAknNaviControlLayoutMode)
IMPORT_C voidSetNaviControlLayoutStyle(TAknNaviControlLayoutStyle)
virtual IMPORT_C voidSetNaviDecoratorObserver(MAknNaviDecoratorObserver *)
voidSetNaviStack(CAknNavigationControlContainer *)
IMPORT_C voidSetScrollButtonDimmed(TScrollButton, TBool)
Protected Member Functions
virtual IMPORT_C CCoeControl *ComponentControl(TInt)
virtual IMPORT_C TIntCountComponentControls()
IMPORT_C voidHandleControlEventL(CCoeControl *, TCoeEvent)
virtual IMPORT_C voidSizeChanged()
Inherited Attributes
CCoeControl::iCoeEnv
CCoeControl::iContext
CCoeControl::iPosition
CCoeControl::iSize
Inherited Enumerations
CCoeControl:TZoomType
Inherited Functions
CAknControl::CAknControl()
CAknControl::~CAknControl()
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()
CCoeControl::AccumulatedZoom()const
CCoeControl::ActivateGc()const
CCoeControl::ActivateL()
CCoeControl::BackedUpWindow()const
CCoeControl::Background()const
CCoeControl::CCoeControl()
CCoeControl::CCoeControl(CCoeEnv *)
CCoeControl::CCoeControl(const CCoeControl &)
CCoeControl::CCoeControlArray
CCoeControl::CapturesPointer()const
CCoeControl::ClaimPointerGrab(TBool)
CCoeControl::ClaimPointerGrab(TInt,TBool)
CCoeControl::CloseWindow()
CCoeControl::ComponentArrayExists()const
CCoeControl::Components()
CCoeControl::Components()const
CCoeControl::ConstructFromResourceL(TResourceReader &)
CCoeControl::ControlContext()const
CCoeControl::ControlEnv()const
CCoeControl::CopyControlContextFrom(const CCoeControl *)
CCoeControl::CreateBackedUpWindowL(RWindowTreeNode &)
CCoeControl::CreateBackedUpWindowL(RWindowTreeNode &,TDisplayMode)
CCoeControl::CreateWindowL()
CCoeControl::CreateWindowL(RWindowGroup *)
CCoeControl::CreateWindowL(RWindowTreeNode &)
CCoeControl::CreateWindowL(const CCoeControl *)
CCoeControl::CustomGc()const
CCoeControl::DeactivateGc()const
CCoeControl::DrawBackground(const TRect &)const
CCoeControl::DrawDeferred()const
CCoeControl::DrawForeground(const TRect &)const
CCoeControl::DrawNow()const
CCoeControl::DrawNow(const TRect &)const
CCoeControl::DrawableWindow()const
CCoeControl::EnableDragEvents()
CCoeControl::EnableReportControlStateChange(TBool)
CCoeControl::EnableWindowTransparency()
CCoeControl::FindBackground()const
CCoeControl::FindFontProvider()const
CCoeControl::FocusChanged(TDrawNow)
CCoeControl::GetColor(TInt,TRgb &)const
CCoeControl::GetColorUseListL(CArrayFix< TCoeColorUse > &)const
CCoeControl::GetGc()const
CCoeControl::GetHelpContext(TCoeHelpContext &)const
CCoeControl::GrabbingComponent()const
CCoeControl::GrabbingComponent(TInt)const
CCoeControl::HandleComponentControlsResourceChange(TInt)
CCoeControl::HandleControlArrayEventL(CCoeControlArray::TEvent,const CCoeControlArray *,CCoeControl *,TInt)
CCoeControl::HandlePointerBufferReadyL()
CCoeControl::HandleRedrawEvent(const TRect &)const
CCoeControl::HasBorder()const
CCoeControl::HitTest()const
CCoeControl::IgnoreEventsUntilNextPointerUp()
CCoeControl::Index(const CCoeControl *)const
CCoeControl::InitComponentArrayL()
CCoeControl::InputCapabilities()const
CCoeControl::IsActivated()const
CCoeControl::IsBackedUp()const
CCoeControl::IsBeingDestroyed()const
CCoeControl::IsBlank()const
CCoeControl::IsDimmed()const
CCoeControl::IsFocused()const
CCoeControl::IsNonFocusing()const
CCoeControl::IsReadyToDraw()const
CCoeControl::IsVisible()const
CCoeControl::LayoutManager()const
CCoeControl::MakeVisible(TBool)
CCoeControl::MaximumWidth()const
CCoeControl::MinimumSize()
CCoeControl::MopSupplyObject(TTypeUid)
CCoeControl::NotifyFontChange(const CCoeFontProvider *)
CCoeControl::Observer()const
CCoeControl::OfferKeyEventL(const TKeyEvent &,TEventCode)
CCoeControl::OverrideColorL(TInt,TRgb)
CCoeControl::OwnsWindow()const
CCoeControl::Parent()
CCoeControl::Parent()const
CCoeControl::Position()const
CCoeControl::PositionChanged()
CCoeControl::PositionRelativeToScreen()const
CCoeControl::PrepareForFocusGainL()
CCoeControl::PrepareForFocusLossL()
CCoeControl::ProcessPointerBufferReadyL()
CCoeControl::ProcessPointerEventL(const TPointerEvent &)
CCoeControl::Rect()const
CCoeControl::RecursivelyMergeInputCapabilities(TCoeInputCapabilities &)const
CCoeControl::RecursivelyMergedInputCapabilities()const
CCoeControl::RefetchPixelMappingL()
CCoeControl::RemoveFromParent()
CCoeControl::ReportEventL(MCoeControlObserver::TCoeEvent)
CCoeControl::RequestRelayout(const CCoeControl *)
CCoeControl::ResetGc()const
CCoeControl::ScreenFont(const TCoeFont &)const
CCoeControl::SetAdjacent(TInt)
CCoeControl::SetAllowStrayPointers()
CCoeControl::SetBackground(const MCoeControlBackground *)
CCoeControl::SetBlank()
CCoeControl::SetCanDrawOutsideRect()
CCoeControl::SetComponentsToInheritVisibility(TBool)
CCoeControl::SetContainerWindowL(RBackedUpWindow &)
CCoeControl::SetContainerWindowL(RWindow &)
CCoeControl::SetContainerWindowL(const CCoeControl &)
CCoeControl::SetControlContext(MCoeControlContext *)
CCoeControl::SetCornerAndSize(TGulAlignment,const TSize &)
CCoeControl::SetCustomGc(CWindowGc *)
CCoeControl::SetDimmed(TBool)
CCoeControl::SetExtent(const TPoint &,const TSize &)
CCoeControl::SetExtentToWholeScreen()
CCoeControl::SetFocus(TBool,TDrawNow)
CCoeControl::SetFocusing(TBool)
CCoeControl::SetFontProviderL(const CCoeFontProvider &)
CCoeControl::SetGc(CWindowGc *)const
CCoeControl::SetGloballyCapturing(TBool)
CCoeControl::SetHitTest(const MCoeControlHitTest *)
CCoeControl::SetLayoutManagerL(MCoeLayoutManager *)
CCoeControl::SetMaximumWidth(TInt)
CCoeControl::SetMopParent(MObjectProvider *)
CCoeControl::SetNeighbor(CCoeControl *)
CCoeControl::SetNonFocusing()
CCoeControl::SetObserver(MCoeControlObserver *)
CCoeControl::SetParent(CCoeControl *)
CCoeControl::SetPointerCapture(TBool)
CCoeControl::SetPosition(const TPoint &)
CCoeControl::SetRect(const TRect &)
CCoeControl::SetSize(const TSize &)
CCoeControl::SetSizeWithoutNotification(const TSize &)
CCoeControl::SetTextBaselineSpacing(TInt)
CCoeControl::SetUniqueHandle(TInt)
CCoeControl::SetZoomFactorL(TInt,TZoomType)
CCoeControl::Size()const
CCoeControl::SystemGc()const
CCoeControl::TextBaselineOffset(const TSize &)const
CCoeControl::TextDrawer(TInt)const
CCoeControl::UniqueHandle()const
CCoeControl::Window()const
CCoeControl::WriteInternalStateL(RWriteStream &)const
CCoeControl::WriteInternalStateNowL(RWriteStream &)const
CCoeControl::ZoomWithType()const
CCoeControl::operator=(const CCoeControl &)
CCoeControl::~CCoeControl()

Detailed Description

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

Member Attribute Documentation

iContainer

CAknNavigationControlContainer *iContainer[protected]

Navigation pane default control.

iDecoratedControl

CCoeControl *iDecoratedControl[protected]

Decorated control. Own.

iNaviDecoratorObserver

MAknNaviDecoratorObserver *iNaviDecoratorObserver[protected]

Observer for handling decorator events.

Member Enumeration Documentation

Enum TAknNaviControlLayoutMode

Defines the navigation control layout mode.

EnumeratorValueDescription
ENaviControlLayoutModeAutomatic0x400

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.

ENaviControlLayoutModeForced0x800

ENaviControlLayoutModeForced layout mode can be used to lock the layout style to the current style.

Enum TAknNaviControlLayoutStyle

Defines the navigation control layout style.

EnumeratorValueDescription
ENaviControlLayoutNormal0x1

Normal layout style.

ENaviControlLayoutNarrow0x2

Narrow layout style.

ENaviControlLayoutWide0x4

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 TControlType

Defines type of the decorated control.

EnumeratorValueDescription
ENotSpecified

Type not specified.

ETabGroup

Tab group.

ENaviLabel

Label.

ENaviImage

Image.

EHintText

Text.

EEditorIndicator

Indicator.

ENaviVolume

Volume.

Enum TScrollButton

Defines scroll buttons.

EnumeratorValueDescription
ELeftButton0x0001

Scroll left.

ERightButton0x0002

Scroll right.

Constructor & Destructor Documentation

~CAknNavigationDecorator ( )

IMPORT_C~CAknNavigationDecorator()

Destructor.

Member Function Documentation

ComponentControl ( TInt )

IMPORT_C CCoeControl *ComponentControl(TIntaIndex)const [protected, virtual]

Reimplemented from CCoeControl::ComponentControl(TInt)const

From CCoeControl.

Returns a control determined by control id.

ParameterDescription
aIndexIndex of a control to be returned.

Returns: Pointer to the control.

ControlType ( )

IMPORT_C TControlTypeControlType()const

Returns the type of the decorated control.

Returns: Control type.

CountComponentControls ( )

IMPORT_C TIntCountComponentControls()const [protected, virtual]

Reimplemented from CCoeControl::CountComponentControls()const

From CCoeControl.

Returns the number of controls inside the context pane control.

Returns: Number of controls.

DecoratedControl ( )

IMPORT_C CCoeControl *DecoratedControl()

Returns the control inside a navigation decorator object. Ownership of the control is not changed.

Returns: Control that is decorated with the decorator.

DecoratedControlNarrowRect ( TInt )

TRect DecoratedControlNarrowRect(TIntaControlType)[static]

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

ParameterDescription
aControlTypeNot used.

Returns: Rectangle of the navigation pane's default control.

DecoratedControlRect ( TInt, TBool )

TRect DecoratedControlRect(TIntaControlType,
TBoolaArrowsUsed = ETrue
)[static]

Gets the default rectangle of the given control type.

ParameterDescription
aControlTypeThe control type from which default rectangle is asked.
aArrowsUsedWhether or not the navigation arrows are used for the control. This is only used for the tab group control. If arrows are not used with tab group, then the whole navi pane area is provided to the tab group control.

Returns: Rectangle which tells the default area for given controltype. Coordinates are relative to navi pane.

DecoratedTabControlRect ( TBool, TBool )

TRect DecoratedTabControlRect(TBoolaTopAdjacent,
TBoolaArrowsUsed
)[static]

Gets the default rect of tab group control type relative to navipane in normal (ENaviControlLayoutNormal) or wide (ENaviControlLayoutWide) layout style.

ParameterDescription
aTopAdjacentETrue to return a rectangle adjacent to the top of navi pane, EFalse for a rectangle adjacent to the bottom of navi pane.
aArrowsUsedWhether or not the navigation arrows are used for the tab group. If arrows are not used, then the whole navi pane area is provided to the tab group control.

Returns: Rectangle which tells the default area for a tab group.

HandleControlEventL ( CCoeControl *, TCoeEvent )

IMPORT_C voidHandleControlEventL(CCoeControl *aControl,
TCoeEventaEventType
)[protected]

From MCoeControlObserver.

Handles an event from an observed control.

ParameterDescription
aControlControl that caused the event.
aEventTypeType of the event.

HandlePointerEventL ( const TPointerEvent & )

IMPORT_C voidHandlePointerEventL(const TPointerEvent &aPointerEvent)[virtual]

Reimplemented from CCoeControl::HandlePointerEventL(const TPointerEvent &)

From CCoeControl.

Handle pointer events.

ParameterDescription
aPointerEventPointer event to be handled.

HandleResourceChange ( TInt )

IMPORT_C voidHandleResourceChange(TIntaType)[virtual]

Reimplemented from CCoeControl::HandleResourceChange(TInt)

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

ParameterDescription
aTypeEvent type.

IsScrollButtonDimmed ( TScrollButton )

IMPORT_C TBoolIsScrollButtonDimmed(TScrollButtonaButton)const

Is button dimmed or highlighted.

ParameterDescription
aButtonNavigation arrow.

Returns: ETrue If the navigation arrow is dimmed, EFalse if it is highlighted.

MakeScrollButtonVisible ( TBool )

IMPORT_C voidMakeScrollButtonVisible(TBoolaVisible)

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

ParameterDescription
aVisibleBoolean value if navigation arrows are shown with the decorated control. Visible if ETrue.

NaviControlLayoutMode ( )

IMPORT_C TAknNaviControlLayoutModeNaviControlLayoutMode()

Gets the current layout mode of decorated control. Can be ENaviControlLayoutModeAutomatic (default) or ENaviControlLayoutModeForced (usually set by the application).

Since
S60 3.0

Returns: Decorated control's current layout mode.

NaviControlLayoutStyle ( )

IMPORT_C TAknNaviControlLayoutStyleNaviControlLayoutStyle()

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

Since
S60 3.0

Returns: Current layout style of the navicontrol

NaviControlLayoutStyleSupported ( TAknNaviControlLayoutStyle )

IMPORT_C TBoolNaviControlLayoutStyleSupported(TAknNaviControlLayoutStyleaStyle)

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.

Since
S60 3.0
ParameterDescription
aStyleThe layout style.

Returns: ETrue if the control supports given layout style otherwise returns EFalse.

NewL ( CAknNavigationControlContainer *, CCoeControl *, TControlType )

IMPORT_C CAknNavigationDecorator *NewL(CAknNavigationControlContainer *aNavigationControlContainer,
CCoeControl *aDecoratedControl,
TControlTypeaType = 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.

ParameterDescription
aNavigationControlContainerContainer control.
aDecoratedControlControl to be decorated.
aType= ENotSpecified Control type.

Returns: Navigation Decorator object that contains decorated object.

ScrollButtonVisible ( )

IMPORT_C TBoolScrollButtonVisible()const

Gets the State of the visibility of navigation arrows.

Returns: ETrue if visible.

SetControlType ( TControlType )

IMPORT_C voidSetControlType(TControlTypeaType)

Sets the type of the decorated control.

ParameterDescription
aTypeType of the control.

SetNaviControlLayoutMode ( TAknNaviControlLayoutMode )

IMPORT_C voidSetNaviControlLayoutMode(TAknNaviControlLayoutModeaMode)

Sets the layout mode ENaviControlLayoutModeAutomatic or ENaviControlLayoutModeForced. See TAknNaviControlLayoutMode for more information.

Since
S60 3.0
ParameterDescription
aModeNew layout mode.

SetNaviControlLayoutStyle ( TAknNaviControlLayoutStyle )

IMPORT_C voidSetNaviControlLayoutStyle(TAknNaviControlLayoutStyleaStyle)

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.

Since
S60 3.0
ParameterDescription
aStyleCan be normal (ENaviControlLayoutNormal), narrow (ENaviControlLayoutNarrow) or wide (ENaviControlLayoutWide).

SetNaviDecoratorObserver ( MAknNaviDecoratorObserver * )

IMPORT_C voidSetNaviDecoratorObserver(MAknNaviDecoratorObserver *aObserver)[virtual]

Sets observer for navigation decorator events in the decorated control.

ParameterDescription
aObserverPointer to observer.

SetNaviStack ( CAknNavigationControlContainer * )

voidSetNaviStack(CAknNavigationControlContainer *aContainer)

Sets the pointer to the default navigation pane control.

ParameterDescription
aContainerPointer to default control in navigation pane.

SetScrollButtonDimmed ( TScrollButton, TBool )

IMPORT_C voidSetScrollButtonDimmed(TScrollButtonaButton,
TBoolaDimmed
)

Sets the navigation arrow dimmed (and highlighted). Arrows have to be visible so that the dimmed arrow is shown on the screen.

ParameterDescription
aButtonNavigation arrow to be set (ELeftButton or ERightButton).
aDimmedETrue is the button is dimmed, EFalse if the button is set highlighted.

SizeChanged ( )

IMPORT_C voidSizeChanged()[protected, virtual]

Reimplemented from CCoeControl::SizeChanged()

From CCoeControl.

Handles the size change events.