CAknToolbar Class Reference

#include <mw/akntoolbar.h>

Link against: eikcoctl.lib

class CAknToolbar : public CAknControl

Inherits from

Public Member Enumerations
enumTEventModifiers { ELongPress, ELongPressEnded }
Public Member Functions
~CAknToolbar()
IMPORT_C voidAddItemL(CCoeControl *, const TInt, const TInt, const TInt)
IMPORT_C voidAddItemL(CCoeControl *, const TInt, const TInt, const TInt, const TInt)
virtual IMPORT_C CCoeControl *ComponentControl(TInt)
IMPORT_C CCoeControl *ControlOrNull(const TInt)
virtual IMPORT_C TIntCountComponentControls()
TInt CountFadedComponents()
IMPORT_C voidDisableToolbarL(TBool)
IMPORT_C voidDraw(CWindowGc &, const CCoeControl &, const TRect &)
voidDynInitExtensionL(CCoeControl *)
IMPORT_C TIntEventModifiers()
voidExtensionEventL(TInt)
CCoeControl *FadedComponent(TInt)
IMPORT_C TIntFocusedItem()
IMPORT_C voidHandleControlEventL(CCoeControl *, TCoeEvent)
virtual IMPORT_C voidHandlePointerEventL(const TPointerEvent &)
virtual IMPORT_C voidHandleResourceChange(TInt)
IMPORT_C voidHideItem(const TInt, const TBool, const TBool)
IMPORT_C voidHideItemsAndDrawOnlyBackground(TBool)
IMPORT_C voidHideItemsAndDrawOnlyBackground(TBool, TInt)
virtual IMPORT_C TCoeInputCapabilitiesInputCapabilities()
IMPORT_C TBoolIsShown()
IMPORT_C TBoolIsSupportedItemType(const TInt)
IMPORT_C TBoolIsToolbarDisabled()
IMPORT_C CAknToolbar *NewL(const TInt)
IMPORT_C CAknToolbar *NewLC(const TInt)
virtual IMPORT_C TKeyResponseOfferKeyEventL(const TKeyEvent &, TEventCode)
virtual IMPORT_C voidPositionChanged()
virtual voidPrepareForFocusLossL()
IMPORT_C voidProcessCommandL(TInt)
TInt ReadyToSlide(TAny *)
voidReduceRect(TRect &)
IMPORT_C voidRemoveItem(const TInt)
IMPORT_C voidSetCloseOnAllCommands(const TBool)
IMPORT_C voidSetCloseOnCommand(const TInt, const TBool)
virtual IMPORT_C voidSetDimmed(TBool)
IMPORT_C voidSetEmphasis(const TBool)
IMPORT_C voidSetFocusedItemL(const TInt)
IMPORT_C voidSetInitialFocusedItem(const TInt)
IMPORT_C voidSetItemDimmed(const TInt, const TBool, const TBool)
IMPORT_C voidSetOrientation(const TAknOrientation)
IMPORT_C voidSetSkinBackgroundId(const TAknsItemID &)
IMPORT_C voidSetSoftkeyResourceIdL(TInt)
IMPORT_C voidSetToolbarObserver(MAknToolbarObserver *)
IMPORT_C voidSetToolbarVisibility(const TBool)
IMPORT_C voidSetToolbarVisibility(const TBool, const TBool)
IMPORT_C voidSetWithSliding(const TBool)
voidShowToolbarForBackgroundUpdate()
voidSlideWithIdle()
IMPORT_C CAknToolbarExtension *ToolbarExtension()
IMPORT_C TIntToolbarFlags()
IMPORT_C MAknToolbarObserver *ToolbarObserver()
TInt ToolbarVisibleIndexByControl(const CCoeControl *)
IMPORT_C voidUpdateBackground()
Protected Member Functions
virtual IMPORT_C void *ExtensionInterface(TUid)
virtual IMPORT_C voidFocusChanged(TDrawNow)
IMPORT_C TTypeUid::PtrMopSupplyObject(TTypeUid)
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::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::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::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::NotifyFontChange(const CCoeFontProvider *)
CCoeControl::Observer()const
CCoeControl::OverrideColorL(TInt,TRgb)
CCoeControl::OwnsWindow()const
CCoeControl::Parent()
CCoeControl::Parent()const
CCoeControl::Position()const
CCoeControl::PositionRelativeToScreen()const
CCoeControl::PrepareForFocusGainL()
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::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

