CAknButtonState Class Reference

#include <mw/aknbutton.h>

Link against: eikcoctl.lib

class CAknButtonState : public CBase

Inherits from

  • CAknButtonState
    Protected Attributes
    CGulIcon *iDimmedIcon
    CAknButtonStateExtension *iExtension
    TInt iFlags
    HBufC *iHelpText
    CGulIcon *iHoverIcon
    CGulIcon *iIcon
    CGulIcon *iPressedIcon
    HBufC *iText
    Public Member Functions
    ~CAknButtonState()
    IMPORT_C const CGulIcon *DimmedIcon()
    IMPORT_C TIntFlags()
    IMPORT_C const TDesC &HelpText()
    IMPORT_C const CGulIcon *HoverIcon()
    IMPORT_C const CGulIcon *Icon()
    IMPORT_C const CGulIcon *PressedIcon()
    IMPORT_C voidSetDimmedIcon(CGulIcon *)
    IMPORT_C voidSetFlags(const TInt)
    IMPORT_C voidSetHelpTextL(const TDesC &)
    IMPORT_C voidSetHoverIcon(CGulIcon *)
    IMPORT_C voidSetIcon(CGulIcon *)
    IMPORT_C voidSetPressedIcon(CGulIcon *)
    IMPORT_C voidSetTextL(const TDesC &)
    IMPORT_C const TDesC &Text()
    voidUpdateExtensionInfoL(TInt)
    voidUpdateIconL(const TDesC &, const TInt, const TInt, const TInt, const TInt, const TInt, const TInt, const TInt, const TInt, const TAknsItemID &, const TAknsItemID &, const TAknsItemID &, const TAknsItemID &)
    Protected Member Functions
    CAknButtonState(const TInt)
    virtual IMPORT_C voidConstructFromResourceL(TResourceReader &)
    IMPORT_C voidConstructL(CGulIcon *, CGulIcon *, CGulIcon *, CGulIcon *, const TDesC &, const TDesC &)
    IMPORT_C voidConstructL(const TDesC &, const TInt, const TInt, const TInt, const TInt, const TInt, const TInt, const TInt, const TInt, const TDesC &, const TDesC &, const TAknsItemID &, const TAknsItemID &, const TAknsItemID &, const TAknsItemID &)
    voidHandleResourceChange(TInt)
    IMPORT_C TBoolHasHelp()
    IMPORT_C TBoolHasText()
    voidSetIconScaleMode(const TScaleMode)
    virtual IMPORT_C voidSizeChanged(const TRect &, TScaleMode)
    Inherited Functions
    CBase::CBase()
    CBase::Delete(CBase *)
    CBase::Extension_(TUint,TAny *&,TAny *)
    CBase::operator new(TUint)
    CBase::operator new(TUint,TAny *)
    CBase::operator new(TUint,TLeave)
    CBase::operator new(TUint,TLeave,TUint)
    CBase::operator new(TUint,TUint)
    CBase::~CBase()

    Detailed Description

    Class which represents one of the button states.

    Since
    Series 60 3.1

    Member Attribute Documentation

    iDimmedIcon

    CGulIcon *iDimmedIcon[protected]

    iExtension

    CAknButtonStateExtension *iExtension[protected]

    iFlags

    TInt iFlags[protected]

    iHelpText

    HBufC *iHelpText[protected]

    iHoverIcon

    CGulIcon *iHoverIcon[protected]

    iIcon

    CGulIcon *iIcon[protected]

    iPressedIcon

    CGulIcon *iPressedIcon[protected]

    iText

    HBufC *iText[protected]

    Constructor & Destructor Documentation

    CAknButtonState ( const TInt )

    IMPORT_CCAknButtonState(const TIntaFlags)[protected]

    Constructor.

    ParameterDescription
    aFlagsThe flags for the button state

    ~CAknButtonState ( )

    IMPORT_C~CAknButtonState()

    Destructor.

    Member Function Documentation

    ConstructFromResourceL ( TResourceReader & )

    IMPORT_C voidConstructFromResourceL(TResourceReader &aReader)[protected, virtual]

    Constructs controls from a resource file.

    ParameterDescription
    aReaderThe resource reader with which to access the control's resource values.

    ConstructL ( CGulIcon *, CGulIcon *, CGulIcon *, CGulIcon *, const TDesC &, const TDesC & )

    IMPORT_C voidConstructL(CGulIcon *aIcon,
    CGulIcon *aDimmedIcon,
    CGulIcon *aPressedIcon,
    CGulIcon *aHoverIcon,
    const TDesC &aText,
    const TDesC &aHelpText
    )[protected]

    Symbian 2nd phase constructor.

    ParameterDescription
    aIconThe icon for the normal state. Takes ownership.
    aDimmedIconThe icon for the dimmed state. Takes ownership.
    aPressedIconThe icon for the pressed down. Takes ownership.
    aHoverIconThe icon for the hover state. Takes ownership.
    aTextThe text inside the button.
    aHelpTextThe text for the tooltip.

    ConstructL ( const TDesC &, const TInt, const TInt, const TInt, const TInt, const TInt, const TInt, const TInt, const TInt, const TDesC &, const TDesC &, const TAknsItemID &, const TAknsItemID &, const TAknsItemID &, const TAknsItemID & )

    IMPORT_C voidConstructL(const TDesC &aFilePath,
    const TIntaBmpId,
    const TIntaMaskId,
    const TIntaDimmedBmpId,
    const TIntaDimmedMaskId,
    const TIntaPressedBmpId,
    const TIntaPressedMaskId,
    const TIntaHoverBmpId,
    const TIntaHoverMaskId,
    const TDesC &aText,
    const TDesC &aHelpText,
    const TAknsItemID &aId =  KAknsIIDNone ,
    const TAknsItemID &aDimmedId =  KAknsIIDNone ,
    const TAknsItemID &aPressedId =  KAknsIIDNone ,
    const TAknsItemID &aHoverId =  KAknsIIDNone
    )[protected]

    Symbian 2nd phase constructor.

    ParameterDescription
    aFilePathThe path to the file which contains icons.
    aBmpIdThe bitmap ID for the normal state icon.
    aMaskIdThe mask ID for the normal state icon.
    aDimmedBmpIdThe bitmap ID for the dimmed state icon.
    aDimmedMaskIdThe mask ID for the dimmed state icon.
    aPressedBmpIdThe bitmap ID for the pressed down state.
    aPressedMaskIdThe mask ID for the pressed down state.
    aHoverBmpIdThe bitmap ID for the hover state icon.
    aHoverMaskIdThe mask ID for the hover state icon.
    aTextThe text inside the button.
    aHelpTextThe text for the tooltip.
    aIdItem ID of the masked bitmap to be created for skin specific icon.
    aDimmedIdItem ID of the dimmed masked bitmap to be created for skin specific icon.
    aPressedIdItem ID of the pressed masked bitmap to be created for skin specific icon.
    aHoverIdItem ID of the masked hover bitmap to be created for skin specific icon.

    DimmedIcon ( )

    IMPORT_C const CGulIcon *DimmedIcon()const

    Provides the icon for the dimmed state.

    Returns: The icon for the dimmed state.

    Flags ( )

    IMPORT_C TIntFlags()const

    Provides the flags for the state.

    Returns: The state flags.

    HandleResourceChange ( TInt )

    voidHandleResourceChange(TIntaType)[protected]

    Handles changes in state's environment.

    Since
    S60 3.2.
    ParameterDescription
    aTypeResource change's type.

    HasHelp ( )

    IMPORT_C TBoolHasHelp()const [protected]

    Returns: ETrue if the button has valid tooltip text (not empty and not space).

    HasText ( )

    IMPORT_C TBoolHasText()const [protected]

    Returns: ETrue if the button has valid text (not empty and not space).

    HelpText ( )

    IMPORT_C const TDesC &HelpText()const

    Provides the text inside the help note.

    Returns: The tooltip text.

    HoverIcon ( )

    IMPORT_C const CGulIcon *HoverIcon()const

    Provides the icon for the hover state.

    Returns: The icon for the hover state.

    Icon ( )

    IMPORT_C const CGulIcon *Icon()const

    Provides the icon for the normal state.

    Returns: The icon for the normal state.

    PressedIcon ( )

    IMPORT_C const CGulIcon *PressedIcon()const

    Provides the icon for the pressed down (not released) state.

    Returns: The icon for the pressed down (not released) state.

    SetDimmedIcon ( CGulIcon * )

    IMPORT_C voidSetDimmedIcon(CGulIcon *aDimmedIcon)

    Sets the icon for the dimmed state. Takes ownership.

    ParameterDescription
    aDimmedIconThe icon for the dimmed state.

    SetFlags ( const TInt )

    IMPORT_C voidSetFlags(const TIntaFlags)

    Sets the flags for the state.

    ParameterDescription
    aFlagsThe flags for the state.

    SetHelpTextL ( const TDesC & )

    IMPORT_C voidSetHelpTextL(const TDesC &aHelpText)

    Sets the text inside the help note.

    ParameterDescription
    aHelpTextThe text inside the tooltip.

    SetHoverIcon ( CGulIcon * )

    IMPORT_C voidSetHoverIcon(CGulIcon *aHoverIcon)

    Sets the icon for the hover state. Takes ownership.

    ParameterDescription
    aHoverIconThe icon for the hover state.

    SetIcon ( CGulIcon * )

    IMPORT_C voidSetIcon(CGulIcon *aIcon)

    Sets the icon for the normal state. Takes ownership.

    ParameterDescription
    aIconThe icon for the normal state.

    SetIconScaleMode ( const TScaleMode )

    voidSetIconScaleMode(const TScaleModeaScaleMode)[protected]

    Sets default scaling mode.

    Since
    S60 3.2
    ParameterDescription
    aScaleModeScaling mode.

    SetPressedIcon ( CGulIcon * )

    IMPORT_C voidSetPressedIcon(CGulIcon *aPressedIcon)

    Sets the icon for the pressed down state. Takes ownership.

    ParameterDescription
    aPressedIconThe icon for the pressed down state.

    SetTextL ( const TDesC & )

    IMPORT_C voidSetTextL(const TDesC &aText)

    Sets the text inside the button.

    ParameterDescription
    aTextThe text inside the button.

    SizeChanged ( const TRect &, TScaleMode )

    IMPORT_C voidSizeChanged(const TRect &aRect,
    TScaleModeaScaleMode
    )[protected, virtual]

    Updates the size of icons. Called from CAknButton::SizeChanged() function.

    ParameterDescription
    aRectThe new rectangle for the icons.
    aScaleModeThe scale mode which was set for the button.

    Text ( )

    IMPORT_C const TDesC &Text()const

    Provides the text inside the button.

    Returns: The button text.

    UpdateExtensionInfoL ( TInt )

    voidUpdateExtensionInfoL(TIntaResource)

    UpdateIconL ( const TDesC &, const TInt, const TInt, const TInt, const TInt, const TInt, const TInt, const TInt, const TInt, const TAknsItemID &, const TAknsItemID &, const TAknsItemID &, const TAknsItemID & )

    voidUpdateIconL(const TDesC &aFilePath,
    const TIntaBmpId,
    const TIntaMaskId,
    const TIntaDimmedBmpId,
    const TIntaDimmedMaskId,
    const TIntaPressedBmpId,
    const TIntaPressedMaskId,
    const TIntaHoverBmpId,
    const TIntaHoverMaskId,
    const TAknsItemID &aId =  KAknsIIDNone ,
    const TAknsItemID &aDimmedId =  KAknsIIDNone ,
    const TAknsItemID &aPressedId =  KAknsIIDNone ,
    const TAknsItemID &aHoverId =  KAknsIIDNone
    )

    Sets the icon for the normal state