API published in: S60 1st Ed
Link against: eikcoctl.lib avkon.lib
Required Capabilities
None
#include <eikcmbut.h>
Inherits CEikButtonBase.
Inherited by CEikBitmapButton, CEikCommandButton, CEikTextButton, and CEikTwoPictureCommandButton.
MControlContext is mixed in. This class is used as the interface to the button member of CEikLabeledButton, as well as being the base class for CEikCommandButton, CEikTextButton, and CEikBitmapButton
Public Types |
|
enum | TWhichComponent { EFirst, ESecond } |
Enumeration to tag the components of a command button (text or image). More... |
|
enum | TDisplayContent { EFirstOnly = 0x0100, ESecondOnly = 0x0200, EBoth = 0x0300 } |
Controls which of the components of the command button are shown. More... |
|
enum | TLayout { EFirstRightSecondLeft = 0x0000, EFirstBottomSecondTop = 0x0001, EFirstTopSecondBottom = 0x0002, EFirstLeftSecondRight = 0x0003, EDenseFont = 0x0008 } |
enum | TExcess { EShare = 0x0000, EToFirst = 0x0010, EToSecond = 0x0020 } |
Options for where excess space between the two components of the command button is distrubuted. More... |
|
Public Member Functions |
|
IMPORT_C | ~CEikCommandButtonBase () |
C++ destructor. |
|
IMPORT_C void | SetButtonLayout (TLayout aLayout) |
Sets the layout of the button. |
|
IMPORT_C void | SetExcessSpace (TExcess aExcess) |
Sets where excess space is to be put. |
|
IMPORT_C void | SetDisplayContent (TDisplayContent aContent) |
Sets the content of the button. |
|
IMPORT_C void | LayoutComponents () |
Causes the content to be (re-)laid out. |
|
IMPORT_C void | StartConstructFromResourceL (TResourceReader &aReader) |
Read preamble part of the resource. |
|
IMPORT_C void | ConstructLabelFromResourceL (TResourceReader &aReader, TWhichComponent aWhich) |
Constructs a label component for the button. |
|
IMPORT_C void | ConstructImageFromResourceL (TResourceReader &aReader, TWhichComponent aWhich) |
Constructs an image component for the button. |
|
virtual IMPORT_C void | UpdateComponentAlignment () |
Cause a recalculation of the components alignment. |
|
IMPORT_C void | SetDefault (TBool aIsDefault) |
Sets this button to be the default. |
|
IMPORT_C void | SetDimmed (TBool aDimmed) |
From CCoeControl. |
|
IMPORT_C TSize | MinimumSize () |
From CCoeControl. |
|
IMPORT_C TInt | CountComponentControls () const |
From CCoeControl. |
|
IMPORT_C CCoeControl * | ComponentControl (TInt aIndex) const |
From CCoeControl. |
|
IMPORT_C void | ActivateL () |
From CCoeControl. |
|
IMPORT_C void | SetContainerWindowL (const CCoeControl &aContainer) |
From CCoeControl. |
|
IMPORT_C void | FocusChanged (TDrawNow aDrawNow) |
From CCoeControl. |
|
IMPORT_C TKeyResponse | OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode) |
From CCoeControl. |
|
virtual IMPORT_C void | GetColorUseListL (CArrayFix< TCoeColorUse > &aColorUseList) const |
From CCoeControl. |
|
virtual IMPORT_C void | HandleResourceChange (TInt aType) |
From CCoeControl. |
|
IMPORT_C void | HandlePointerEventL (const TPointerEvent &aPointerEvent) |
From CCoeControl. |
|
CEikCommandStack * | CommandStack () const |
Access to the command stack. |
|
TInt | ButFlags () const |
Access to the button flags. |
|
TBool | IsDefault () const |
Access to whether the button is default. |
|
Protected Member Functions |
|
IMPORT_C void | StateChanged () |
From CEikButtonBase. |
|
IMPORT_C | CEikCommandButtonBase () |
Constructor. |
|
IMPORT_C void | SetTextL (const TDesC &aText, CEikAlignedControl *&aComponent) |
Sets the label text for the button. |
|
IMPORT_C void | SetPictureL (const CFbsBitmap *aMain, const CFbsBitmap *aMask, CEikAlignedControl *&aComponent) |
Sets the bitmap and optional mask for the button. |
|
IMPORT_C void | SetPictureFromFileL (const TDesC &aFilename, TInt aMain, TInt aMask, CEikAlignedControl *&aComponent) |
Sets the bitmap and optional mask from an mbm file. |
|
void | CheckCreateCommandStackL () |
Utility routine. |
|
IMPORT_C void | Draw (const TRect &aRect) const |
From CCoeControl. |
|
void | SetImageAttributes (CEikImage *aImage) |
Utility routine. |
|
TInt | Behavior () const |
Access the behaviour set into the button. |
|
IMPORT_C void | WriteInternalStateL (RWriteStream &aWriteStream) const |
From CCoeControl. |
|
Protected Attributes |
|
TMargins8 | iMargins |
CEikAlignedControl * | iComponents [2] |
The components of the button: the image or the text (order determined by construction). |
|
TInt | iCmdFlags |
|
Controls which of the components of the command button are shown. Reimplemented in CEikCommandButton, and CEikTwoPictureCommandButton. |
|
Options for where excess space between the two components of the command button is distrubuted. Reimplemented in CEikCommandButton, and CEikTwoPictureCommandButton. |
|
Reimplemented in CEikCommandButton, and CEikTwoPictureCommandButton. |
|
Enumeration to tag the components of a command button (text or image). |
|
C++ destructor. |
|
Constructor. |
|
From CCoeControl. Make the control ready for display. Reimplemented in CEikTwoPictureCommandButton. |
|
Access the behaviour set into the button. |
|
Access to the button flags.
|
|
Utility routine. Calling this without a leave will ensure the internal command stack is constructed. |
|
Access to the command stack.
|
|
From CCoeControl. Return a pointer to the component control at the give index.
|
|
Constructs an image component for the button. aWhich Which component to construct in this call |
|
Constructs a label component for the button. aWhich Which component to construct in this call |
|
From CCoeControl. Returns the number of component controls
|
|
From CCoeControl. Request for the control to draw itself within the given rectangle
Reimplemented from CEikBorderedControl. |
|
From CCoeControl. Called when the focus has changed
|
|
From CCoeControl. Obtain the list of colors to be used by this control
Reimplemented from CEikButtonBase. |
|
From CCoeControl. Handle a pointer event that has been routed to this control
Reimplemented from CEikButtonBase. Reimplemented in CEikCommandButton, CEikTwoPictureCommandButton, CEikInverterCommandButton, CEikTextButton, CEikBitmapButton, and CEikMenuButton. |
|
From CCoeControl. This is called when resource or layout or other display-affecting setting has changed. Change the internals of the control so that it is ready for a subsequent SizeChanged call.
Reimplemented from CEikButtonBase. |
|
Access to whether the button is default.
|
|
Causes the content to be (re-)laid out. |
|
From CCoeControl. Reports to the caller the minimum size that the control can be, given its contents.
|
|
From CCoeControl. CONE framework is requesting that the passed-in key be handled.
Reimplemented from CEikButtonBase. |
|
Sets the layout of the button.
|
|
From CCoeControl. Sets the control whose window is to be used as a container for this control
|
|
Sets this button to be the default. |
|
From CCoeControl. Sets the button to be inactive. The button is drawn with a dimmed effect.
|
|
Sets the content of the button.
|
|
Sets where excess space is to be put.
|
|
Utility routine. Sets additional look and feel attributes for the image |
|
Sets the bitmap and optional mask from an mbm file.
|
|
Sets the bitmap and optional mask for the button.
|
|
Sets the label text for the button.
|
|
Read preamble part of the resource. This call can be followed by calls to ConstructLabelFromResourceL and/or ConstructImageFromResourceL to complete contruction. |
|
From CEikButtonBase. Framework method called when the state changes Reimplemented from CEikButtonBase. |
|
Cause a recalculation of the components alignment. Reimplemented in CEikCommandButton. |
|
From CCoeControl. Serialize the state of the control
Reimplemented from CEikButtonBase. Reimplemented in CEikTwoPictureCommandButton, CEikInverterCommandButton, and CEikMenuButton. |
|
|
The components of the button: the image or the text (order determined by construction). |
|