The class to provide toolbar for the application

Since
Series 60 3.1

Member Enumeration Documentation

Enum TEventModifiers

EnumeratorValueDescription
ELongPress1
ELongPressEnded2

Constructor & Destructor Documentation

~CAknToolbar ( )

~CAknToolbar()

Destructor

Member Function Documentation

AddItemL ( CCoeControl *, const TInt, const TInt, const TInt )

IMPORT_C voidAddItemL(CCoeControl *aItem,
const TIntaType,
const TIntaCommandId,
const TIntaFlags
)

Adds one item to the end of the toolbar. Takes ownership. Leaves with value KErrNotSupported, if the control type is not supported by toolbar (see CAknToolbar::IsSupportedItemType()).

ParameterDescription
aItemThe control.
aTypeThe type of the new toolbar item.
aCommandIdThe command ID for this item.
aFlagsThe flags.

AddItemL ( CCoeControl *, const TInt, const TInt, const TInt, const TInt )

IMPORT_C voidAddItemL(CCoeControl *aItem,
const TIntaType,
const TIntaCommandId,
const TIntaFlags,
const TIntaIndex
)

Adds one item to the specified place. Takes ownership. Leaves with value KErrNotSupported, if the control type is not supported by toolbar (see CAknToolbar::IsSupportedItemType()).

ParameterDescription
aItemThe control.
aTypeThe type of the new toolbar item.
aCommandIdThe command ID for this item.
aFlagsThe flags.
aIndexThe index in array at which item should be added.

ComponentControl ( TInt )

IMPORT_C CCoeControl *ComponentControl(TIntaIndex)const [virtual]

From CCoeControl. Gets the specified component of a compound control.

ParameterDescription
aIndexThe index of the control to get

Returns: The component control with an index of aIndex.

ControlOrNull ( const TInt )

IMPORT_C CCoeControl *ControlOrNull(const TIntaControlId)const

Gets a pointer to the specified control.

ParameterDescription
aControlIdThe ID of the control for which a pointer is required.

Returns: Pointer to the control with the specified ID.

CountComponentControls ( )

IMPORT_C TIntCountComponentControls()const [virtual]

From CCoeControl. Gets the number of controls contained in a compound control.

Returns: The number of component controls contained by this control.

CountFadedComponents ( )

TInt CountFadedComponents()

DisableToolbarL ( TBool )

IMPORT_C voidDisableToolbarL(TBoolaDisable)

Disables/Enables toolbar so that it cannot/can be activated from e.g. touch pane. Needed especially if a dialog is on the screen and toolbar is not wished to be shown. Leaves with value KErrToolbarShown if called when toolbar is shown.

Since
S60 3.2
ParameterDescription
aDisableETrue if toolbar should be disabled

Draw ( CWindowGc &, const CCoeControl &, const TRect & )

IMPORT_C voidDraw(CWindowGc &aGc,
const CCoeControl &aControl,
const TRect &aRect
)const

From MCoeControlBackground. Draw the background for a given control. The text drawer that shall be used to draw text on the specific background can be fetched through the GetTextDrawer() method.

ParameterDescription
aGcGraphics context used for drawing.
aControlThe control being drawn (may be a child of the drawer).
aRectThe area to be redrawn.

DynInitExtensionL ( CCoeControl * )

voidDynInitExtensionL(CCoeControl *aControl)

Calls DynInitToolbar with extensions commmand id

EventModifiers ( )

IMPORT_C TIntEventModifiers()const

Returns event modifiers defined in TEventModifiers in this header. This can be used by applications in OfferToolbarEventL to know if the event sent was for example a long press event. Information is valid only during OfferToolbarEventL.

Since
S60 3.2

Returns: event modifiers

ExtensionEventL ( TInt )

voidExtensionEventL(TIntaCommandId)

Extension notifies of its events using this method aCommandId command id of the button

ExtensionInterface ( TUid )

IMPORT_C void *ExtensionInterface(TUidaInterface)[protected, virtual]

From CAknControl. For future extensions.

ParameterDescription
aInterfaceThe ID for the extension interface.

