CAknToolbar Class Reference
class CAknToolbar : public CAknControl
|
The class to provide toolbar for the application
eikcoctl.lib
-
Since
-
Series 60 3.1
Public Member Functions
|
|
~CAknToolbar
()
|
IMPORT_C void
|
AddItemL
(
CCoeControl
*, const
TInt
, const
TInt
, const
TInt
)
|
IMPORT_C void
|
AddItemL
(
CCoeControl
*, const
TInt
, const
TInt
, const
TInt
, const
TInt
)
|
IMPORT_C
CCoeControl
*
|
ComponentControl
(
TInt
)
|
IMPORT_C
CCoeControl
*
|
ControlOrNull
(const
TInt
)
|
IMPORT_C
TInt
|
CountComponentControls
()
|
TInt
|
CountFadedComponents
()
|
IMPORT_C void
|
DisableToolbarL
(
TBool
)
|
IMPORT_C void
|
Draw
(
CWindowGc
&, const
CCoeControl
&, const
TRect
&)
|
void
|
DynInitExtensionL
(
CCoeControl
*)
|
IMPORT_C
TInt
|
EventModifiers
()
|
void
|
ExtensionEventL
(
TInt
)
|
CCoeControl
*
|
FadedComponent
(
TInt
)
|
IMPORT_C
TInt
|
FocusedItem
()
|
IMPORT_C void
|
HandleControlEventL
(
CCoeControl
*, TCoeEvent)
|
IMPORT_C void
|
HandlePointerEventL
(const TPointerEvent &)
|
IMPORT_C void
|
HandleResourceChange
(
TInt
)
|
IMPORT_C void
|
HideItem
(const
TInt
, const
TBool
, const
TBool
)
|
IMPORT_C void
|
HideItemsAndDrawOnlyBackground
(
TBool
)
|
IMPORT_C void
|
HideItemsAndDrawOnlyBackground
(
TBool
,
TInt
)
|
IMPORT_C
TCoeInputCapabilities
|
InputCapabilities
()
|
IMPORT_C
TBool
|
IsShown
()
|
IMPORT_C
TBool
|
IsSupportedItemType
(const
TInt
)
|
IMPORT_C
TBool
|
IsToolbarDisabled
()
|
IMPORT_C
CAknToolbar
*
|
NewL
(const
TInt
)
|
IMPORT_C
CAknToolbar
*
|
NewLC
(const
TInt
)
|
IMPORT_C
TKeyResponse
|
OfferKeyEventL
(const
TKeyEvent
&,
TEventCode
)
|
IMPORT_C void
|
PositionChanged
()
|
void
|
PrepareForFocusLossL
()
|
IMPORT_C void
|
ProcessCommandL
(
TInt
)
|
TInt
|
ReadyToSlide
(
TAny
*)
|
void
|
ReduceRect
(
TRect
&)
|
IMPORT_C void
|
RemoveItem
(const
TInt
)
|
IMPORT_C void
|
SetCloseOnAllCommands
(const
TBool
)
|
IMPORT_C void
|
SetCloseOnCommand
(const
TInt
, const
TBool
)
|
IMPORT_C void
|
SetDimmed
(
TBool
)
|
IMPORT_C void
|
SetEmphasis
(const
TBool
)
|
IMPORT_C void
|
SetFocusedItemL
(const
TInt
)
|
IMPORT_C void
|
SetInitialFocusedItem
(const
TInt
)
|
IMPORT_C void
|
SetItemDimmed
(const
TInt
, const
TBool
, const
TBool
)
|
IMPORT_C void
|
SetOrientation
(const
TAknOrientation
)
|
IMPORT_C void
|
SetSkinBackgroundId
(const
TAknsItemID
&)
|
IMPORT_C void
|
SetSoftkeyResourceIdL
(
TInt
)
|
IMPORT_C void
|
SetToolbarObserver
(
MAknToolbarObserver
*)
|
IMPORT_C void
|
SetToolbarVisibility
(const
TBool
)
|
IMPORT_C void
|
SetToolbarVisibility
(const
TBool
, const
TBool
)
|
IMPORT_C void
|
SetWithSliding
(const
TBool
)
|
void
|
ShowToolbarForBackgroundUpdate
()
|
void
|
SlideWithIdle
()
|
IMPORT_C CAknToolbarExtension *
|
ToolbarExtension
()
|
IMPORT_C
TInt
|
ToolbarFlags
()
|
IMPORT_C
MAknToolbarObserver
*
|
ToolbarObserver
()
|
TInt
|
ToolbarVisibleIndexByControl
(const
CCoeControl
*)
|
IMPORT_C void
|
UpdateBackground
()
|
Private Member Functions
|
|
CAknToolbar
()
|
void
|
AdjustAllButtons
()
|
void
|
AdjustButton
(
CAknButton
&)
|
TRect
|
CalculateControlRect
(
TRect
&)
|
void
|
CalculateRects
(
TRect
&,
TRect
&,
TRect
&,
TRect
&)
|
TRect
|
CalculateSizeAndPosition
()
|
void
|
CheckFixedToolbarButtonsL
()
|
void
|
CheckHitAreas
()
|
CAknToolbarItem *
|
ConstructControlLC
(
TResourceReader
&)
|
IMPORT_C void
|
ConstructFromResourceL
(
TResourceReader
&)
|
void
|
ConstructFromResourceL
(const
TInt
)
|
void
|
ConstructL
()
|
IMPORT_C void
|
Draw
(const
TRect
&)
|
void
|
DrawFixedBackgroundL
(
CWindowGc
&, const
CCoeControl
&, const
TRect
&)
|
void
|
FadeBehindPopup
(
TBool
)
|
TInt
|
GetNextSelectableItemIndex
(
TInt
,
TBool
)
|
void
|
HideToolbarForBackgroundUpdate
()
|
void
|
HideToolbarL
()
|
void
|
InitFocusedItemL
(const
TBool
)
|
void
|
MoveHighlightL
(
TInt
, const
TBool
, const
TBool
, const
TBool
)
|
TRect
|
RectFromLayout
(const
TRect
&, const
TAknWindowComponentLayout
&)
|
void
|
SelectItemL
(const
TInt
, const
TBool
)
|
void
|
SetOrdinalPositions
()
|
void
|
SetRightCbaTextL
()
|
void
|
SetShown
(const
TBool
)
|
TInt
|
ShowDelayedToolbar
(
TAny
*)
|
void
|
ShowToolbarL
()
|
void
|
ShowViaIdle
()
|
void
|
SlideToolbar
(const
TPoint
&)
|
TBool
|
TooFewItemsVisible
()
|
CAknToolbarItem *
|
ToolbarItemByControl
(const
CCoeControl
*)
|
CAknToolbarItem *
|
ToolbarItemById
(const
TInt
)
|
TInt
|
ToolbarItemIndexByControl
(const
CCoeControl
*)
|
TInt
|
ToolbarItemIndexById
(const
TInt
)
|
TInt
|
ToolbarVisibleIndexById
(const
TInt
)
|
void
|
UpdateControlPositions
()
|
void
|
UpdateControlVisibility
()
|
void
|
UpdateItemTooltipPosition
()
|
TInt
|
WaitForScreenSwitch
(
TAny
*)
|
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::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()
|
Constructor & Destructor Documentation
CAknToolbar()
CAknToolbar
|
(
|
)
|
[private]
|
Member Functions Documentation
AddItemL(CCoeControl *, const TInt, const TInt, const TInt)
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()
).
Parameters
CCoeControl
* aItem
|
The control.
|
const
TInt
aType
|
The type of the new toolbar item.
|
const
TInt
aCommandId
|
The command ID for this item.
|
const
TInt
aFlags
|
The flags.
|
AddItemL(CCoeControl *, const TInt, const TInt, const TInt, const TInt)
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()
).
Parameters
CCoeControl
* aItem
|
The control.
|
const
TInt
aType
|
The type of the new toolbar item.
|
const
TInt
aCommandId
|
The command ID for this item.
|
const
TInt
aFlags
|
The flags.
|
const
TInt
aIndex
|
The index in array at which item should be added.
|
AdjustAllButtons()
void
|
AdjustAllButtons
|
(
|
)
|
[private]
|
Adjusts all buttons' properties depending on the toolbar's features.
AdjustButton(CAknButton &)
void
|
AdjustButton
|
(
|
CAknButton
&
|
aButton
|
)
|
[private]
|
Adjusts button's properties depending on the toolbar's features.
CalculateControlRect(TRect &)
TRect
|
CalculateControlRect
|
(
|
TRect
&
|
aCurrentCellPaneRect
|
)
|
[private]
|
Calculates the position and size of the control rect
Parameters
TRect
& aCurrentCellPaneRect
|
current cell pane rect is needed to get correct control rect from layout data.
|
CalculateRects(TRect &, TRect &, TRect &, TRect &)
void
|
CalculateRects
|
(
|
TRect
&
|
aMainPaneRect,
|
|
TRect
&
|
aToolbarRect,
|
|
TRect
&
|
aGridPaneRect,
|
|
TRect
&
|
aCellPaneRect
|
|
)
|
[private]
|
Calculates rects that are used in calculating the size and position of the toolbar items
Parameters
TRect
& aMainPaneRect
|
main pane rect
|
TRect
& aToolbarRect
|
rect for toolbar
|
TRect
& aGridPaneRect
|
rect for grid pane
|
TRect
& aCellPaneRect
|
rect for cell pane
|
CalculateSizeAndPosition()
TRect
|
CalculateSizeAndPosition
|
(
|
)
|
[private]
|
Calculates size and position of the toolbar depending on the number and size of the toolbar items.
CheckFixedToolbarButtonsL()
void
|
CheckFixedToolbarButtonsL
|
(
|
)
|
[private]
|
Counts buttons of fixed tool bar and adds button(s) if needed There has to bee at leas three buttons in fixed toolbar.
CheckHitAreas()
void
|
CheckHitAreas
|
(
|
)
|
[private]
|
Sets buttons to check their touchable areas when tapped
ComponentControl(TInt)
From
CCoeControl
. Gets the specified component of a compound control.
Parameters
TInt
aIndex
|
The index of the control to get
|
ConstructControlLC(TResourceReader &)
CAknToolbarItem *
|
ConstructControlLC
|
(
|
TResourceReader
&
|
aReader
|
)
|
[private]
|
Constructs one of the toolbar items.
Parameters
TResourceReader
& aReader
|
The resource reader with which to access the control's resource values.
|
ConstructFromResourceL(TResourceReader &)
IMPORT_C void
|
ConstructFromResourceL
|
(
|
TResourceReader
&
|
aReader
|
)
|
[private, virtual]
|
From
CCoeControl
. Constructs controls from a resource file. Hides the one defined in base class.
Parameters
TResourceReader
& aReader
|
The resource reader with which to access the control's resource values.
|
ConstructFromResourceL(const TInt)
void
|
ConstructFromResourceL
|
(
|
const
TInt
|
aResourceId
|
)
|
[private]
|
Constructs controls from a resource file.
Parameters
const
TInt
aResourceId
|
The ID for this component's resource.
|
ConstructL()
void
|
ConstructL
|
(
|
)
|
[private]
|
Symbian 2nd phase constructor.
ControlOrNull(const TInt)
Gets a pointer to the specified control.
Parameters
const
TInt
aControlId
|
The ID of the control for which a pointer is required.
|
CountComponentControls()
IMPORT_C
TInt
|
CountComponentControls
|
(
|
)
|
const [virtual]
|
From
CCoeControl
. Gets the number of controls contained in a compound control.
CountFadedComponents()
TInt
|
CountFadedComponents
|
(
|
)
|
|
DisableToolbarL(TBool)
IMPORT_C void
|
DisableToolbarL
|
(
|
TBool
|
aDisable
|
)
|
|
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.
Parameters
TBool
aDisable
|
ETrue if toolbar should be disabled
|
Draw(CWindowGc &, const CCoeControl &, const TRect &)
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.
Parameters
CWindowGc
& aGc
|
Graphics context used for drawing.
|
const
CCoeControl
& aControl
|
The control being drawn (may be a child of the drawer).
|
const
TRect
& aRect
|
The area to be redrawn.
|
Draw(const TRect &)
IMPORT_C void
|
Draw
|
(
|
const
TRect
&
|
aRect
|
)
|
const [private, virtual]
|
From
CCoeControl
. Draw a control called by window server.
Parameters
const
TRect
& aRect
|
The region of the control to be redrawn. Co-ordinates are relative to the control's origin (top left corner).
|
DrawFixedBackgroundL(CWindowGc &, const CCoeControl &, const TRect &)
Draws backgrounds of fixed toolbar
Parameters
CWindowGc
& aGc
|
Graphics context used for drawing.
|
const
CCoeControl
& aControl
|
The control being drawn (may be a child of the drawer).
|
const
TRect
& aRect
|
The area to be drawn.
|
DynInitExtensionL(CCoeControl *)
Calls DynInitToolbar with extensions commmand id
EventModifiers()
IMPORT_C
TInt
|
EventModifiers
|
(
|
)
|
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.
ExtensionEventL(TInt)
void
|
ExtensionEventL
|
(
|
TInt
|
aCommandId
|
)
|
|
Extension notifies of its events using this method aCommandId command id of the button
ExtensionInterface(TUid)
IMPORT_C void *
|
ExtensionInterface
|
(
|
TUid
|
aInterface
|
)
|
[protected, virtual]
|
Parameters
TUid
aInterface
|
The ID for the extension interface.
|
FadeBehindPopup(TBool)
void
|
FadeBehindPopup
|
(
|
TBool
|
aFade
|
)
|
[private]
|
Parameters
TBool
aFade
|
if ETrue then fade
|
FocusChanged(TDrawNow)
IMPORT_C void
|
FocusChanged
|
(
|
TDrawNow
|
aDrawNow
|
)
|
[protected, virtual]
|
From
CCoeControl
. This function is called whenever a control gains or loses focus.
Parameters
TDrawNow
aDrawNow
|
Contains the value that was passed to it by SetFocus().
|
FocusedItem()
IMPORT_C
TInt
|
FocusedItem
|
(
|
)
|
const
|
Returns command id of focused item.
GetNextSelectableItemIndex(TInt, TBool)
TInt
|
GetNextSelectableItemIndex
|
(
|
TInt
|
aStartIndex,
|
|
TBool
|
aMoveForward
|
|
)
|
[private]
|
Returns next non-dimmed and non-hidden control index.
Parameters
TInt
aStartIndex
|
The index of the item from which the search should be started.
|
TBool
aMoveForward
|
ETrue if search is done from lower index to the higher one.
|
HandleControlEventL(CCoeControl *, TCoeEvent)
IMPORT_C void
|
HandleControlEventL
|
(
|
CCoeControl
*
|
aControl,
|
|
TCoeEvent
|
aEventType
|
|
)
|
|
Parameters
CCoeControl
* aControl
|
The control which sent the event
|
TCoeEvent aEventType
|
The event type
|
HandlePointerEventL(const TPointerEvent &)
IMPORT_C void
|
HandlePointerEventL
|
(
|
const TPointerEvent &
|
aPointerEvent
|
)
|
[virtual]
|
Parameters
const TPointerEvent & aPointerEvent
|
The pointer event.
|
HandleResourceChange(TInt)
IMPORT_C void
|
HandleResourceChange
|
(
|
TInt
|
aType
|
)
|
[virtual]
|
From
CCoeControl
. Handles a change to the control's resources.
Parameters
TInt
aType
|
A message UID value.
|
HideItem(const TInt, const TBool, const TBool)
IMPORT_C void
|
HideItem
|
(
|
const
TInt
|
aCommandId,
|
|
const
TBool
|
aHide,
|
|
const
TBool
|
aDrawNow
|
|
)
|
|
Hides or unhides a toolbar item.
Parameters
const
TInt
aCommandId
|
The 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.
|
const
TBool
aHide
|
Use ETrue to hide this toolbar item or EFalse to unhide this toolbar item.
|
const
TBool
aDrawNow
|
Should be ETrue for the toolbar to be redrawn.
|
HideItemsAndDrawOnlyBackground(TBool)
IMPORT_C void
|
HideItemsAndDrawOnlyBackground
|
(
|
TBool
|
aHide
|
)
|
|
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!
Parameters
TBool
aHide
|
ETrue if hiding items, EFalse if unhiding.
|
HideItemsAndDrawOnlyBackground(TBool, TInt)
IMPORT_C void
|
HideItemsAndDrawOnlyBackground
|
(
|
TBool
|
aHide,
|
|
TInt
|
aPriority
|
|
)
|
|
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!
Parameters
TBool
aHide
|
ETrue if hiding items, EFalse if unhiding.
|
TInt
aPriority
|
Ordinal priority of toolbar window.
|
HideToolbarForBackgroundUpdate()
void
|
HideToolbarForBackgroundUpdate
|
(
|
)
|
[private]
|
Hides toolbar so that screen capture can be taken from the background in order to update it.
HideToolbarL()
void
|
HideToolbarL
|
(
|
)
|
[private]
|
InitFocusedItemL(const TBool)
void
|
InitFocusedItemL
|
(
|
const
TBool
|
aDrawNow
|
)
|
[private]
|
Sets the focus to the middle or the first item, depending on the toolbar flags.
Parameters
const
TBool
aDrawNow
|
if the newly focused item should be redrawn.
|
InputCapabilities()
From
CCoeControl
. Gets the control's input capabilities.
IsShown()
IMPORT_C
TBool
|
IsShown
|
(
|
)
|
const
|
Returns toolbar visibility at this moment
IsSupportedItemType(const TInt)
IMPORT_C
TBool
|
IsSupportedItemType
|
(
|
const
TInt
|
aType
|
)
|
const
|
Returns ETrue if the type of the item can be included in the toolbar.
IsToolbarDisabled()
IMPORT_C
TBool
|
IsToolbarDisabled
|
(
|
)
|
const
|
Checks if toolbar is disabled.
MopSupplyObject(TTypeUid)
From
CCoeControl
. Retrieves an object of the same type as that encapsulated in aId.
Parameters
TTypeUid
aId
|
An encapsulated object type ID.
|
MoveHighlightL(TInt, const TBool, const TBool, const TBool)
void
|
MoveHighlightL
|
(
|
TInt
|
aItemIndex,
|
|
const
TBool
|
aDrawNow,
|
|
const
TBool
|
aMoveForward = ETrue,
|
|
const
TBool
|
aPrepareControl = ETrue
|
|
)
|
[private]
|
Moves highlight from one item to another. It also will change softkey text for the focused toolbar.
Parameters
TInt
aItemIndex
|
The index for the newly focused item.
|
const
TBool
aDrawNow
|
Specifies whether the item should be redrawn.
|
const
TBool
aMoveForward = ETrue
|
Specifies whether the next item in the array should be selected when the item with aItemIndex is dimmed.
|
const
TBool
aPrepareControl = ETrue
|
Specifies whether PrepareForFocusLossL() or PrepareForFocusGainL() functions should be called.
|
NewL(const TInt)
Parameters
const
TInt
aResourceId
|
The ID for this component's resource
|
NewLC(const TInt)
Parameters
const
TInt
aResourceId
|
The ID for this component's resource
|
OfferKeyEventL(const TKeyEvent &, TEventCode)
Parameters
const
TKeyEvent
& aKeyEvent
|
The key event
|
TEventCode
aType
|
The type of key event: EEventKey, EEventKeyUp or EEventKeyDown.
|
PositionChanged()
IMPORT_C void
|
PositionChanged
|
(
|
)
|
[virtual]
|
From
CCoeControl
. Responds to changes in the position of a toolbar.
PrepareForFocusLossL()
void
|
PrepareForFocusLossL
|
(
|
)
|
[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.
ProcessCommandL(TInt)
IMPORT_C void
|
ProcessCommandL
|
(
|
TInt
|
aCommandId
|
)
|
|
ReadyToSlide(TAny *)
TInt
|
ReadyToSlide
|
(
|
TAny
*
|
aThis
|
)
|
[static]
|
Callback for sliding toolbar.
RectFromLayout(const TRect &, const TAknWindowComponentLayout &)
Gets rect from layout data.
ReduceRect(TRect &)
void
|
ReduceRect
|
(
|
TRect
&
|
aBoundingRect
|
)
|
const
|
RemoveItem(const TInt)
IMPORT_C void
|
RemoveItem
|
(
|
const
TInt
|
aCommandId
|
)
|
|
Removes one item from the toolbar.
Parameters
const
TInt
aCommandId
|
The ID of the item which should be removed.
|
SelectItemL(const TInt, const TBool)
void
|
SelectItemL
|
(
|
const
TInt
|
aIndex,
|
|
const
TBool
|
aSelect
|
|
)
|
[private]
|
Selects/deselects the toolbar item at given index.
SetCloseOnAllCommands(const TBool)
IMPORT_C void
|
SetCloseOnAllCommands
|
(
|
const
TBool
|
aClose
|
)
|
|
Sets whether the toolbar should be closed after a command is issued from the toolbar. This method affects every command on the toolbar.
Parameters
const
TBool
aClose
|
ETrue, if toolbar should be closed.
|
SetCloseOnCommand(const TInt, const TBool)
IMPORT_C void
|
SetCloseOnCommand
|
(
|
const
TInt
|
aCommandId,
|
|
const
TBool
|
aClose
|
|
)
|
|
Sets whether the toolbar should be closed or remain open after the specified command is issued from the toolbar.
Parameters
const
TInt
aCommandId
|
The command.
|
const
TBool
aClose
|
ETrue, if toolbar should be close.
|
SetDimmed(TBool)
IMPORT_C void
|
SetDimmed
|
(
|
TBool
|
aDimmed
|
)
|
[virtual]
|
From
CCoeControl
. Sets toolbar dimmed. Doesn't redraw.
Parameters
TBool
aDimmed
|
is ETrue to dim the toolbar, EFalse to set the toolbar as not dimmed
|
SetEmphasis(const TBool)
IMPORT_C void
|
SetEmphasis
|
(
|
const
TBool
|
aEmphasis
|
)
|
|
Called by the framework to handle the emphasising or de-emphasising of a toolbar window when it is needed.
Parameters
const
TBool
aEmphasis
|
ETrue to emphasize the menu, EFalse otherwise.
|
SetFocusedItemL(const TInt)
IMPORT_C void
|
SetFocusedItemL
|
(
|
const
TInt
|
aCommandId
|
)
|
|
Moves highlight from one item to another. Leaves with value KErrNotFound if item not found.
Parameters
const
TInt
aCommandId
|
command id of the item to be focused.
|
SetInitialFocusedItem(const TInt)
IMPORT_C void
|
SetInitialFocusedItem
|
(
|
const
TInt
|
aCommandId
|
)
|
|
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.
Parameters
const
TInt
aCommandId
|
The command ID for the item to get focus.
|
SetItemDimmed(const TInt, const TBool, const TBool)
IMPORT_C void
|
SetItemDimmed
|
(
|
const
TInt
|
aCommandId,
|
|
const
TBool
|
aDimmed,
|
|
const
TBool
|
aDrawNow
|
|
)
|
|
Dims (greys out) or undims a toolbar item.
Parameters
const
TInt
aCommandId
|
The 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.
|
const
TBool
aDimmed
|
Use ETrue to dim this toolbar item or EFalse to un-dim this toolbar item.
|
const
TBool
aDrawNow
|
Should be ETrue for the item to be redrawn.
|
SetOrdinalPositions()
void
|
SetOrdinalPositions
|
(
|
)
|
const [private]
|
Adjusts toolbar's and overlying dialog's window positions so that dialog is displayed on top of the toolbar.
SetOrientation(const TAknOrientation)
Sets toolbar orientation.
Parameters
const
TAknOrientation
aOrientation
|
Orientation that should be used for toolbar.
|
SetRightCbaTextL()
void
|
SetRightCbaTextL
|
(
|
)
|
[private]
|
Changes CBA text if all items are dimmed.
SetShown(const TBool)
void
|
SetShown
|
(
|
const
TBool
|
aShown
|
)
|
[private]
|
SetSkinBackgroundId(const TAknsItemID &)
IMPORT_C void
|
SetSkinBackgroundId
|
(
|
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 void
|
SetSoftkeyResourceIdL
|
(
|
TInt
|
aSoftkeyResourceId
|
)
|
|
Sets the resource id for toolbar softkeys. If cba allready exists then changes the existing softkeys and redraws toolbar cba.
-
Since
-
S60 3.2
Parameters
TInt
aSoftkeyResourceId
|
ID of the resource structure specifying the command buttons.
|
SetToolbarObserver(MAknToolbarObserver *)
Sets the observer for the toolbar.
SetToolbarVisibility(const TBool)
IMPORT_C void
|
SetToolbarVisibility
|
(
|
const
TBool
|
aVisible
|
)
|
|
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.
Parameters
const
TBool
aVisible
|
ETrue to show it, EFalse to hide it.
|
SetToolbarVisibility(const TBool, const TBool)
IMPORT_C void
|
SetToolbarVisibility
|
(
|
const
TBool
|
aVisible,
|
|
const
TBool
|
aFocusing
|
|
)
|
|
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.
Parameters
const
TBool
aVisible
|
ETrue to show it, EFalse to hide it.
|
const
TBool
aFocusing
|
ETrue to set toolbar focusing, otherwise EFalse.
|
SetWithSliding(const TBool)
IMPORT_C void
|
SetWithSliding
|
(
|
const
TBool
|
aSlide
|
)
|
|
Specifies whether toolbar should be shown with sliding effect or not. By default toolbar is shown with sliding.
Parameters
const
TBool
aSlide
|
ETrue for sliding effect, EFalse without sliding.
|
ShowDelayedToolbar(TAny *)
TInt
|
ShowDelayedToolbar
|
(
|
TAny
*
|
aThis
|
)
|
[private, static]
|
Callback for delayed toolbar showing.
ShowToolbarForBackgroundUpdate()
void
|
ShowToolbarForBackgroundUpdate
|
(
|
)
|
|
Shows toolbar again after it has been hidden for background changing purposes
ShowToolbarL()
void
|
ShowToolbarL
|
(
|
)
|
[private]
|
Makes toolbar visible and activates it. Position of the top left corner should be set in advance. Also use
SetFocus()
to specify whether toolbar gets key events or not.
ShowViaIdle()
void
|
ShowViaIdle
|
(
|
)
|
[private]
|
Shows toolbar via
CIdle
. As a result, toolbar's window priority is setted after the application's container window. This places toolbar to the right place in the window tree.
SizeChanged()
IMPORT_C void
|
SizeChanged
|
(
|
)
|
[protected, virtual]
|
From
CCoeControl
. Responds to size changes to sets the size and position of the contents of this control.
SlideToolbar(const TPoint &)
void
|
SlideToolbar
|
(
|
const
TPoint
&
|
aEndPos
|
)
|
[private]
|
Draws toolbar with sliding effect.
Parameters
const
TPoint
& aEndPos
|
The position of the top left corner of toolbar at the end of animation.
|
TooFewItemsVisible()
TBool
|
TooFewItemsVisible
|
(
|
)
|
[private]
|
Checks the number of visible items, and if too few the toolbar CBA is deleted. If last time there were too few items then toolbar CBA is created again. Also the ordinal position of the toolbar is set if there are changes to previous situation.
ToolbarExtension()
IMPORT_C CAknToolbarExtension *
|
ToolbarExtension
|
(
|
)
|
const
|
Returns pointer to toolbar extension if available
ToolbarFlags()
IMPORT_C
TInt
|
ToolbarFlags
|
(
|
)
|
const
|
Returns the flags of toolbar. Flags are defined in eikon.hrh.
-
Since
-
S60 3.2
ToolbarItemByControl(const CCoeControl *)
CAknToolbarItem *
|
ToolbarItemByControl
|
(
|
const
CCoeControl
*
|
aControl
|
)
|
const [private]
|
Returns toolbar item object for the specified control.
ToolbarItemById(const TInt)
CAknToolbarItem *
|
ToolbarItemById
|
(
|
const
TInt
|
aId
|
)
|
const [private]
|
Returns toolbar item object for the specified command ID.
Parameters
const
TInt
aId
|
The command ID of the item.
|
ToolbarItemIndexByControl(const CCoeControl *)
TInt
|
ToolbarItemIndexByControl
|
(
|
const
CCoeControl
*
|
aControl
|
)
|
const [private]
|
Returns the index of the toolbar item inside of the iItems array.
Parameters
const
CCoeControl
* aControl
|
The control which index is needed.
|
ToolbarItemIndexById(const TInt)
TInt
|
ToolbarItemIndexById
|
(
|
const
TInt
|
aId
|
)
|
const [private]
|
Returns the index of the toolbar item inside of the iItems array.
Parameters
const
TInt
aId
|
The command ID of the item
|
ToolbarObserver()
Returns a pointer to the toolbar observer.
ToolbarVisibleIndexByControl(const CCoeControl *)
Returns the index of the toolbar item inside of the iVisibleItems array.
Parameters
const
CCoeControl
* aControl
|
The control which index is needed.
|
ToolbarVisibleIndexById(const TInt)
TInt
|
ToolbarVisibleIndexById
|
(
|
const
TInt
|
aId
|
)
|
const [private]
|
Returns the index of the toolbar item inside of the iVisibleItems array.
Parameters
const
TInt
aId
|
The command ID of the item.
|
UpdateBackground()
IMPORT_C void
|
UpdateBackground
|
(
|
)
|
|
Updates transparent toolbar's background.
-
Since
-
3.2
UpdateControlPositions()
void
|
UpdateControlPositions
|
(
|
)
|
[private]
|
Updates control positions so that tooltips are positioned correctly
UpdateControlVisibility()
void
|
UpdateControlVisibility
|
(
|
)
|
[private]
|
Updates control visibility based on toolbar visibility and buttons visibility inside toolbar.
UpdateItemTooltipPosition()
void
|
UpdateItemTooltipPosition
|
(
|
)
|
[private]
|
WaitForScreenSwitch(TAny *)
TInt
|
WaitForScreenSwitch
|
(
|
TAny
*
|
aThis
|
)
|
[private, static]
|
Callback to get notified when ready to show toolbar again
Member Enumerations Documentation
Enum TEventModifiers
Enumerators
ELongPress = 1
|
|
ELongPressEnded = 2
|
|
Member Data Documentation
CAknsBasicBackgroundControlContext * iBgContext
CAknsBasicBackgroundControlContext *
|
iBgContext
|
[private]
|
TInt
iDrawingPriority
TInt
|
iDrawingPriority
|
[private]
|
TInt
iEventModifiers
TInt
|
iEventModifiers
|
[private]
|
TInt
iFocusedItem
TInt
|
iFocusedItem
|
[private]
|
CAknsFrameBackgroundControlContext * iFrameContext
CAknsFrameBackgroundControlContext *
|
iFrameContext
|
[private]
|
CFbsBitmap * iHighlightBitmap
CFbsBitmap * iHighlightMask
TInt
iInitialFocusedItem
TInt
|
iInitialFocusedItem
|
[private]
|
RPointerArray< CAknToolbarItem > iItems
TInt
iLastFocusedItem
TInt
|
iLastFocusedItem
|
[private]
|
TAknOrientation
iOrientation
TInt
iPreviousItem
TInt
|
iPreviousItem
|
[private]
|
TInt
iSelectedItem
TInt
|
iSelectedItem
|
[private]
|
TInt
iSoftkeyResource
TInt
|
iSoftkeyResource
|
[private]
|
CEikButtonGroupContainer * iToolbarCba
CEikButtonGroupContainer *
|
iToolbarCba
|
[private]
|
MAknToolbarObserver * iToolbarObserver
TInt
iToolbarResourceId
TInt
|
iToolbarResourceId
|
[private]
|
RPointerArray< CAknToolbarItem > iVisibleItems
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.