#include <mw/aknbutton.h>
class CAknButton : public CAknControl |
Protected Attributes | |
---|---|
CAknsFrameBackgroundControlContext * | iBgContext |
TBool | iButtonPressed |
HBufC * | iDimmedHelpText |
TInt | iFlags |
const CFont * | iFont |
CAknInfoPopupNoteController * | iHelpNote |
TInt | iHelpNoteInViewInterval |
TInt | iHelpNoteWaitInterval |
TRect | iHighlightRect |
CGraphicsContext::TTextAlign | iHorizontalAlignment |
TBool | iKeyDownReported |
TInt | iKeyRepeatDelay |
TInt | iKeyRepeatInterval |
CPeriodic * | iKeyRepeatTimer |
TInt | iNumberOfDragEvents |
TScaleMode | iScaleMode |
TBool | iShowHelp |
TInt | iStateIndex |
CArrayPtrFlat< CAknButtonState > * | iStates |
TInt | iTextColorIndex |
TAknsItemID | iTextColorTableId |
TAlignment | iVerticalAlignment |
Public Member Enumerations | |
---|---|
enum | TAlignment { ECenter, ETop, EBottom, ERight, ELeft } |
enum | TButtonEvent { ELongPressEvent, ELongPressEndedEvent } |
enum | TTextAndIconAlignment { EIconBeforeText, EIconAfterText, EIconUnderText, EIconOverText, EOverlay } |
enum | TTooltipPosition { EPositionTop, EPositionBottom, EPositionLeft, EPositionRight } |
Protected Member Functions | |
---|---|
CAknButton(const TInt) | |
IMPORT_C TInt | ChangeState(TBool) |
IMPORT_C void | ConstructL() |
IMPORT_C void | ConstructL(CGulIcon *, CGulIcon *, CGulIcon *, CGulIcon *, const TDesC &, const TDesC &, const TInt) |
IMPORT_C void | ConstructL(const TDesC &, const TInt, const TInt, const TInt, const TInt, const TInt, const TInt, const TInt, const TInt, const TDesC &, const TDesC &, const TInt, const TAknsItemID &, const TAknsItemID &, const TAknsItemID &, const TAknsItemID &) |
virtual IMPORT_C void * | ExtensionInterface(TUid) |
virtual IMPORT_C void | FocusChanged(TDrawNow) |
IMPORT_C const CGulIcon * | GetCurrentIcon() |
IMPORT_C const TDesC & | GetCurrentText() |
IMPORT_C void | HideHelp() |
IMPORT_C void | ShowHelpL() |
virtual IMPORT_C void | SizeChanged() |
Inherited Attributes | |
---|---|
CCoeControl::iCoeEnv | |
CCoeControl::iContext | |
CCoeControl::iPosition | |
CCoeControl::iSize |
Inherited Enumerations | |
---|---|
CCoeControl:TZoomType |
Generic button class.
IMPORT_C | CAknButton | ( | const TInt | aFlags | ) | [protected] |
C++ constructor for the one state button.
Parameter | Description |
---|---|
aFlags | The flags for the button |
IMPORT_C void | ActivateL | ( | ) | [virtual] |
Reimplemented from CCoeControl::ActivateL()
Sets control as ready to be drawn.
IMPORT_C void | AddStateL | ( | CGulIcon * | aIcon, |
CGulIcon * | aDimmedIcon, | |||
CGulIcon * | aPressedIcon, | |||
CGulIcon * | aHoverIcon, | |||
const TDesC & | aText, | |||
const TDesC & | aHelpText, | |||
const TInt | aStateFlags | |||
) | [virtual] |
Adds one more state for the button to the end of state array.
Parameter | Description |
---|---|
aIcon | The icon object containing a bitmap and a mask (if there is one) for the button. |
aDimmedIcon | The icon object containing a bitmap and a mask (if there is one) for the dimmed case. |
aPressedIcon | The icon object containing a bitmap and a mask (if there is one) for the case when button is pressed. |
aHoverIcon | The icon object containingg a bitmap and a mask for the case when the pointer is hovering over the button. |
aText | is the text. |
aHelpText | is the text for the tooltip. |
aStateFlags | The flags for the state. |
IMPORT_C void | AddStateL | ( | const TDesC & | aFilePath, |
const TInt | aBmpId, | |||
const TInt | aMaskId, | |||
const TInt | aDimmedBmpId, | |||
const TInt | aDimmedMaskId, | |||
const TInt | aPressedBmpId, | |||
const TInt | aPressedMaskId, | |||
const TInt | aHoverBmpId, | |||
const TInt | aHoverMaskId, | |||
const TDesC & | aText, | |||
const TDesC & | aHelpText, | |||
const TInt | aStateFlags, | |||
const TAknsItemID & | aId, | |||
const TAknsItemID & | aDimmedId, | |||
const TAknsItemID & | aPressedId, | |||
const TAknsItemID & | aHoverId | |||
) | [virtual] |
Adds one more state for the button.
Parameter | Description |
---|---|
aFilePath | The path to the file which contains icons. |
aBmpId | The bitmap ID for the normal state icon. |
aMaskId | The mask ID for the normal state icon. |
aDimmedBmpId | The bitmap ID for the dimmed state icon. |
aDimmedMaskId | The mask ID for the dimmed state icon. |
aPressedBmpId | The bitmap ID for the pressed down state. |
aPressedMaskId | The mask ID for the pressed down state. |
aHoverBmpId | The bitmap ID for the hover state. |
aHoverMaskId | The mask ID for the hover state. |
aText | is the text. |
aHelpText | is the text for the tooltip. |
aStateFlags | The flags for the state. |
aId | Item ID of the masked bitmap to be created for skin specific icon. Use KAknsIIDNone when it is not needed. |
aDimmedId | Item ID of the dimmed masked bitmap to be created for skin specific icon. Use KAknsIIDNone when it is not needed. |
aPressedId | Item ID of the pressed masked bitmap to be created for skin specific icon. Use KAknsIIDNone when it is not needed. |
aHoverId | Item ID of the hover state masked bitmap to be created for skin specific icon. |
void | AddStateL | ( | CGulIcon * | aIcon, |
CGulIcon * | aDimmedIcon, | |||
CGulIcon * | aPressedIcon, | |||
CGulIcon * | aHoverIcon, | |||
const TDesC & | aText, | |||
const TDesC & | aHelpText, | |||
const TInt | aStateFlags, | |||
const TInt | aCommandId | |||
) |
Adds one more state for the button to the end of state array.
Parameter | Description |
---|---|
aIcon | The icon object containing a bitmap and a mask (if there is one) for the button. |
aDimmedIcon | The icon object containing a bitmap and a mask (if there is one) for the dimmed case. |
aPressedIcon | The icon object containing a bitmap and a mask (if there is one) for the case when button is pressed. |
aHoverIcon | The icon object containingg a bitmap and a mask for the case when the pointer is hovering over the button. |
aText | is the text. |
aHelpText | is the text for the tooltip. |
aStateFlags | The flags for the state. |
aCommandId | Command to be attached with the state. |
IMPORT_C TInt | ButtonFlags | ( | ) | const |
Returns: Button flags.
IMPORT_C void | ConstructFromResourceL | ( | TResourceReader & | aReader | ) | [virtual] |
Reimplemented from CCoeControl::ConstructFromResourceL(TResourceReader &)
Constructs controls from a resource file.
Parameter | Description |
---|---|
aReader | The resource reader, with which to access the control's resource values. |
IMPORT_C void | ConstructFromResourceL | ( | const TInt | aResourceId | ) |
Constructs controls from a resource file.
Parameter | Description |
---|---|
aResourceId | The ID for this component's resource. |
IMPORT_C void | ConstructL | ( | CGulIcon * | aIcon, |
CGulIcon * | aDimmedIcon, | |||
CGulIcon * | aPressedIcon, | |||
CGulIcon * | aHoverIcon, | |||
const TDesC & | aText, | |||
const TDesC & | aHelpText, | |||
const TInt | aStateFlags | |||
) | [protected] |
Symbian 2nd phase constructor.
Parameter | Description |
---|---|
aIcon | The icon for the normal state. Takes ownership. |
aDimmedIcon | The icon for the dimmed state. Takes ownership. |
aPressedIcon | The icon for the pressed down. Takes ownership. |
aHoverIcon | The icon for the hover state. |
aText | The text inside the button. |
aHelpText | The text for the tooltip. |
aStateFlags | The flags for the first state. |
IMPORT_C void | ConstructL | ( | const TDesC & | aFilePath, |
const TInt | aBmpId, | |||
const TInt | aMaskId, | |||
const TInt | aDimmedBmpId, | |||
const TInt | aDimmedMaskId, | |||
const TInt | aPressedBmpId, | |||
const TInt | aPressedMaskId, | |||
const TInt | aHoverBmpId, | |||
const TInt | aHoverMaskId, | |||
const TDesC & | aText, | |||
const TDesC & | aHelpText, | |||
const TInt | aStateFlags, | |||
const TAknsItemID & | aId = KAknsIIDNone , | |||
const TAknsItemID & | aDimmedId = KAknsIIDNone , | |||
const TAknsItemID & | aPressedId = KAknsIIDNone , | |||
const TAknsItemID & | aHoverId = KAknsIIDNone | |||
) | [protected] |
Symbian 2nd phase constructor.
Parameter | Description |
---|---|
aFilePath | The path to the file which contains icons. |
aBmpId | The bitmap ID for the normal state icon. |
aMaskId | The mask ID for the normal state icon. |
aDimmedBmpId | The bitmap ID for the dimmed state icon. |
aDimmedMaskId | The mask ID for the dimmed state icon. |
aPressedBmpId | The bitmap ID for the pressed down state. |
aPressedMaskId | The mask ID for the pressed down state. |
aHoverBmpId | The bitmap ID for the hover state icon. |
aHoverMaskId | The mask ID for the hover state icon. |
aText | The text inside the button. |
aHelpText | The text for the tooltip. |
aStateFlags | The flags for the first state. |
aId | Item ID of the masked bitmap to be created for skin specific icon. |
aDimmedId | Item ID of the dimmed masked bitmap to be created for skin specific icon. |
aPressedId | Item ID of the pressed masked bitmap to be created for skin specific icon. |
aHoverId | Item ID of the masked hover bitmap to be created for skin specific icon. |
IMPORT_C void | DisablePictographs | ( | ) |
Disables pictograph drawing in the button text. Only effective in Japanese variant. By default, it is disabled.
IMPORT_C void | EnableFeedback | ( | TBool | aEnable | ) |
Enables or disables tactile feedback for button. By default it is enabled. Should be used to temporarily prevent updating of tactile feedback area for performance reasons when button is moved constantly.
IMPORT_C void | EnablePictographsL | ( | CAknPictographInterface & | aInterface | ) |
Enables pictograph drawing in the button text. Only effective in Japanese variant. By default, it is disabled.
Parameter | Description |
---|---|
aInterface | Used pictograph interface owned by the caller. |
IMPORT_C void * | ExtensionInterface | ( | TUid | aInterface | ) | [protected, virtual] |
Reimplemented from CAknControl::ExtensionInterface(TUid)
For future extensions
Parameter | Description |
---|---|
aInterface | The ID for the extension interface. |
IMPORT_C void | FocusChanged | ( | TDrawNow | aDrawNow | ) | [protected, virtual] |
Reimplemented from CCoeControl::FocusChanged(TDrawNow)
This function is called whenever a control gains or loses focus.
Parameter | Description |
---|---|
aDrawNow | Contains the value that was passed to it by SetFocus(). |
IMPORT_C const CGulIcon * | GetCurrentIcon | ( | ) | const [protected] |
Returns icon for the current state.
IMPORT_C const TDesC & | GetCurrentText | ( | ) | const [protected] |
Returns the text, which will be displayed inside the button for the current state.
IMPORT_C void | HandlePointerEventL | ( | const TPointerEvent & | aPointerEvent | ) | [virtual] |
Reimplemented from CCoeControl::HandlePointerEventL(const TPointerEvent &)
Handles pointer events.
Parameter | Description |
---|---|
aPointerEvent | The pointer event. |
IMPORT_C void | HandleResourceChange | ( | TInt | aType | ) | [virtual] |
Reimplemented from CCoeControl::HandleResourceChange(TInt)
Handles a change to the control's resources.
Parameter | Description |
---|---|
aType | is a message UID value. |
void | HideTooltipWhenAppFaded | ( | TBool | aHide | ) |
Sets tooltip to hide or show itself when background faded.
Parameter | Description |
---|---|
aHide | should be ETrue if hiding, EFalse if showing |
IMPORT_C TRect | HighlightRect | ( | ) | const |
Gets the highlight rectangle around the button.
Returns: The higlight rectangle around the button.
IMPORT_C TBool | IsDimmed | ( | ) | const |
Reimplemented from CCoeControl::IsDimmed()const
Tests if the control is dimmed. This function overrides the function declared in CCoeControl, and returns the value which is set and unset using CAknButton::SetDimmed().
Returns: ETrue if the control is dimmed, EFalse if it is not dimmed.
IMPORT_C void | MakeVisible | ( | TBool | aVisible | ) | [virtual] |
Reimplemented from CCoeControl::MakeVisible(TBool)
Sets this control as visible or invisible.
Parameter | Description |
---|---|
aVisible | ETrue to make the control visible, EFalse to make it invisible. |
IMPORT_C TSize | MinimumSize | ( | ) | [virtual] |
Reimplemented from CCoeControl::MinimumSize()
Returns the control's minimum required size. It does not include the size of the highlight. However, it includes current margins. Use HighlightRect() function to get highlight rectangle for the focused button.
Returns: The minimum size required by the control.
IMPORT_C CAknButton * | NewL | ( | TResourceReader & | aReader | ) | [static] |
Two-phased constructor. Constructs the button from resources.
Parameter | Description |
---|---|
aReader | is the resource reader with which to access the control's resource values. |
IMPORT_C CAknButton * | NewL | ( | const TInt | aResourceId | ) | [static] |
Two-phased constructor. Constructs the button from resources.
Parameter | Description |
---|---|
aResourceId | is the ID for this component's resource. |
IMPORT_C CAknButton * | NewL | ( | CGulIcon * | aIcon, |
CGulIcon * | aDimmedIcon, | |||
CGulIcon * | aPressedIcon, | |||
CGulIcon * | aHoverIcon, | |||
const TDesC & | aText, | |||
const TDesC & | aHelpText, | |||
const TInt | aButtonFlags, | |||
const TInt | aStateFlags | |||
) | [static] |
Two-phased constructor. Constructs one state button.
Parameter | Description |
---|---|
aIcon | The icon for the normal state. Takes ownership. |
aDimmedIcon | The icon for the dimmed state. Takes ownership. |
aPressedIcon | The icon for the pressed down. Takes ownership. |
aHoverIcon | The icon for the hover state. Takes ownership. |
aText | The text inside the button. |
aHelpText | The text for the tooltip. |
aButtonFlags | The flags for the button. |
aStateFlags | The flags for the first state. |
IMPORT_C CAknButton * | NewL | ( | const TDesC & | aFilePath, |
const TInt | aBmpId, | |||
const TInt | aMaskId, | |||
const TInt | aDimmedBmpId, | |||
const TInt | aDimmedMaskId, | |||
const TInt | aPressedBmpId, | |||
const TInt | aPressedMaskId, | |||
const TInt | aHoverBmpId, | |||
const TInt | aHoverMaskId, | |||
const TDesC & | aText, | |||
const TDesC & | aHelpText, | |||
const TInt | aButtonFlags, | |||
const TInt | aStateFlags, | |||
const TAknsItemID & | aId = KAknsIIDNone , | |||
const TAknsItemID & | aDimmedId = KAknsIIDNone , | |||
const TAknsItemID & | aPressedId = KAknsIIDNone , | |||
const TAknsItemID & | aHoverId = KAknsIIDNone | |||
) | [static] |
Two-phased constructor. Constructs one state button.
Parameter | Description |
---|---|
aFilePath | The path to the file which contains icons. |
aBmpId | The bitmap ID for the normal state icon. |
aMaskId | The mask ID for the normal state icon. |
aDimmedBmpId | The bitmap ID for the dimmed state icon. |
aDimmedMaskId | The mask ID for the dimmed state icon. |
aPressedBmpId | The bitmap ID for the pressed down state. |
aPressedMaskId | The mask ID for the pressed down state. |
aHoverBmpId | The bitmap ID for the hover state. |
aHoverMaskId | The mask ID for the hover state. |
aText | The text inside the button. |
aHelpText | The text for the tooltip. |
aButtonFlags | The flags for the button. |
aStateFlags | The flags for the first state. |
aId | Item ID of the masked bitmap to be created for skin specific icon. |
aDimmedId | Item ID of the dimmed masked bitmap to be created for skin specific icon. |
aPressedId | Item ID of the pressed masked bitmap to be created for skin specific icon. |
aHoverId | Item ID of the masked hover bitmap to be created for skin specific icon. |
IMPORT_C CAknButton * | NewLC | ( | TResourceReader & | aReader | ) | [static] |
Two-phased constructor. Constructs the button from resources.
Parameter | Description |
---|---|
aReader | is the resource reader with which to access the control's resource values. |
IMPORT_C CAknButton * | NewLC | ( | const TInt | aResourceId | ) | [static] |
Two-phased constructor. Constructs the button from resources.
Parameter | Description |
---|---|
aResourceId | is the ID for this component's resource. |
IMPORT_C CAknButton * | NewLC | ( | CGulIcon * | aIcon, |
CGulIcon * | aDimmedIcon, | |||
CGulIcon * | aPressedIcon, | |||
CGulIcon * | aHoverIcon, | |||
const TDesC & | aText, | |||
const TDesC & | aHelpText, | |||
const TInt | aFlags, | |||
const TInt | aStateFlags | |||
) | [static] |
Two-phased constructor. Constructs one state button.
Parameter | Description |
---|---|
aIcon | The icon for the normal state. Takes ownership. |
aDimmedIcon | The icon for the dimmed state. Takes ownership. |
aPressedIcon | The icon for the pressed down. Takes ownership. |
aHoverIcon | The icon for the hover state. Takes ownership. |
aText | The text inside the button. |
aHelpText | The text for the tooltip. |
aStateFlags | The flags for the first state. |
IMPORT_C CAknButton * | NewLC | ( | const TDesC & | aFilePath, |
const TInt | aBmpId, | |||
const TInt | aMaskId, | |||
const TInt | aDimmedBmpId, | |||
const TInt | aDimmedMaskId, | |||
const TInt | aPressedBmpId, | |||
const TInt | aPressedMaskId, | |||
const TInt | aHoverBmpId, | |||
const TInt | aHoverMaskId, | |||
const TDesC & | aText, | |||
const TDesC & | aHelpText, | |||
const TInt | aButtonFlags, | |||
const TInt | aStateFlags, | |||
const TAknsItemID & | aId = KAknsIIDNone , | |||
const TAknsItemID & | aDimmedId = KAknsIIDNone , | |||
const TAknsItemID & | aPressedId = KAknsIIDNone , | |||
const TAknsItemID & | aHoverId = KAknsIIDNone | |||
) | [static] |
Two-phased constructor. Constructs one state button.
Parameter | Description |
---|---|
aFilePath | The path to the file which contains icons. |
aBmpId | The bitmap ID for the normal state icon. |
aMaskId | The mask ID for the normal state icon. |
aDimmedBmpId | The bitmap ID for the dimmed state icon. |
aDimmedMaskId | The mask ID for the dimmed state icon. |
aPressedBmpId | The bitmap ID for the pressed down state. |
aPressedMaskId | The mask ID for the pressed down state. |
aHoverBmpId | The bitmap ID for the hover state. |
aHoverMaskId | The mask ID for the hover state. |
aText | The text inside the button. |
aHelpText | The text for the tooltip. |
aButtonFlags | The flags for the button. |
aStateFlags | The flags for the first state. |
aId | Item ID of the masked bitmap to be created for skin specific icon. |
aDimmedId | Item ID of the dimmed masked bitmap to be created for skin specific icon. |
aPressedId | Item ID of the pressed masked bitmap to be created for skin specific icon. |
aHoverId | Item ID of the hover state masked bitmap to be created for skin specific icon. |
IMPORT_C TKeyResponse | OfferKeyEventL | ( | const TKeyEvent & | aKeyEvent, |
TEventCode | aType | |||
) | [virtual] |
Reimplemented from CCoeControl::OfferKeyEventL(const TKeyEvent &,TEventCode)
Handles key events.
Parameter | Description |
---|---|
aKeyEvent | The key event. |
aType | The type of key event: EEventKey, EEventKeyUp or EEventKeyDown. |
IMPORT_C void | PositionChanged | ( | ) | [virtual] |
Reimplemented from CCoeControl::PositionChanged()
Responds to changes in the position of a control.
IMPORT_C void | PrepareForFocusGainL | ( | ) | [virtual] |
Reimplemented from CCoeControl::PrepareForFocusGainL()
Prepares the control for gaining focus. Must be used before calling SetFocus() function in case when help note should be shown.
IMPORT_C void | PrepareForFocusLossL | ( | ) | [virtual] |
Reimplemented from CCoeControl::PrepareForFocusLossL()
This function is called by the dialog framework immediately before it removes keyboard focus from a control within a dialog. Currently has empty implementation.
void | RegisterResourceProvider | ( | CAknResourceProvider * | aProvider | ) |
Registers resource provider.
Parameter | Description |
---|---|
aProvider | New resource provider. |
void | RemoveCurrentState | ( | ) |
Removes the currently active state from the button, and sets the current state to the previous one.
IMPORT_C void | SetBackgroundIds | ( | const TAknsItemID & | aBackgroundId, |
const TAknsItemID & | aLatchedBackgroundId, | |||
const TAknsItemID & | aDimmedBackgroundId, | |||
const TAknsItemID & | aPressedBackgroundId, | |||
const TAknsItemID & | aLatchedDimmedBackgroundId | |||
) |
Sets specified background IDs. Can be used when default frame is not suitable and the backgound is composed of only single image instead of frame and center. SetFrameAndCenterIds() function can also be used for this purpose by giving the same backround ID for both frame and center. This allows also some of the states to be composed of frames and the others from single backgound images. Use KAknsIIDNone value in case when some backgound drawing is not needed or KAknsIIDDefault when the default button frame should be used.
Parameter | Description |
---|---|
aBackgroundId | The item ID of the entire frame. |
aLatchedBackgroundId | The item ID of the background for the button in latched state. |
aDimmedBackgroundId | The item ID of the background for the button in dimmed state. |
aPressedBackgroundId | The item ID of the background for the button in pressed state. |
aLatchedDimmedBackgroundId | The item ID of the background for the button in latched and dimmed state. |
IMPORT_C void | SetButtonFlags | ( | const TInt | aFlags | ) |
Sets the button flags.
Parameter | Description |
---|---|
aFlags | which can be combination of: KAknButtonTextLeft, KAknButtonSizeFitText, KAknButtonNoFrame, KAknButtonKeyRepeat, KAknButtonReportOnKeyDown, KAknButtonNoFramePressEvent, KAknButtonRequestExitOnButtonUpEvent, KAknButtonReportOnLongPress. |
IMPORT_C void | SetDimmed | ( | TBool | aDimmed | ) | [virtual] |
Reimplemented from CCoeControl::SetDimmed(TBool)
Sets button dimmed. Does not redraw the button. Note: This function does not affect the flag set with function CCoeControl::SetDimmed(), since button needs to get pointer events, even if it is dimmed. The value of the flag can be enquired using CAknButotn::IsDimmed().
Parameter | Description |
---|---|
aDimmed | is ETrue to dim the button, EFalse to set the button as not dimmed. |
IMPORT_C void | SetDimmedHelpTextL | ( | const TDesC & | aHelpText | ) |
Sets the help text for dimmed button.
Parameter | Description |
---|---|
aHelpText | The text inside the tooltip. |
IMPORT_C void | SetFrameAndCenterIds | ( | const TAknsItemID & | aFrameId, |
const TAknsItemID & | aCenterId, | |||
const TAknsItemID & | aLatchedFrameId, | |||
const TAknsItemID & | aLatchedCenterId, | |||
const TAknsItemID & | aDimmedFrameId, | |||
const TAknsItemID & | aDimmedCenterId, | |||
const TAknsItemID & | aPressedFrameId, | |||
const TAknsItemID & | aPressedCenterId, | |||
const TAknsItemID & | aLatchedDimmedFrameId, | |||
const TAknsItemID & | aLatchedDimmedCenterId | |||
) |
Sets specified frame IDs. Can be used when default frame is not suitable. Use KAknsIIDNone value in case when some frame or center drawing is not needed or KAknsIIDDefault when the default button frame should be used.
Parameter | Description |
---|---|
aFrameId | The item ID of the entire frame. |
aCenterId | The item ID of the center part of the frame. |
aLatchedFrameId | The item ID of the entire frame for button in latched state. |
aLatchedCenterId | The item ID of the center part of the frame for button in latched state. |
aDimmedFrameId | The item ID of the entire frame for a button in dimmed state. |
aDimmedCenterId | The item ID of the center part of the frame for a button in dimmed state. |
aPressedFrameId | The item ID of the entire frame for a button in pressed state. |
aPressedCenterId | is the item ID of the center part of the frame for a button in pressed state. |
aLatchedDimmedFrameId | The item ID of the entire frame for a button in latched and dimmed state. |
aLatchedDimmedCenterId | The item ID of the center part of the frame for a button in latched and dimmed state. |
Sets the delay before the help text is shown and also specifies the time for how long help text is visible.
Parameter | Description |
---|---|
aBeforeTimeout | The delay in milliseconds before text help note is shown. The default is 150 milliseconds. |
aInViewTimeout | The interval in milliseconds during which help text note is shown. The default is 3000 milliseconds. |
IMPORT_C void | SetHighlightRect | ( | const TRect & | aRect | ) |
It will change the default highlight rectangle around the focused button.
Parameter | Description |
---|---|
aRect | The highlight rectangle. |
IMPORT_C void | SetIconHorizontalAlignment | ( | const CAknButton::TAlignment | aHorizontalAlignment | ) |
Sets the horizontal alignment for the icon inside the button. By default it will be centered.
Parameter | Description |
---|---|
aHorizontalAlignment | The horizontal alignment for the icon. |
IMPORT_C void | SetIconScaleMode | ( | const TScaleMode | aScaleMode | ) |
Sets the scale mode for the icon inside the button. The default is EAspectRatioNotPreserved.
Parameter | Description |
---|---|
aScaleMode | The scale mode. |
Sets icon size for the button. Calling this function overrides the default size that is scaled automatically depending on the current screen layout. If this function is called then the caller is responsible for updating icon size whenever the layout changes.
Parameter | Description |
---|---|
aSize | New icon size. |
Returns: KErrNone if the operation succeeded, otherwise an error code.
IMPORT_C void | SetIconVerticalAlignment | ( | const CAknButton::TAlignment | aVerticalAlignment | ) |
Sets the vertical alignment for the icon inside the button. By default it will be centered.
Parameter | Description |
---|---|
aVerticalAlignment | The vertical alignment for the icon. |
Sets the interval for key repeat.
Parameter | Description |
---|---|
aKeyRepeatDelay | The initial delay, after which the key repeat is started. The default is 500 milliseconds. |
aKeyRepeatInterval | The interval in milliseconds, in which key repeat events should be reported. The default is 500 milliseconds. |
IMPORT_C void | SetLongPressInterval | ( | const TInt | aLongPressInterval | ) |
Sets the interval for long press. When KAknButtonReportOnLongPress flag is set for the button, button will notify observer with KAknButtonLongPressEvent as the event type, after button has been pressed for the specified time.
Parameter | Description |
---|---|
aLongPressInterval | The time interval in milliseconds, after which the long press event should be reported. The default value is 800 milliseconds. |
IMPORT_C void | SetMargins | ( | const TMargins8 & | aMargins | ) |
Sets button's margins. These define the free area inside the button where content is placed. Note that calling this function overrides default margins that are scaled automatically depending on the current screen layout. If this function is called then the caller is responsible for updating margins whenever the layout changes.
Parameter | Description |
---|---|
aMargins | New marginals. |
IMPORT_C void | SetRequestExit | ( | const TBool | aRequestExit | ) |
Sets whether button should send an EEventRequestExit event to command observer on button up event.
Parameter | Description |
---|---|
aRequestExit | ETrue if button should request exit. |
IMPORT_C void | SetTextAndIconAlignment | ( | const CAknButton::TTextAndIconAlignment | aAlignment | ) |
Sets the icon and text alignment for a button having both
IMPORT_C void | SetTextColorIds | ( | const TAknsItemID & | aTextColorTableId, |
const TInt | aTextColorIndex | |||
) |
Sets the color table and color index for the button text. It will be used on button drawing, if color of the text shouldn't be taken from text layout.
Parameter | Description |
---|---|
aTextColorTableId | Id for the color table |
aTextColorIndex | Index of the color inside color table. |
IMPORT_C void | SetTextFont | ( | const CFont * | aFont | ) |
Sets some specific text font.
Parameter | Description |
---|---|
aFont | The font, which should be used for the text inside the text button. |
IMPORT_C void | SetTextHorizontalAlignment | ( | const CGraphicsContext::TTextAlign | aHorizontalAlignment | ) |
Sets the horizontal alignment for the text inside the button. It will be used, if alignment shouldn't be taken from text layout. By default it will be centered.
Parameter | Description |
---|---|
aHorizontalAlignment | The horizontal alignment for the text. |
IMPORT_C void | SetTextUnderlineStyle | ( | TFontUnderline | aUnderlineStyle | ) |
Sets the text underline style for the text inside the button. By default no underline is used.
Parameter | Description |
---|---|
aUnderlineStyle | The style of underline. |
IMPORT_C void | SetTextVerticalAlignment | ( | const CAknButton::TAlignment | aVerticalAlignment | ) |
Sets the vertical alignment for the text inside the button. It will be used if alignment shouldn't be taken from text layout. By default it will be centered.
Parameter | Description |
---|---|
aVerticalAlignment | The vertical alignment for the text. |
IMPORT_C void | SetTooltipPosition | ( | const TTooltipPosition | aPosition | ) |
Sets the tooltip position.
Parameter | Description |
---|---|
aPosition | The position of the tooltip. |
IMPORT_C void | SizeChanged | ( | ) | [protected, virtual] |
Reimplemented from CCoeControl::SizeChanged()
Responds to size changes to sets the size and position of the contents of this control.
IMPORT_C CAknButtonState * | State | ( | ) | const |
Returns the current state of the button.
Returns: the current state of the button
IMPORT_C CAknButtonState * | State | ( | const TInt | aStateIndex | ) | const |
Returns the state of the button under specified index.
Parameter | Description |
---|---|
aStateIndex | The index for the state. |
Returns: the state of the button.
void | UseMaskedDraw | ( | TBool | aMaskedDraw | ) |
Sets button to use additional masks during drawing. Calling this method forces button to bypass the normal drawing routine i.e. method DrawMaskedL is executed instead of Draw.
Parameter | Description |
---|---|
aMaskedDraw | ETrue to use additional mask. |
TBool | UsesDefaultMargins | ( | ) | const |
Checks if the button uses default margins.
Returns: ETrue if default margins are used.