FadedComponent ( TInt )

CCoeControl *FadedComponent(TIntaIndex)

FocusChanged ( TDrawNow )

IMPORT_C voidFocusChanged(TDrawNowaDrawNow)[protected, virtual]

From CCoeControl. This function is called whenever a control gains or loses focus.

ParameterDescription
aDrawNowContains the value that was passed to it by SetFocus().

FocusedItem ( )

IMPORT_C TIntFocusedItem()const

Returns command id of focused item.

Since
S60 3.2

Returns: command id of focused item. Returns KErrNotFound if no item is focused.

HandleControlEventL ( CCoeControl *, TCoeEvent )

IMPORT_C voidHandleControlEventL(CCoeControl *aControl,
TCoeEventaEventType
)

From MCoeControlObserver. Handles an event from an observed toolbar item.

ParameterDescription
aControlThe control which sent the event
aEventTypeThe event type

HandlePointerEventL ( const TPointerEvent & )

IMPORT_C voidHandlePointerEventL(const TPointerEvent &aPointerEvent)[virtual]

From CCoeControl. Handles pointer events.

ParameterDescription
aPointerEventThe pointer event.

HandleResourceChange ( TInt )

IMPORT_C voidHandleResourceChange(TIntaType)[virtual]

From CCoeControl. Handles a change to the control's resources.

ParameterDescription
aTypeA message UID value.

HideItem ( const TInt, const TBool, const TBool )

IMPORT_C voidHideItem(const TIntaCommandId,
const TBoolaHide,
const TBoolaDrawNow
)

Hides or unhides a toolbar item.

ParameterDescription
aCommandIdThe command (as defined in an .hrh file) associated with this toolbar item. This identifies the toolbar item, which will be set to hidden or unhidden.
aHideUse ETrue to hide this toolbar item or EFalse to unhide this toolbar item.
aDrawNowShould be ETrue for the toolbar to be redrawn.

HideItemsAndDrawOnlyBackground ( TBool )

IMPORT_C voidHideItemsAndDrawOnlyBackground(TBoolaHide)

Hides/Unhides toolbar items temporarily. When called with ETrue toolbar draws just background in landscape and is hidden in portrait. Calling with EFalse returns the situation to normal, so drawing the items normally in portrait and landscape. Use this method only with fixed toolbar!

ParameterDescription
aHideETrue if hiding items, EFalse if unhiding.

HideItemsAndDrawOnlyBackground ( TBool, TInt )

IMPORT_C voidHideItemsAndDrawOnlyBackground(TBoolaHide,
TIntaPriority
)

Hides/Unhides toolbar items temporarily. When called with ETrue toolbar draws just background in landscape and is hidden in portrait. Toolbar window priority is changed to priority passed in parameter. Priority should be one of the window priority values defined in TCoeWinPriority. Default priority is ECoeWinPriorityLow. Note that if toolbar is already hidden, the toolbar window priority is still changed to priority passed in parameter. Calling the function HideItemsAndDrawOnlyBackground with EFalse returns the situation to normal, so drawing the items normally in portrait and landscape. Use this method only with fixed toolbar!

ParameterDescription
aHideETrue if hiding items, EFalse if unhiding.
aPriorityOrdinal priority of toolbar window.

InputCapabilities ( )

IMPORT_C TCoeInputCapabilitiesInputCapabilities()const [virtual]

From CCoeControl. Gets the control's input capabilities.

Returns: The control's input capabilities.

IsShown ( )

IMPORT_C TBoolIsShown()const

Returns toolbar visibility at this moment

Returns: ETrue, if toolbar is shown.

IsSupportedItemType ( const TInt )

IMPORT_C TBoolIsSupportedItemType(const TIntaType)const

Returns ETrue if the type of the item can be included in the toolbar.

Returns: ETrue for the supported type, otherwise EFalse.

IsToolbarDisabled ( )

IMPORT_C TBoolIsToolbarDisabled()const

Checks if toolbar is disabled.

Since
S60 3.2

Returns: ETrue if toolbar is disabled, EFalse if not

MopSupplyObject ( TTypeUid )

IMPORT_C TTypeUid::PtrMopSupplyObject(TTypeUidaId)[protected]

