Location:
eiktbar.h
Link against: eikcoctl.lib
CEikToolBar
Supported from 6.0
A vertical group of controls displayed down the left-hand side of
an application containing 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.
|
Defined in CEikToolBar
:
AddControlL()
, CEikToolBar()
, ConstructFromResourceL()
, ConstructL()
, CoordinateButtons()
, DelayActivation()
, GetColorUseListL()
, HandleResourceChange()
, InputCapabilities()
, ReduceRect()
, SetBoundingRectL()
, SetButtonStateOn()
, SetCommandObserver()
, SetDimmed()
, StaticConstructL()
, ~CEikToolBar()
Inherited from CBase
:
operator new()
Inherited from CCoeControl
:
ActivateGc()
,
ActivateL()
,
BackedUpWindow()
,
CapturesPointer()
,
ClaimPointerGrab()
,
CloseWindow()
,
ComponentControl()
,
ControlContext()
,
ControlEnv()
,
CopyControlContextFrom()
,
CountComponentControls()
,
CreateBackedUpWindowL()
,
CreateWindowL()
,
DeactivateGc()
,
DrawDeferred()
,
DrawNow()
,
DrawableWindow()
,
EnableDragEvents()
,
FocusChanged()
,
GetColor()
,
GetHelpContext()
,
GrabbingComponent()
,
HandleComponentControlsResourceChange()
,
HandlePointerBufferReadyL()
,
HandlePointerEventL()
,
HandleRedrawEvent()
,
IgnoreEventsUntilNextPointerUp()
,
Index()
,
IsActivated()
,
IsBackedUp()
,
IsBeingDestroyed()
,
IsBlank()
,
IsDimmed()
,
IsFocused()
,
IsNonFocusing()
,
IsReadyToDraw()
,
IsVisible()
,
MakeVisible()
,
MinimumSize()
,
Observer()
,
OfferKeyEventL()
,
OverrideColorL()
,
OwnsWindow()
,
Position()
,
PositionChanged()
,
PositionRelativeToScreen()
,
PrepareForFocusGainL()
,
PrepareForFocusLossL()
,
Rect()
,
RecursivelyMergedInputCapabilities()
,
ReportEventL()
,
ResetGc()
,
SetAllowStrayPointers()
,
SetBlank()
,
SetCanDrawOutsideRect()
,
SetComponentsToInheritVisibility()
,
SetContainerWindow()
,
SetContainerWindowL()
,
SetControlContext()
,
SetCornerAndSize()
,
SetCornerAndSizeL()
,
SetExtent()
,
SetExtentL()
,
SetExtentToWholeScreen()
,
SetExtentToWholeScreenL()
,
SetFocus()
,
SetFocusing()
,
SetGloballyCapturing()
,
SetNeighbor()
,
SetNonFocusing()
,
SetObserver()
,
SetPointerCapture()
,
SetPosition()
,
SetRect()
,
SetRectL()
,
SetSize()
,
SetSizeL()
,
SetSizeWithoutNotification()
,
SetSizeWithoutNotificationL()
,
Size()
,
SizeChanged()
,
SizeChangedL()
,
SystemGc()
,
Window()
Inherited from CEikBorderedControl
:
Border()
,
Draw()
,
HasBorder()
,
SetAdjacent()
,
SetBorder()
,
iBorder
Inherited from MCoeControlObserver
:
EEventInteractionRefused
,
EEventPrepareFocusTransition
,
EEventRequestCancel
,
EEventRequestExit
,
EEventRequestFocus
,
EEventStateChanged
,
HandleControlEventL()
,
TCoeEvent
CEikToolBar();
Constructor.
Creates a new toolbar object, but does not initialise any of its heap-stored members.
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; if that fails then this
function panics with a code of EEikPanicToolBarNullControl
and a
category of Uikon.
Applications requiring custom controls in their toolbars should
override their App UI’s CreateCustomCommandControlL()
method, inherited from MEikCommandObserver
.
|
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.
|
void ConstructFromResourceL(TResourceReader& aReader);
Second-phase construction from a resource. This is called by
StaticConstructL()
with an appropriate reader.
|
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()
.
|
~CEikToolBar();
Destructor. Deletes the toolbar’s brush and pen context and control types.
void SetBoundingRectL(const TRect& aRect);
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.
|
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.
|
void SetCommandObserver(MEikCommandObserver* aCommandObserver);
Sets the toolbar’s command observer. Applications will not typically need to use this function.
|
void CoordinateButtons(TInt aId,TInt aCount,TEikButtonCoordinator* aCoordinator);
Sets the button coordinator for a group of buttons in a toolbar.
|
void SetButtonStateOn(TInt aId,TBool aState);
Sets the state of the specified button and draws the button to show the new state.
|
void GetColorUseListL(CArrayFix<TCoeColorUse>& aColorUseList) 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.
|
void HandleResourceChange(TInt aType);
Handles a change to the control's resources which are shared across the environment. For example, colors or fonts.
|
TCoeInputCapabilities InputCapabilities() const;
Gets toolbar input capabilities.
|
The following functions override methods which are declared
virtual in CCoeControl
, CEikControlGroup
and
MCoeControlObserver
.
void SetDimmed(TBool aDimmed);
Sets toolbar dim state. Dimming usually indicates user input is not accepted.
|
void AddControlL(CCoeControl* aControl,TInt aId);
Adds a control to the control group. Overrides
CEikControlGroup::AddControlL()
.
|
void AddControlL(TEikGroupControl& aGroupControl);
Adds a control wrapped with its ID and length to the control
group. Overrides CEikControlGroup::AddControlL()
.
|