|
Public Types |
enum | TAlignment {
ECenter,
ETop,
EBottom,
ERight,
ELeft
} |
enum | TTooltipPosition { EPositionTop = 1,
EPositionBottom,
EPositionLeft,
EPositionRight
} |
enum | TTextAndIconAlignment {
EIconBeforeText,
EIconAfterText,
EIconUnderText,
EIconOverText,
EOverlay
} |
enum | TButtonEvent { ELongPressEvent = 100,
ELongPressEndedEvent
} |
Public Member Functions |
virtual IMPORT_C | ~CAknButton () |
| Destructor.
|
IMPORT_C void | ActivateL () |
| Sets control as ready to be drawn.
|
IMPORT_C void | ConstructFromResourceL (TResourceReader &aReader) |
| Constructs controls from a resource file.
|
IMPORT_C void | HandleResourceChange (TInt aType) |
| Handles a change to the control's resources.
|
IMPORT_C TSize | MinimumSize () |
| Returns the control's minimum required size.
|
IMPORT_C void | SetDimmed (TBool aDimmed) |
| Sets button dimmed.
|
IMPORT_C TKeyResponse | OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType) |
| Handles key events.
|
IMPORT_C void | MakeVisible (TBool aVisible) |
| Sets this control as visible or invisible.
|
IMPORT_C void | PrepareForFocusLossL () |
| This function is called by the dialog framework immediately before it removes keyboard focus from a control within a dialog.
|
IMPORT_C void | PrepareForFocusGainL () |
| Prepares the control for gaining focus.
|
IMPORT_C void | HandlePointerEventL (const TPointerEvent &aPointerEvent) |
| Handles pointer events.
|
virtual IMPORT_C void | PositionChanged () |
| Responds to changes in the position of a control.
|
IMPORT_C void | ConstructFromResourceL (const TInt aResourceId) |
| Constructs controls from a resource file.
|
virtual IMPORT_C void | SetCurrentState (const TInt aStateIndex, const TBool aDrawNow) |
| Sets button state.
|
virtual IMPORT_C void | AddStateL (CGulIcon *aIcon, CGulIcon *aDimmedIcon, CGulIcon *aPressedIcon, CGulIcon *aHoverIcon, const TDesC &aText, const TDesC &aHelpText, const TInt aStateFlags) |
| Adds one more state for the button to the end of state array.
|
virtual 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) |
| Adds one more state for the button.
|
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.
|
IMPORT_C void | SetButtonFlags (const TInt aFlags) |
| Sets the button flags.
|
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.
|
IMPORT_C void | SetBackgroundIds (const TAknsItemID &aBackgroundId, const TAknsItemID &aLatchedBackgroundId, const TAknsItemID &aDimmedBackgroundId, const TAknsItemID &aPressedBackgroundId, const TAknsItemID &aLatchedDimmedBackgroundId) |
| Sets specified background IDs.
|
IMPORT_C void | SetTextFont (const CFont *aFont) |
| Sets some specific text font.
|
IMPORT_C void | SetTextColorIds (const TAknsItemID &aTextColorTableId, const TInt aTextColorIndex) |
| Sets the color table and color index for the button text.
|
IMPORT_C void | SetTextHorizontalAlignment (const CGraphicsContext::TTextAlign aHorizontalAlignment) |
| Sets the horizontal alignment for the text inside the button.
|
IMPORT_C void | SetTextVerticalAlignment (const CAknButton::TAlignment aVerticalAlignment) |
| Sets the vertical alignment for the text inside the button.
|
IMPORT_C void | SetTextAndIconAlignment (const CAknButton::TTextAndIconAlignment aAlignment) |
| Sets the icon and text alignment for a button having both.
|
IMPORT_C void | SetTextUnderlineStyle (TFontUnderline aUnderlineStyle) |
| Sets the text underline style for the text inside the button.
|
IMPORT_C void | SetIconScaleMode (const TScaleMode aScaleMode) |
| Sets the scale mode for the icon inside the button.
|
IMPORT_C void | SetIconHorizontalAlignment (const CAknButton::TAlignment aHorizontalAlignment) |
| Sets the horizontal alignment for the icon inside the button.
|
IMPORT_C void | SetIconVerticalAlignment (const CAknButton::TAlignment aVerticalAlignment) |
| Sets the vertical alignment for the icon inside the button.
|
IMPORT_C void | SetHelpNoteTimeouts (const TInt aBeforeTimeout, const TInt aInViewTimeout) |
| Sets the delay before the help text is shown and also specifies the time for how long help text is visible.
|
IMPORT_C void | SetKeyRepeatInterval (const TInt aKeyRepeatDelay, const TInt aKeyRepeatInterval) |
| Sets the interval for key repeat.
|
IMPORT_C void | SetLongPressInterval (const TInt aLongPressInterval) |
| Sets the interval for long press.
|
IMPORT_C TInt | StateIndex () const |
| Returns the index of the button state.
|
IMPORT_C void | EnablePictographsL (CAknPictographInterface &aInterface) |
| Enables pictograph drawing in the button text.
|
IMPORT_C void | DisablePictographs () |
| Disables pictograph drawing in the button text.
|
IMPORT_C void | SetHighlightRect (const TRect &aRect) |
| It will change the default highlight rectangle around the focused button.
|
IMPORT_C TRect | HighlightRect () const |
| Gets the highlight rectangle around the button.
|
IMPORT_C void | SetTooltipPosition (const TTooltipPosition aPosition) |
| Sets the tooltip position.
|
IMPORT_C void | SetRequestExit (const TBool aRequestExit) |
| Sets whether button should send an EEventRequestExit event to command observer on button up event.
|
IMPORT_C TBool | IsDimmed () const |
| Tests if the control is dimmed.
|
IMPORT_C void | SetDimmedHelpTextL (const TDesC &aHelpText) |
| Sets the help text for dimmed button.
|
TBool | HitAreaContainsL (const TPoint &aPoint, TBool aCheckHitArea) const |
| Check if point is within buttons visible area, when KAknButtonHitTest flag is enabled.
|
IMPORT_C CAknButtonState * | State () const |
| Returns the current state of the button.
|
IMPORT_C CAknButtonState * | State (const TInt aStateIndex) const |
| Returns the state of the button under specified index.
|
IMPORT_C TInt | ButtonFlags () const |
| Returns the flags of button.
|
IMPORT_C void | SetMargins (const TMargins8 &aMargins) |
| Sets button's margins.
|
IMPORT_C TInt | SetIconSize (const TSize &aSize) |
| Sets icon size for the button.
|
TBool | UsesDefaultMargins () const |
| Checks if the button uses default margins.
|
void | HideTooltipWhenAppFaded (TBool aHide) |
| Sets tooltip to hide or show itself when background faded.
|
void | CheckHitArea () |
IMPORT_C void | ResetState () |
| Resets button to unpressed state.
|
void | UseMaskedDraw (TBool aMaskedDraw) |
| Sets button to use additional masks during drawing.
|
void | RegisterResourceProvider (CAknResourceProvider *aProvider) |
| Registers resource provider.
|
void | UnregisterResourceProvider () |
| Unregisters resource provider.
|
CAknsFrameBackgroundControlContext * | BgContext () |
void | RemoveCurrentState () |
| Removes the currently active state from the button, and sets the current state to the previous one.
|
TRect | TouchArea () const |
| Returns the button touchable area.
|
Static Public Member Functions |
static IMPORT_C CAknButton * | NewL () |
| Two-phased constructor.
|
static IMPORT_C CAknButton * | NewLC () |
| Two-phased constructor.
|
static IMPORT_C CAknButton * | NewL (TResourceReader &aReader) |
| Two-phased constructor.
|
static IMPORT_C CAknButton * | NewLC (TResourceReader &aReader) |
| Two-phased constructor.
|
static IMPORT_C CAknButton * | NewL (const TInt aResourceId) |
| Two-phased constructor.
|
static IMPORT_C CAknButton * | NewLC (const TInt aResourceId) |
| Two-phased constructor.
|
static IMPORT_C CAknButton * | NewL (CGulIcon *aIcon, CGulIcon *aDimmedIcon, CGulIcon *aPressedIcon, CGulIcon *aHoverIcon, const TDesC &aText, const TDesC &aHelpText, const TInt aButtonFlags, const TInt aStateFlags) |
| Two-phased constructor.
|
static IMPORT_C CAknButton * | NewLC (CGulIcon *aIcon, CGulIcon *aDimmedIcon, CGulIcon *aPressedIcon, CGulIcon *aHoverIcon, const TDesC &aText, const TDesC &aHelpText, const TInt aFlags, const TInt aStateFlags) |
| Two-phased constructor.
|
static 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) |
| Two-phased constructor.
|
static 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) |
| Two-phased constructor.
|
Protected Member Functions |
IMPORT_C | CAknButton (const TInt aFlags) |
| C++ constructor for the one state button.
|
IMPORT_C void | ConstructL () |
| Symbian 2nd phase constructor.
|
IMPORT_C void | ConstructL (CGulIcon *aIcon, CGulIcon *aDimmedIcon, CGulIcon *aPressedIcon, CGulIcon *aHoverIcon, const TDesC &aText, const TDesC &aHelpText, const TInt aStateFlags) |
| Symbian 2nd phase constructor.
|
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) |
| Symbian 2nd phase constructor.
|
IMPORT_C void | SizeChanged () |
| Responds to size changes to sets the size and position of the contents of this control.
|
IMPORT_C void | FocusChanged (TDrawNow aDrawNow) |
| This function is called whenever a control gains or loses focus.
|
IMPORT_C void * | ExtensionInterface (TUid aInterface) |
| For future extensions.
|
IMPORT_C TInt | ChangeState (TBool aDrawNow) |
| Changes the state of the button to the next one.
|
IMPORT_C const TDesC & | GetCurrentText () const |
| Returns the text, which will be displayed inside the button for the current state.
|
IMPORT_C const CGulIcon * | GetCurrentIcon () const |
| Returns icon for the current state.
|
IMPORT_C void | ShowHelpL () |
| Shows help text for a certain period of time.
|
IMPORT_C void | HideHelp () |
| Hides help text after certain interval.
|
Protected Attributes |
CArrayPtrFlat< CAknButtonState > * | iStates |
TInt | iFlags |
TInt | iStateIndex |
TBool | iButtonPressed |
TInt | iNumberOfDragEvents |
TBool | iKeyDownReported |
CAknsFrameBackgroundControlContext * | iBgContext |
TRect | iHighlightRect |
const CFont * | iFont |
TAlignment | iVerticalAlignment |
CGraphicsContext::TTextAlign | iHorizontalAlignment |
TAknsItemID | iTextColorTableId |
TInt | iTextColorIndex |
TScaleMode | iScaleMode |
TInt | iHelpNoteWaitInterval |
TInt | iHelpNoteInViewInterval |
CAknInfoPopupNoteController * | iHelpNote |
HBufC * | iDimmedHelpText |
TBool | iShowHelp |
CPeriodic * | iKeyRepeatTimer |
TInt | iKeyRepeatDelay |
TInt | iKeyRepeatInterval |