From CCoeControl. Retrieves an object of the same type as that encapsulated in aId.

ParameterDescription
aIdAn encapsulated object type ID.

Returns: Encapsulated pointer to the object provided. Note that the encapsulated pointer may be NULL.

NewL ( const TInt )

IMPORT_C CAknToolbar *NewL(const TIntaResourceId)[static]

Two-phased constructor.

ParameterDescription
aResourceIdThe ID for this component's resource

Returns: Pointer to the created toolbar object

NewLC ( const TInt )

IMPORT_C CAknToolbar *NewLC(const TIntaResourceId)[static]

Two-phased constructor.

ParameterDescription
aResourceIdThe ID for this component's resource

Returns: Pointer to the created toolbar object

OfferKeyEventL ( const TKeyEvent &, TEventCode )

IMPORT_C TKeyResponseOfferKeyEventL(const TKeyEvent &aKeyEvent,
TEventCodeaType
)[virtual]

From CCoeControl. Handles key events.

ParameterDescription
aKeyEventThe key event
aTypeThe type of key event: EEventKey, EEventKeyUp or EEventKeyDown.

Returns: TKeyResponse Indicates whether or not the key event was used by this control.

PositionChanged ( )

IMPORT_C voidPositionChanged()[virtual]

From CCoeControl. Responds to changes in the position of a toolbar.

PrepareForFocusLossL ( )

voidPrepareForFocusLossL()[virtual]

Takes focus away from edwin or other controls if needed. Called by AknAppUi from HandleWsEventL when a pointer event is targeted to other control than toolbar.

Since
S60 3.2

ProcessCommandL ( TInt )

IMPORT_C voidProcessCommandL(TIntaCommandId)

From MEikCommandObserver. Processes user commands.

ReadyToSlide ( TAny * )

TInt ReadyToSlide(TAny *aThis)[static]

Callback for sliding toolbar.

ReduceRect ( TRect & )

voidReduceRect(TRect &aBoundingRect)const

RemoveItem ( const TInt )

IMPORT_C voidRemoveItem(const TIntaCommandId)

Removes one item from the toolbar.

ParameterDescription
aCommandIdThe ID of the item which should be removed.

SetCloseOnAllCommands ( const TBool )

IMPORT_C voidSetCloseOnAllCommands(const TBoolaClose)

Sets whether the toolbar should be closed after a command is issued from the toolbar. This method affects every command on the toolbar.

ParameterDescription
aCloseETrue, if toolbar should be closed.

SetCloseOnCommand ( const TInt, const TBool )

IMPORT_C voidSetCloseOnCommand(const TIntaCommandId,
const TBoolaClose
)

Sets whether the toolbar should be closed or remain open after the specified command is issued from the toolbar.

ParameterDescription
aCommandIdThe command.
aCloseETrue, if toolbar should be close.

SetDimmed ( TBool )

IMPORT_C voidSetDimmed(TBoolaDimmed)[virtual]

From CCoeControl. Sets toolbar dimmed. Doesn't redraw.

ParameterDescription
aDimmedis ETrue to dim the toolbar, EFalse to set the toolbar as not dimmed

SetEmphasis ( const TBool )

IMPORT_C voidSetEmphasis(const TBoolaEmphasis)

Called by the framework to handle the emphasising or de-emphasising of a toolbar window when it is needed.

ParameterDescription
aEmphasisETrue to emphasize the menu, EFalse otherwise.

SetFocusedItemL ( const TInt )

IMPORT_C voidSetFocusedItemL(const TIntaCommandId)

Moves highlight from one item to another. Leaves with value KErrNotFound if item not found.

Since
S60 3.2
ParameterDescription
aCommandIdcommand id of the item to be focused.

SetInitialFocusedItem ( const TInt )

IMPORT_C voidSetInitialFocusedItem(const TIntaCommandId)

Changes the command ID for the initially focused item when toolbar is shown or gain focus. Notice that, if this item is not visible, then focus will be according default behaviour. Normally, focus will be on the first item, if KAknToolbarMiddleItemFocused flag was not used.

ParameterDescription
aCommandIdThe command ID for the item to get focus.

SetItemDimmed ( const TInt, const TBool, const TBool )

