Link against: eikcoctl.lib
#include <AknToolbar.h>
Inherits CAknControl, and MAknFadedComponent.
Public Types | |
enum | TEventModifiers { ELongPress = 1, ELongPressEnded = 2 } |
Public Member Functions | |
~CAknToolbar () | |
Destructor. | |
IMPORT_C TInt | CountComponentControls () const |
From CCoeControl. | |
IMPORT_C CCoeControl * | ComponentControl (TInt aIndex) const |
From CCoeControl. | |
IMPORT_C void | HandlePointerEventL (const TPointerEvent &aPointerEvent) |
From CCoeControl. | |
IMPORT_C void | HandleResourceChange (TInt aType) |
From CCoeControl. | |
IMPORT_C void | HandleControlEventL (CCoeControl *aControl, TCoeEvent aEventType) |
From MCoeControlObserver. | |
IMPORT_C void | PositionChanged () |
From CCoeControl. | |
IMPORT_C void | ProcessCommandL (TInt aCommandId) |
From MEikCommandObserver. | |
IMPORT_C void | SetDimmed (TBool aDimmed) |
From CCoeControl. | |
IMPORT_C TKeyResponse | OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType) |
From CCoeControl. | |
IMPORT_C TCoeInputCapabilities | InputCapabilities () const |
From CCoeControl. | |
IMPORT_C void | Draw (CWindowGc &aGc, const CCoeControl &aControl, const TRect &aRect) const |
From MCoeControlBackground. | |
IMPORT_C CCoeControl * | ControlOrNull (const TInt aControlId) const |
Gets a pointer to the specified control. | |
IMPORT_C void | SetToolbarVisibility (const TBool aVisible) |
Shows or hides toolbar. | |
IMPORT_C void | SetToolbarVisibility (const TBool aVisible, const TBool aFocusing) |
Shows or hides toolbar. | |
IMPORT_C void | SetItemDimmed (const TInt aCommandId, const TBool aDimmed, const TBool aDrawNow) |
Dims (greys out) or undims a toolbar item. | |
IMPORT_C void | HideItem (const TInt aCommandId, const TBool aHide, const TBool aDrawNow) |
Hides or unhides a toolbar item. | |
IMPORT_C void | SetToolbarObserver (MAknToolbarObserver *aObserver) |
Sets the observer for the toolbar. | |
IMPORT_C MAknToolbarObserver * | ToolbarObserver () |
Returns a pointer to the toolbar observer. | |
IMPORT_C void | AddItemL (CCoeControl *aItem, const TInt aType, const TInt aCommandId, const TInt aFlags) |
Adds one item to the end of the toolbar. | |
IMPORT_C void | AddItemL (CCoeControl *aItem, const TInt aType, const TInt aCommandId, const TInt aFlags, const TInt aIndex) |
Adds one item to the specified place. | |
IMPORT_C void | RemoveItem (const TInt aCommandId) |
Removes one item from the toolbar. | |
IMPORT_C TBool | IsSupportedItemType (const TInt aType) const |
Returns ETrue if the type of the item can be included in the toolbar. | |
IMPORT_C void | SetInitialFocusedItem (const TInt aCommandId) |
Changes the command ID for the initially focused item when toolbar is shown or gain focus. | |
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. | |
IMPORT_C TBool | IsShown () const |
Returns toolbar visibility at this moment. | |
IMPORT_C void | SetWithSliding (const TBool aSlide) |
Specifies whether toolbar should be shown with sliding effect or not. | |
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. | |
IMPORT_C void | SetCloseOnAllCommands (const TBool aClose) |
Sets whether the toolbar should be closed after a command is issued from the toolbar. | |
IMPORT_C void | SetOrientation (const TAknOrientation aOrientation) |
Sets toolbar orientation. | |
IMPORT_C void | UpdateBackground () |
Updates transparent toolbar's background. | |
void | ShowToolbarForBackgroundUpdate () |
Shows toolbar again after it has been hidden for background changing purposes. | |
IMPORT_C void | DisableToolbarL (TBool aDisable) |
Disables/Enables toolbar so that it cannot/can be activated from e.g. | |
IMPORT_C TBool | IsToolbarDisabled () const |
Checks if toolbar is disabled. | |
IMPORT_C void | SetFocusedItemL (const TInt aCommandId) |
Moves highlight from one item to another. | |
IMPORT_C TInt | FocusedItem () const |
Returns command id of focused item. | |
void | PrepareForFocusLossL () |
Takes focus away from edwin or other controls if needed. | |
IMPORT_C TInt | EventModifiers () const |
Returns event modifiers defined in TEventModifiers in this header. | |
IMPORT_C TInt | ToolbarFlags () const |
Returns the flags of toolbar. | |
TInt | CountFadedComponents () |
CountFadedComponents() returns number of items in the array. | |
CCoeControl * | FadedComponent (TInt aIndex) |
FadedComponent() returns specific controls from the array based on index. | |
void | ReduceRect (TRect &aBoundingRect) const |
IMPORT_C void | SetSoftkeyResourceIdL (TInt aSoftkeyResourceId) |
Sets the resource id for toolbar softkeys. | |
void | ExtensionEventL (TInt aCommandId) |
Extension notifies of its events using this method aCommandId command id of the button. | |
TInt | ToolbarVisibleIndexByControl (const CCoeControl *aControl) const |
Returns the index of the toolbar item inside of the iVisibleItems array. | |
IMPORT_C CAknToolbarExtension * | ToolbarExtension () const |
Returns pointer to toolbar extension if available. | |
void | DynInitExtensionL (CCoeControl *aControl) |
Calls DynInitToolbar with extensions commmand id. | |
void | SlideWithIdle () |
Slide toolbar. | |
IMPORT_C void | HideItemsAndDrawOnlyBackground (TBool aHide) |
Hides/Unhides toolbar items temporarily. | |
IMPORT_C void | HideItemsAndDrawOnlyBackground (TBool aHide, TInt aPriority) |
Hides/Unhides toolbar items temporarily. | |
Static Public Member Functions | |
static IMPORT_C CAknToolbar * | NewL (const TInt aResourceId) |
Two-phased constructor. | |
static IMPORT_C CAknToolbar * | NewLC (const TInt aResourceId) |
Two-phased constructor. | |
static TInt | ReadyToSlide (TAny *aThis) |
Callback for sliding toolbar. | |
Protected Member Functions | |
IMPORT_C void | SizeChanged () |
From CCoeControl. | |
IMPORT_C void | FocusChanged (TDrawNow aDrawNow) |
From CCoeControl. | |
IMPORT_C void * | ExtensionInterface (TUid aInterface) |
From CAknControl. | |
IMPORT_C TTypeUid::Ptr | MopSupplyObject (TTypeUid aId) |
From CCoeControl. |
|
|
Destructor. |
|
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()).
|
|
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()).
|
|
From CCoeControl. Gets the specified component of a compound control.
|
|
Gets a pointer to the specified control.
|
|
From CCoeControl. Gets the number of controls contained in a compound control.
|
|
CountFadedComponents() returns number of items in the array. Reimplemented from MAknFadedComponent. |
|
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.
|
|
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.
|
|
Calls DynInitToolbar with extensions commmand id. |
|
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.
|
|
Extension notifies of its events using this method aCommandId command id of the button. |
|
From CAknControl. For future extensions.
Reimplemented from CAknControl. |
|
FadedComponent() returns specific controls from the array based on index. Reimplemented from MAknFadedComponent. |
|
From CCoeControl. This function is called whenever a control gains or loses focus.
|
|
Returns command id of focused item.
|
|
From MCoeControlObserver. Handles an event from an observed toolbar item.
|
|
From CCoeControl. Handles pointer events.
|
|
From CCoeControl. Handles a change to the control's resources.
|
|
Hides or unhides a toolbar item.
|
|
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!
|
|
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!
|
|
From CCoeControl. Gets the control's input capabilities.
|
|
Returns toolbar visibility at this moment.
|
|
Returns ETrue if the type of the item can be included in the toolbar.
|
|
Checks if toolbar is disabled.
|
|
From CCoeControl. Retrieves an object of the same type as that encapsulated in aId.
|
|
Two-phased constructor.
|
|
Two-phased constructor.
|
|
From CCoeControl. Handles key events.
|
|
From CCoeControl. Responds to changes in the position of a toolbar. |
|
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.
|
|
From MEikCommandObserver. Processes user commands.
|
|
Callback for sliding toolbar. |
|
|
Removes one item from the toolbar.
|
|
Sets whether the toolbar should be closed after a command is issued from the toolbar. This method affects every command on the toolbar.
|
|
Sets whether the toolbar should be closed or remain open after the specified command is issued from the toolbar.
|
|
From CCoeControl. Sets toolbar dimmed. Doesn't redraw.
|
|
Called by the framework to handle the emphasising or de-emphasising of a toolbar window when it is needed.
|
|
Moves highlight from one item to another. Leaves with value KErrNotFound if item not found.
|
|
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.
|
|
Dims (greys out) or undims a toolbar item.
|
|
Sets toolbar orientation.
|
|
Sets the resource id for toolbar softkeys. If cba allready exists then changes the existing softkeys and redraws toolbar cba.
|
|
Sets the observer for the toolbar.
|
|
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.
|
|
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.
|
|
Specifies whether toolbar should be shown with sliding effect or not. By default toolbar is shown with sliding.
|
|
Shows toolbar again after it has been hidden for background changing purposes.
|
|
From CCoeControl. Responds to size changes to sets the size and position of the contents of this control. |
|
Slide toolbar. |
|
Returns pointer to toolbar extension if available.
|
|
Returns the flags of toolbar. Flags are defined in eikon.hrh.
|
|
Returns a pointer to the toolbar observer.
|
|
Returns the index of the toolbar item inside of the iVisibleItems array.
|
|
Updates transparent toolbar's background.
|