Location:
eikcmbut.h
Link against:
eikcoctl.lib
CEikCommandButtonBase
Supported from 6.0
Base class for command buttons. A command button can be used to invoke a command in an application, or to toggle one of its states. It may display a text label, an image, or both.
|
Defined in CEikCommandButtonBase
:
ActivateL()
, Behavior()
, CEikCommandButtonBase()
, CheckCreateCommandStack()
, ComponentControl()
, ConstructImageFromResourceL()
, ConstructLabelFromResourceL()
, CountComponentControls()
, Draw()
, EBoth
, EFirst
, EFirstBottomSecondTop
, EFirstLeftSecondRight
, EFirstOnly
, EFirstRightSecondLeft
, EFirstTopSecondBottom
, ESecond
, ESecondOnly
, EShare
, EToFirst
, EToSecond
, FocusChanged()
, GetColorUseListL()
, HandleResourceChange()
, LayoutComponents()
, MinimumSize()
, OfferKeyEventL()
, SetButtonLayout()
, SetContainerWindowL()
, SetDefault()
, SetDimmed()
, SetDisplayContent()
, SetExcessSpace()
, SetPictureFromFileL()
, SetPictureL()
, SetTextL()
, StartConstructFromResourceL()
, StateChanged()
, TDisplayContent
, TExcess
, TLayout
, TWhichComponent
, UpdateComponentAlignment()
, iCmdFlags
, iComponents[2]
, ~CEikCommandButtonBase()
Inherited from CBase
:
operator new()
Inherited from CCoeControl
:
ActivateGc()
,
BackedUpWindow()
,
CapturesPointer()
,
ClaimPointerGrab()
,
CloseWindow()
,
ConstructFromResourceL()
,
ControlContext()
,
ControlEnv()
,
CopyControlContextFrom()
,
CreateBackedUpWindowL()
,
CreateWindowL()
,
DeactivateGc()
,
DrawDeferred()
,
DrawNow()
,
DrawableWindow()
,
EnableDragEvents()
,
GetColor()
,
GetHelpContext()
,
GrabbingComponent()
,
HandleComponentControlsResourceChange()
,
HandlePointerBufferReadyL()
,
HandleRedrawEvent()
,
IgnoreEventsUntilNextPointerUp()
,
Index()
,
IsActivated()
,
IsBackedUp()
,
IsBeingDestroyed()
,
IsBlank()
,
IsDimmed()
,
IsFocused()
,
IsNonFocusing()
,
IsReadyToDraw()
,
IsVisible()
,
MakeVisible()
,
Observer()
,
OverrideColorL()
,
OwnsWindow()
,
Position()
,
PositionChanged()
,
PositionRelativeToScreen()
,
PrepareForFocusGainL()
,
PrepareForFocusLossL()
,
Rect()
,
RecursivelyMergedInputCapabilities()
,
ReportEventL()
,
ResetGc()
,
SetAllowStrayPointers()
,
SetBlank()
,
SetCanDrawOutsideRect()
,
SetComponentsToInheritVisibility()
,
SetContainerWindow()
,
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()
,
HasBorder()
,
SetAdjacent()
,
SetBorder()
,
iBorder
Inherited from CEikButtonBase
:
Animate()
,
CopyDrawStateTo()
,
DrawState()
,
EClear
,
EDrawClear
,
EDrawClearPressed
,
EDrawIndeterminate
,
EDrawIndeterminatePressed
,
EDrawSet
,
EDrawSetPressed
,
EEikButtonLatches
,
EEikButtonReportsOnPointerDown
,
EEikButtonStaysClear
,
EEikButtonStaysSet
,
EIndeterminate
,
ESet
,
HandlePointerEventL()
,
InputCapabilities()
,
IsPressed()
,
SetAllowTristate()
,
SetBehavior()
,
SetBubbleHelpTextL()
,
SetCoordinator()
,
SetIgnoreNextPointerUp()
,
SetReportOnPointerDown()
,
SetState()
,
State()
,
TButtonBehavior
,
TDrawState
,
TState
,
iButFlags
Inherited from MCoeControlContext
:
ActivateContext()
,
PrepareContext()
,
ResetContext()
protected: CEikCommandButtonBase();
Constructor. Constructs a command button setting default button behaviour and layout.
void StartConstructFromResourceL(TResourceReader& aReader);
Begins construction of the button, setting default behaviour and layout. This function can be followed by ConstructImageFromResourceL()
and ConstructLabelFromResourceL()
to set up a button with an image and a label.
|
~CEikCommandButtonBase();
Destructor. Removes all of the button’s components and the command stack.
void SetContainerWindowL(const CCoeControl& aContainer);
Sets a command button’s container window.
|
void SetButtonLayout(TLayout aLayout);
Set the relative positions of the text and image on a command button.
|
void SetExcessSpace(TExcess aExcess);
Sets how excess horizontal space is shared between the two component controls of the command button.
|
void UpdateComponentAlignment();
Sets the alignment of button components according to layout flags.
protected: TInt Behavior() const;
Gets the behaviour of a button. Button behaviour can be: stay set, stay clear or latching button.
|
TSize MinimumSize();
Gets the minimum amount of space required to display the command button.
|
void ActivateL();
Sets the button as ready to be drawn. An application should call this function on all command buttons that are not components in a compound control.
protected: void Draw(const TRect& aRect) const;
Draws the button.
|
The label text and the button image can also be set during construction using a CMBUT
resource.
protected: void SetTextL(const TDesC& aText,CEikAlignedControl*& aComponent);
Sets the text that will appear on the command button.
|
protected: void SetPictureL(const CFbsBitmap* aMain,const CFbsBitmap* aMask,CEikAlignedControl*& aComponent);
Sets the image to be displayed in the button, and an optional bitmask for the image.
|
protected: void SetPictureFromFileL(const TDesC& aFilename,TInt aMain,TInt aMask,CEikAlignedControl*& aComponent);
Set the command button’s image to a bitmap stored in a file. A bitmap mask may optionally be set using aMask
. If the image cannot be read from the file, the button is not updated.
|
void SetDisplayContent(TDisplayContent aContent);
Specify whether component 1, component 2 or both are displayed.
|
void ConstructImageFromResourceL(TResourceReader& aReader,TWhichComponent aWhich);
Constructs an image from resource for the specified button component.
|
void ConstructLabelFromResourceL(TResourceReader& aReader,TWhichComponent aWhich);
Constructs a label from resource for the specified button component.
|
void SetDimmed(TBool aDimmed);
Dims or undims the button. This is typically used to show that the action performed by the button is temporarily unavailable.
|
void GetColorUseListL(CArrayFix<TCoeColorUse>& aColorUseList) const;
Gets a list of logical colors used to draw the button, paired with an explanation of how they are used. Appends the list to aColorUseList
.
|
protected: void CheckCreateCommandStack();
Checks whether the command stack exists. If it does not exist one is created.
void SetDefault(TBool aIsDefault);
Supported from 6.1
Sets the button to be the default.
|
TInt CountComponentControls() const;
Gets the number of controls contained in a compound control.
|
CCoeControl* ComponentControl(TInt aIndex) const;
Gets the specified component of a compound control. Each component control is identified by an index, where the index depends on the order the controls were added: the first is given an index of 0, the next an index of 1.
|
|
void FocusChanged(TDrawNow aDrawNow);
Responds to a change in focus. Whether the button is redrawn depends on aDrawNow
. This function is called whenever a button gains or loses focus.
|
void HandleResourceChange(TInt aType);
Handles a change to the button's resources which are shared across the environment. For example, colors or fonts.
|
TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
Processes key events.
|
|
TWhichComponent
Identifies the command button’s components.
|
TDisplayContent
Specifies whether text, image or both are to be displayed. This enum shadows the values defined in CEikCommandButtonBase::TDisplayContent
to provide more intuitive names for a command button.
|
TLayout
Specifies the positions of text and image on the command button. This enum shadows the values defined in CEikCommandButtonBase::TLayout
to provide more intuitive names for a command button.
|
TExcess
Enumerates the possible ways of allocating excess horizontal space between the two component controls of the command button.
|
TInt iCmdFlags
Button command information such as the layout of the button, and whether the image is the first or second component.
CEikAlignedControl* iComponents[2]
An array of two aligned controls.