IMPORT_C voidSetItemDimmed(const TIntaCommandId,
const TBoolaDimmed,
const TBoolaDrawNow
)

Dims (greys out) or undims a toolbar item.

ParameterDescription
aCommandIdThe command (as defined in an .hrh file) associated with this toolbar item. This identifies the toolbar item, whose text is to be dimmed or un-dimmed.
aDimmedUse ETrue to dim this toolbar item or EFalse to un-dim this toolbar item.
aDrawNowShould be ETrue for the item to be redrawn.

SetOrientation ( const TAknOrientation )

IMPORT_C voidSetOrientation(const TAknOrientationaOrientation)

Sets toolbar orientation.

Since
3.2
ParameterDescription
aOrientationOrientation that should be used for toolbar.

SetSkinBackgroundId ( const TAknsItemID & )

IMPORT_C voidSetSkinBackgroundId(const TAknsItemID &aIID)

Sets the skin background for fixed toolbar. The new background is used for all the subsequent drawing operations. This method does not itself cause a repaint.

SetSoftkeyResourceIdL ( TInt )

IMPORT_C voidSetSoftkeyResourceIdL(TIntaSoftkeyResourceId)
Sets the resource id for toolbar softkeys. If cba allready exists then changes the existing softkeys and redraws toolbar cba.
Since
S60 3.2
ParameterDescription
aSoftkeyResourceIdID of the resource structure specifying the command buttons.

SetToolbarObserver ( MAknToolbarObserver * )

IMPORT_C voidSetToolbarObserver(MAknToolbarObserver *aObserver)

Sets the observer for the toolbar.

ParameterDescription
aObserverA pointer to the observer. Ownership is not changed.

SetToolbarVisibility ( const TBool )

IMPORT_C voidSetToolbarVisibility(const TBoolaVisible)

Shows or hides toolbar. Position of the top left corner should be set in advance. Toolbar set visible with this method is by default focusing. Does nothing if toolbar is disabled.

ParameterDescription
aVisibleETrue to show it, EFalse to hide it.

SetToolbarVisibility ( const TBool, const TBool )

IMPORT_C voidSetToolbarVisibility(const TBoolaVisible,
const TBoolaFocusing
)

Shows or hides toolbar. Position of the top left corner should be set in advance. This overload of the method allows toolbar to be set non-focusing. Does nothing if toolbar is disabled.

ParameterDescription
aVisibleETrue to show it, EFalse to hide it.
aFocusingETrue to set toolbar focusing, otherwise EFalse.

SetWithSliding ( const TBool )

IMPORT_C voidSetWithSliding(const TBoolaSlide)

Specifies whether toolbar should be shown with sliding effect or not. By default toolbar is shown with sliding.

ParameterDescription
aSlideETrue for sliding effect, EFalse without sliding.

ShowToolbarForBackgroundUpdate ( )

voidShowToolbarForBackgroundUpdate()

Shows toolbar again after it has been hidden for background changing purposes

Since
3.2

SizeChanged ( )

IMPORT_C voidSizeChanged()[protected, virtual]

Reimplemented from CCoeControl::SizeChanged()

From CCoeControl. Responds to size changes to sets the size and position of the contents of this control.

SlideWithIdle ( )

voidSlideWithIdle()

Slide toolbar

ToolbarExtension ( )

IMPORT_C CAknToolbarExtension *ToolbarExtension()const

Returns pointer to toolbar extension if available

Returns: toolbar extension or NULL

ToolbarFlags ( )

IMPORT_C TIntToolbarFlags()const
Returns the flags of toolbar. Flags are defined in eikon.hrh.
Since
S60 3.2

Returns: toolbar flags

ToolbarObserver ( )

IMPORT_C MAknToolbarObserver *ToolbarObserver()

Returns a pointer to the toolbar observer.

Returns: Pointer to the toolbar observer.

ToolbarVisibleIndexByControl ( const CCoeControl * )

TInt ToolbarVisibleIndexByControl(const CCoeControl *aControl)const

Returns the index of the toolbar item inside of the iVisibleItems array.

ParameterDescription
aControlThe control which index is needed.

Returns: Index of the toolbar item.

UpdateBackground ( )

IMPORT_C voidUpdateBackground()
Updates transparent toolbar's background.
Since
3.2