#include <mw/eiktbar.h>
class CEikToolBar : public CEikControlGroup |
Public Member Functions | |
---|---|
CEikToolBar() | |
~CEikToolBar() | |
virtual IMPORT_C void | AddControlL(CCoeControl *, TInt) |
virtual IMPORT_C void | AddControlL(TEikGroupControl &) |
void | AddControlTypeL(TInt) |
virtual IMPORT_C void | ConstructFromResourceL(TResourceReader &) |
IMPORT_C void | ConstructL(MEikCommandObserver *, TInt, const TRect &) |
TBool | ControlIsButton(TInt) |
IMPORT_C void | CoordinateButtons(TInt, TInt, TEikButtonCoordinator *) |
IMPORT_C TBool | DelayActivation() |
virtual IMPORT_C void | GetColorUseListL(CArrayFix< TCoeColorUse > &) |
virtual IMPORT_C void | HandlePointerEventL(const TPointerEvent &) |
virtual IMPORT_C void | HandleResourceChange(TInt) |
IMPORT_C void | ReduceRect(TRect &) |
void | RemoveControlType(TInt) |
IMPORT_C void | SetBoundingRect(const TRect &) |
IMPORT_C void | SetButtonStateOn(TInt, TBool) |
IMPORT_C void | SetCommandObserver(MEikCommandObserver *) |
virtual IMPORT_C void | SetDimmed(TBool) |
IMPORT_C void | StaticConstructL(MEikCommandObserver *, TInt) |
Protected Member Functions | |
---|---|
virtual IMPORT_C void | WriteInternalStateL(RWriteStream &) |
Inherited Attributes | |
---|---|
CCoeControl::iCoeEnv | |
CCoeControl::iContext | |
CCoeControl::iPosition | |
CCoeControl::iSize | |
CEikBorderedControl::iBorder | |
CEikControlGroup::iControlArray |
Inherited Enumerations | |
---|---|
CCoeControl:TZoomType | |
CEikControlGroup:@148 | |
CEikControlGroup:TOrientation | |
CEikControlGroup:TStartCorner |
A vertical group of controls displayed down the right-hand side of the screen in an application.
It contains buttons which are used to issue application commands, and other controls. A toolband may also be created using this class, by setting the EEikToolBarHorizontal flag and initialising from a TOOLBAND resource.
IMPORT_C | CEikToolBar | ( | ) |
Default C++ constructor. Creates a new toolbar object, but does not initialise any of its heap-stored members.
IMPORT_C | ~CEikToolBar | ( | ) |
Destructor. Deletes the toolbar's brush and pen context and control types.
IMPORT_C void | AddControlL | ( | CCoeControl * | aControl, |
TInt | aId | |||
) | [virtual] |
Reimplemented from CEikControlGroup::AddControlL(CCoeControl *,TInt)
From CEikControlGroup. Adds a control to the control group.
From CEikControlGroup
Parameter | Description |
---|---|
aControl | The control to add to the control group |
aId | The control's ID. |
IMPORT_C void | AddControlL | ( | TEikGroupControl & | aGroupControl | ) | [virtual] |
Reimplemented from CEikControlGroup::AddControlL(TEikGroupControl &)
Adds a control wrapped with its ID and length to the control group.
From CEikControlGroup
Parameter | Description |
---|---|
aGroupControl | The wrapped control to add. |
void | AddControlTypeL | ( | TInt | aType | ) |
Adds a control type to the control type array.
IMPORT_C void | ConstructFromResourceL | ( | TResourceReader & | aReader | ) | [virtual] |
Reimplemented from CCoeControl::ConstructFromResourceL(TResourceReader &)
From CCoeControl. Second-phase construction from a resource. This is called by StaticConstructL() with an appropriate reader.
From CCoeControl
Parameter | Description |
---|---|
aReader | A resource reader pointing at a TOOLBAR or TOOLBAND resource defining the toolbar. |
IMPORT_C void | ConstructL | ( | MEikCommandObserver * | aCommandObserver, |
TInt | aResourceId, | |||
const TRect & | aBoundingRect | |||
) |
Completes construction of a default-constructed toolbar.
The command observer interface defines a method for creating custom controls on the toolbar from user-defined IDs specified in the resource aResourceId.
IDs for controls which cannot be constructed using EikControlFactory::CreateByTypeL() are passed to this object's command observer for construction.
Applications requiring custom controls in their toolbars should override their AppUI's CreateCustomCommandControlL() method, inherited from MEikCommandObserver.
See also: MEikCommandObserver::ProcessCommandL(). Typically the observer is the application's AppUI.
Parameter | Description |
---|---|
aCommandObserver | Sets the command observer for this toolbar. The observer's ProcessCommandL() function is invoked when a toolbar command is invoked by the user. |
aResourceId | The ID of a TOOLBAR or TOOLBAND resource structure. |
aBoundingRect | Defines the rectangle to which the toolbar's extent must be limited. This is typically given by CEikAppUi::ClientRect(), which returns the extent of the whole application window, less the extent of any toolbars that already exist and are owned by the AppUI. |
IMPORT_C TBool | DelayActivation | ( | ) | const |
Delays activation of the toolbar when constructed.
This function sets the toolbar flag EEikToolBarDelayActivation. If this flag is set when ConstructL() is called on the toolbar, the toolbar will be constructed but not activated.
The application can subsequently activate the toolbar by calling CCoeControl::ActivateL().
Returns: ETrue to delay activation of the toolbar.
IMPORT_C void | GetColorUseListL | ( | CArrayFix< TCoeColorUse > & | aColorUseList | ) | const [virtual] |
Reimplemented from CEikControlGroup::GetColorUseListL(CArrayFix< TCoeColorUse > &)const
Gets the list of logical colours used to draw the control. Appends the list to aColorUseList paired with an explanation of how the colours are used.
From CCoeControl
Parameter | Description |
---|---|
aColorUseList | The list of logical colours. |
IMPORT_C void | HandlePointerEventL | ( | const TPointerEvent & | aPointerEvent | ) | [virtual] |
Reimplemented from CEikControlGroup::HandlePointerEventL(const TPointerEvent &)
Handles pointer events.
This function gets called whenever a pointer event occurs in the control, i.e. when the pointer is within the control's extent, or when the control has grabbed the pointer.
If overriding this method, the implementation must include a base call to this method.
From CCoeControl.
Parameter | Description |
---|---|
aPointerEvent | The pointer event. |
IMPORT_C void | HandleResourceChange | ( | TInt | aType | ) | [virtual] |
Reimplemented from CEikControlGroup::HandleResourceChange(TInt)
Handles a change to the control's resources.
The types of resources handled are those which are shared across the environment, e.g. colours or fonts. For colour scheme changes, DrawDeferred() is called in order to redraw the control.
If overriding this method, the implementation must include a base call to this method.
From CCoeControl.
Parameter | Description |
---|---|
aType | The type of resource that has changed. |
IMPORT_C void | ReduceRect | ( | TRect & | aBoundingRect | ) | const |
Shrinks a rectangle to exclude the toolbar area. This function reduces the size of the rectangle passed into the function so that on return, the area occupied by the toolbar or toolband is removed from the rectangle. It is provided to prevent drawing over an existing toolbar or toolband.
From MEikButtonGroup
Parameter | Description |
---|---|
aBoundingRect | Specifies a rectangle which, on return, is shrunk to exclude the toolbar s extent. |
void | RemoveControlType | ( | TInt | aIndex | ) |
Removes a control type from the control type array.
IMPORT_C void | SetBoundingRect | ( | const TRect & | aBoundingRect | ) |
From MEikButtonGroup. Sets the toolbar's bounding rectangle. This function has a different effect on the toolbar's extent, depending on whether the toolbar is vertical or horizontal.
For a vertical toolbar, sets the toolbar height to equal the height of the bounding rectangle.
For a horizontal toolbar (toolband), sets the toolband width to equal the width of the bounding rectangle.
From MEikButtonGroup
Parameter | Description |
---|---|
aBoundingRect | The toolbar's bounding rectangle. |
IMPORT_C void | SetCommandObserver | ( | MEikCommandObserver * | aCommandObserver | ) |
Sets the toolbar's command observer. Applications will not typically need to use this function.
Parameter | Description |
---|---|
aCommandObserver | The command observer for this toolbar. When a command is invoked in the toolbar, HandleCommandL() is called in the observer. |
IMPORT_C void | SetDimmed | ( | TBool | aDimmed | ) | [virtual] |
Reimplemented from CCoeControl::SetDimmed(TBool)
Sets the toolbar dimmed or not dimmed. Dimming usually indicates that user input is not accepted.
From CCoeControl
Parameter | Description |
---|---|
aDimmed | ETrue to set as dimmed , EFalse to set as not dimmed. |
IMPORT_C void | StaticConstructL | ( | MEikCommandObserver * | aCommandObserver, |
TInt | aResourceId | |||
) |
Creates a toolbar from a resource definition, but does not set its extent or activate it.
This function is used by ConstructL(), applications will not typically need to use it.
Parameter | Description |
---|---|
aCommandObserver | Specifies the object in which HandleCommandL() is called when a toolbar command is invoked, typically the application's AppUI. |
aResourceId | The resource that defines the toolbar. |
IMPORT_C void | WriteInternalStateL | ( | RWriteStream & | aWriteStream | ) | const [protected, virtual] |
Reimplemented from CEikControlGroup::WriteInternalStateL(RWriteStream &)const
Writes the internal state of the control and its components to aWriteStream. Does nothing in release mode.
Designed to be overridden and base called from subclasses.
From CCoeControl
Parameter | Description |
---|---|
aWriteStream | A connected write stream. |