class CEikCommandButton : public CEikCommandButtonBase |
Command button with a text and/or an image
This class in S60 does not function without derivation This class does NOT implement S60 look-and-feel and is not skinned.
Public Member Functions | |
---|---|
CEikCommandButton() | |
~CEikCommandButton() | |
IMPORT_C void | AddCommandToStackL(TInt, const TDesC *, const CFbsBitmap *, const CFbsBitmap *) |
IMPORT_C void | ConstructFromResourceL(TResourceReader &) |
IMPORT_C void | HandlePointerEventL(const TPointerEvent &) |
IMPORT_C CEikLabel * | Label() |
IMPORT_C CEikImage * | Picture() |
IMPORT_C TInt | PopCommandFromStack() |
IMPORT_C TBool | RemoveCommandFromStack(TInt) |
IMPORT_C void | SetButtonLayout(TLayout) |
IMPORT_C void | SetCommandL(TInt, const TDesC *, const CFbsBitmap *, const CFbsBitmap *) |
IMPORT_C void | SetDisplayContent(TDisplayContent) |
IMPORT_C void | SetExcessSpace(TExcess) |
IMPORT_C void | SetPictureFromFileL(const TDesC &, TInt, TInt) |
IMPORT_C void | SetPictureL(const CFbsBitmap *, const CFbsBitmap *) |
IMPORT_C void | SetTextL(const TDesC &) |
IMPORT_C void | UpdateComponentAlignment() |
Private Member Functions | |
---|---|
IMPORT_C void * | ExtensionInterface(TUid) |
void | UpdateLabelReserveLengthL(const TDesC *) |
Public Member Enumerations | |
---|---|
enum | TDisplayContent { ETextOnly = 0x0100, EPictureOnly = 0x0200, ETextAndPicture = 0x0300 } |
enum | TExcess { EShare = 0x0000, EToText = 0x0010, EToPicture = 0x0020 } |
enum | TLayout { ETextRightPictureLeft = 0x000, ETextBottomPictureTop = 0x001, ETextTopPictureBottom = 0x002, ETextLeftPictureRight = 0x003 } |
Inherited Enumerations | |
---|---|
CCoeControl:TZoomType | |
CEikButtonBase:TDrawState | |
CEikButtonBase:TState | |
CEikCommandButtonBase:TWhichComponent |
Private Attributes | |
---|---|
TInt | iDummy |
IMPORT_C void | AddCommandToStackL | ( | TInt | aCommandId, |
const TDesC * | aText, | |||
const CFbsBitmap * | aBitmap, | |||
const CFbsBitmap * | aMask | |||
) |
Push a command ID + text + image binding onto the command stack.
Sets the command button to respond to aCommandId. Sets aText as the text in the command button. Sets aBitmap and aMask as the bitmap and mask of the command button. The previous command can be restored on the command button by a subsequent call to PopCommandFromStack().
TInt aCommandId | Command ID to be generated by pressing this button |
const TDesC * aText | Text to display on the button |
const CFbsBitmap * aBitmap | Bitmap to display on the button |
const CFbsBitmap * aMask | Mask to use. May be Null |
IMPORT_C void | ConstructFromResourceL | ( | TResourceReader & | aReader | ) | [virtual] |
From CCoeControl
Construct the object from resource
TResourceReader & aReader | Fully constructed resource reader |
IMPORT_C void * | ExtensionInterface | ( | TUid | aInterface | ) | [private, virtual] |
From CAknControl
TUid aInterface |
IMPORT_C void | HandlePointerEventL | ( | const TPointerEvent & | aPointerEvent | ) | [virtual] |
From CCoeControl
Handle a pointer event coming from the CONE framework
const TPointerEvent & aPointerEvent | Event to handle |
IMPORT_C CEikLabel * | Label | ( | ) | const |
Access the label control that implements the text label of the button. Ownership is not transferred.
IMPORT_C CEikImage * | Picture | ( | ) | const |
Access the CEikImage that implements the picture component of the button. Ownership is not transferred.
IMPORT_C TInt | PopCommandFromStack | ( | ) |
Remove the top (most recently added) command binding from the command stack
Pops the current command from the stack, if there is one. Restores the command button to respond to the previous commandId before the last push to the stack. The text, bitmap and mask are also restored to the previous values (before the last push was made).
IMPORT_C TBool | RemoveCommandFromStack | ( | TInt | aCommandId | ) |
Find the stacked command with a given command ID and remove it from the stack
Removes the command which has aCommandId from the stack of commmands.
TInt aCommandId | ID of the command to be removed |
IMPORT_C void | SetButtonLayout | ( | TLayout | aLayout | ) |
Set the layout of the button
TLayout aLayout | Layout to be used |
IMPORT_C void | SetCommandL | ( | TInt | aCommandId, |
const TDesC * | aText, | |||
const CFbsBitmap * | aBitmap, | |||
const CFbsBitmap * | aMask | |||
) |
Sets the command button's text, bitmap and bitmap mask.
Sets aText as the text in the command button. Sets aBitmap and aMask as the bitmap and mask of the command button.
TInt aCommandId | Command ID to be generated by pressing this button |
const TDesC * aText | Text to display on the button |
const CFbsBitmap * aBitmap | Bitmap to display on the button |
const CFbsBitmap * aMask | Mask to use. May be Null |
IMPORT_C void | SetDisplayContent | ( | TDisplayContent | aContent | ) |
Set what content is to be displayed in the button
TDisplayContent aContent | Enum value saying what content to display |
IMPORT_C void | SetExcessSpace | ( | TExcess | aExcess | ) |
Sets where the excess space in the layout is to be distributed
TExcess aExcess | Enum value to say where the excess space is to go |
IMPORT_C void | SetPictureFromFileL | ( | const TDesC & | aFilename, |
TInt | aMain, | |||
TInt | aMask = -1 | |||
) |
Set bitmap and mask from file.
IMPORT_C void | SetPictureL | ( | const CFbsBitmap * | aMain, |
const CFbsBitmap * | aMask = NULL | |||
) |
Sets the bitmap and optional mask for the button
const CFbsBitmap * aMain | The bitmap to use |
const CFbsBitmap * aMask = NULL | The mask. If null, then no mask will be used |
IMPORT_C void | SetTextL | ( | const TDesC & | aText | ) |
Sets the label text for the button.
const TDesC & aText | The text to set |
IMPORT_C void | UpdateComponentAlignment | ( | ) | [virtual] |
Cause a recalculation of the components alignment
void | UpdateLabelReserveLengthL | ( | const TDesC * | aText | ) | [private] |
const TDesC * aText |
Content to diplay for this button
ETextOnly = 0x0100 | |
EPictureOnly = 0x0200 | |
ETextAndPicture = 0x0300 |
Where to put excess space in the layout
EShare = 0x0000 | |
EToText = 0x0010 | |
EToPicture = 0x0020 |
Layout options for a command button
ETextRightPictureLeft = 0x000 | |
ETextBottomPictureTop = 0x001 | |
ETextTopPictureBottom = 0x002 | |
ETextLeftPictureRight = 0x003 |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.