#include <mw/eikcmbut.h>
class CEikCommandButtonBase : public CEikButtonBase |
Protected Attributes | |
---|---|
TInt | iCmdFlags |
CEikAlignedControl * | iComponents |
TMargins8 | iMargins |
Public Member Enumerations | |
---|---|
enum | TDisplayContent { EFirstOnly, ESecondOnly, EBoth } |
enum | TExcess { EShare, EToFirst, EToSecond } |
enum | TLayout { EFirstRightSecondLeft, EFirstBottomSecondTop, EFirstTopSecondBottom, EFirstLeftSecondRight, EDenseFont } |
enum | TWhichComponent { EFirst, ESecond } |
Protected Member Functions | |
---|---|
CEikCommandButtonBase() | |
TInt | Behavior() |
void | CheckCreateCommandStackL() |
virtual IMPORT_C void | Draw(const TRect &) |
void | SetImageAttributes(CEikImage *) |
IMPORT_C void | SetPictureFromFileL(const TDesC &, TInt, TInt, CEikAlignedControl *&) |
IMPORT_C void | SetPictureL(const CFbsBitmap *, const CFbsBitmap *, CEikAlignedControl *&) |
IMPORT_C void | SetTextL(const TDesC &, CEikAlignedControl *&) |
virtual IMPORT_C void | StateChanged() |
virtual IMPORT_C void | WriteInternalStateL(RWriteStream &) |
Inherited Attributes | |
---|---|
CCoeControl::iCoeEnv | |
CCoeControl::iContext | |
CCoeControl::iPosition | |
CCoeControl::iSize | |
CEikBorderedControl::iBorder | |
CEikButtonBase::iButFlags |
Inherited Enumerations | |
---|---|
CCoeControl:TZoomType | |
CEikButtonBase:TDrawState | |
CEikButtonBase:TState |
Base class for buttons that generate commands.
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
CEikAlignedControl * | iComponents | [protected] |
The components of the button: the image or the text (order determined by construction)
IMPORT_C void | ActivateL | ( | ) | [virtual] |
Reimplemented from CCoeControl::ActivateL()
From CCoeControl
Make the control ready for display.
void | CheckCreateCommandStackL | ( | ) | [protected, inline] |
Utility routine. Calling this without a leave will ensure the internal command stack is constructed.
CEikCommandStack * | CommandStack | ( | ) | const |
Access to the command stack
Returns: pointer to the command stack
IMPORT_C CCoeControl * | ComponentControl | ( | TInt | aIndex | ) | const [virtual] |
Reimplemented from CCoeControl::ComponentControl(TInt)const
From CCoeControl
Return a pointer to the component control at the give index.
Returns: Pointer to the conponent control. No ownership is transferred
IMPORT_C void | ConstructImageFromResourceL | ( | TResourceReader & | aReader, |
TWhichComponent | aWhich | |||
) |
Constructs an image component for the button
aWhich Which component to construct in this call
IMPORT_C void | ConstructLabelFromResourceL | ( | TResourceReader & | aReader, |
TWhichComponent | aWhich | |||
) |
Constructs a label component for the button
aWhich Which component to construct in this call
IMPORT_C TInt | CountComponentControls | ( | ) | const [virtual] |
Reimplemented from CCoeControl::CountComponentControls()const
From CCoeControl
Returns the number of component controls
Returns: Number of component controls
IMPORT_C void | Draw | ( | const TRect & | aRect | ) | const [protected, virtual] |
Reimplemented from CEikBorderedControl::Draw(const TRect &)const
From CCoeControl
Request for the control to draw itself within the given rectangle
Parameter | Description |
---|---|
aRect | TRect to draw |
IMPORT_C void | FocusChanged | ( | TDrawNow | aDrawNow | ) | [virtual] |
Reimplemented from CCoeControl::FocusChanged(TDrawNow)
From CCoeControl
Called when the focus has changed
Parameter | Description |
---|---|
aDrawNow | Iff not EFalse, then the control is requested to redraw. |
IMPORT_C void | GetColorUseListL | ( | CArrayFix< TCoeColorUse > & | aColorUseList | ) | const [virtual] |
Reimplemented from CEikButtonBase::GetColorUseListL(CArrayFix< TCoeColorUse > &)const
From CCoeControl
Obtain the list of colors to be used by this control
IMPORT_C void | HandlePointerEventL | ( | const TPointerEvent & | aPointerEvent | ) | [virtual] |
Reimplemented from CEikButtonBase::HandlePointerEventL(const TPointerEvent &)
From CCoeControl
Handle a pointer event that has been routed to this control
Parameter | Description |
---|---|
aPointerEvent | Pointer event to handle |
IMPORT_C void | HandleResourceChange | ( | TInt | aType | ) | [virtual] |
Reimplemented from CEikButtonBase::HandleResourceChange(TInt)
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.
Parameter | Description |
---|---|
aType | Type of resource or setting that has changed |
TBool | IsDefault | ( | ) | const |
Access to whether the button is default
Returns: EFalse iff the button is not default.
IMPORT_C TSize | MinimumSize | ( | ) | [virtual] |
Reimplemented from CCoeControl::MinimumSize()
From CCoeControl
Reports to the caller the minimum size that the control can be, given its contents.
Returns: The minimum size
IMPORT_C TKeyResponse | OfferKeyEventL | ( | const TKeyEvent & | aKeyEvent, |
TEventCode | ||||
) | [virtual] |
Reimplemented from CEikButtonBase::OfferKeyEventL(const TKeyEvent &,TEventCode)
From CCoeControl
CONE framework is requesting that the passed-in key be handled.
Parameter | Description |
---|---|
aKeyEvent | Wserv event type |
IMPORT_C void | SetButtonLayout | ( | TLayout | aLayout | ) |
Sets the layout of the button
Parameter | Description |
---|---|
aLayout | Layout enumeration |
IMPORT_C void | SetContainerWindowL | ( | const CCoeControl & | aContainer | ) | [virtual] |
Reimplemented from CCoeControl::SetContainerWindowL(const CCoeControl &)
From CCoeControl
Sets the control whose window is to be used as a container for this control
Parameter | Description |
---|---|
aContainer | control |
IMPORT_C void | SetDimmed | ( | TBool | aDimmed | ) | [virtual] |
Reimplemented from CCoeControl::SetDimmed(TBool)
From CCoeControl
Sets the button to be inactive. The button is drawn with a dimmed effect.
Parameter | Description |
---|---|
aDimmed | If not EFalse, set the state to dimmed. Otherwise set to non-dimmed |
IMPORT_C void | SetDisplayContent | ( | TDisplayContent | aContent | ) |
Sets the content of the button
IMPORT_C void | SetExcessSpace | ( | TExcess | aExcess | ) |
Sets where excess space is to be put
Parameter | Description |
---|---|
aExcess | Excess space enumeration |
void | SetImageAttributes | ( | CEikImage * | aImage | ) | [protected] |
Utility routine. Sets additional look and feel attributes for the image
IMPORT_C void | SetPictureFromFileL | ( | const TDesC & | aFilename, |
TInt | aMain, | |||
TInt | aMask, | |||
CEikAlignedControl *& | aComponent | |||
) | [protected] |
Sets the bitmap and optional mask from an mbm file.
Parameter | Description |
---|---|
aMain | Index of the bitmap to use |
aMask | Index of the mask. If -1, then a null mask will be used |
aComponent | The component for which the picture is to be set. |
IMPORT_C void | SetPictureL | ( | const CFbsBitmap * | aMain, |
const CFbsBitmap * | aMask, | |||
CEikAlignedControl *& | aComponent | |||
) | [protected] |
Sets the bitmap and optional mask for the button
Parameter | Description |
---|---|
aMain | The bitmap to use |
aMask | The mask. If null, then no mask will be used |
aComponent | The component for which the picture is to be set. |
IMPORT_C void | SetTextL | ( | const TDesC & | aText, |
CEikAlignedControl *& | aComponent | |||
) | [protected] |
Sets the label text for the button.
Parameter | Description |
---|---|
aText | The text to set |
aComponent | The component for which the text is to be set. |
IMPORT_C void | StartConstructFromResourceL | ( | TResourceReader & | aReader | ) |
Read preamble part of the resource. This call can be followed by calls to ConstructLabelFromResourceL and/or ConstructImageFromResourceL to complete contruction.
IMPORT_C void | StateChanged | ( | ) | [protected, virtual] |
Reimplemented from CEikButtonBase::StateChanged()
From CEikButtonBase
Framework method called when the state changes
IMPORT_C void | UpdateComponentAlignment | ( | ) | [virtual] |
Cause a recalculation of the components alignment
IMPORT_C void | WriteInternalStateL | ( | RWriteStream & | aWriteStream | ) | const [protected, virtual] |
Reimplemented from CEikButtonBase::WriteInternalStateL(RWriteStream &)const
From CCoeControl
Serialize the state of the control
Parameter | Description |
---|---|
aWriteStream | Output stream for the serialization |