CAknButtonState Class Reference
class CAknButtonState : public CBase
|
Class which represents one of the button states.
eikcoctl.lib
-
Since
-
Series 60 3.1
Public Member Functions
|
|
~CAknButtonState
()
|
IMPORT_C const
CGulIcon
*
|
DimmedIcon
()
|
IMPORT_C
TInt
|
Flags
()
|
IMPORT_C const
TDesC
&
|
HelpText
()
|
IMPORT_C const
CGulIcon
*
|
HoverIcon
()
|
IMPORT_C const
CGulIcon
*
|
Icon
()
|
IMPORT_C const
CGulIcon
*
|
PressedIcon
()
|
IMPORT_C void
|
SetDimmedIcon
(
CGulIcon
*)
|
IMPORT_C void
|
SetFlags
(const
TInt
)
|
IMPORT_C void
|
SetHelpTextL
(const
TDesC
&)
|
IMPORT_C void
|
SetHoverIcon
(
CGulIcon
*)
|
IMPORT_C void
|
SetIcon
(
CGulIcon
*)
|
IMPORT_C void
|
SetPressedIcon
(
CGulIcon
*)
|
IMPORT_C void
|
SetTextL
(const
TDesC
&)
|
IMPORT_C const
TDesC
&
|
Text
()
|
void
|
UpdateExtensionInfoL
(
TInt
)
|
void
|
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
&)
|
Protected Member Functions
|
|
CAknButtonState
(const
TInt
)
|
IMPORT_C void
|
ConstructFromResourceL
(
TResourceReader
&)
|
IMPORT_C void
|
ConstructL
(
CGulIcon
*,
CGulIcon
*,
CGulIcon
*,
CGulIcon
*, const
TDesC
&, const
TDesC
&)
|
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
TAknsItemID
&, const
TAknsItemID
&, const
TAknsItemID
&, const
TAknsItemID
&)
|
void
|
HandleResourceChange
(
TInt
)
|
IMPORT_C
TBool
|
HasHelp
()
|
IMPORT_C
TBool
|
HasText
()
|
void
|
SetIconScaleMode
(const
TScaleMode
)
|
IMPORT_C void
|
SizeChanged
(const
TRect
&,
TScaleMode
)
|
Constructor & Destructor Documentation
CAknButtonState(const TInt)
IMPORT_C
|
CAknButtonState
|
(
|
const
TInt
|
aFlags
|
)
|
[protected]
|
Parameters
const
TInt
aFlags
|
The flags for the button state
|
~CAknButtonState()
IMPORT_C
|
~CAknButtonState
|
(
|
)
|
|
Member Functions Documentation
ConstructFromResourceL(TResourceReader &)
IMPORT_C void
|
ConstructFromResourceL
|
(
|
TResourceReader
&
|
aReader
|
)
|
[protected, virtual]
|
Constructs controls from a resource file.
Parameters
TResourceReader
& aReader
|
The resource reader with which to access the control's resource values.
|
ConstructL(CGulIcon *, CGulIcon *, CGulIcon *, CGulIcon *, const TDesC &, const TDesC &)
Symbian 2nd phase constructor.
Parameters
CGulIcon
* aIcon
|
The icon for the normal state. Takes ownership.
|
CGulIcon
* aDimmedIcon
|
The icon for the dimmed state. Takes ownership.
|
CGulIcon
* aPressedIcon
|
The icon for the pressed down. Takes ownership.
|
CGulIcon
* aHoverIcon
|
The icon for the hover state. Takes ownership.
|
const
TDesC
& aText
|
The text inside the button.
|
const
TDesC
& aHelpText
|
The 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 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
TAknsItemID
&
|
aId =
KAknsIIDNone
,
|
|
const
TAknsItemID
&
|
aDimmedId =
KAknsIIDNone
,
|
|
const
TAknsItemID
&
|
aPressedId =
KAknsIIDNone
,
|
|
const
TAknsItemID
&
|
aHoverId =
KAknsIIDNone
|
|
)
|
[protected]
|
Symbian 2nd phase constructor.
Parameters
const
TDesC
& aFilePath
|
The path to the file which contains icons.
|
const
TInt
aBmpId
|
The bitmap ID for the normal state icon.
|
const
TInt
aMaskId
|
The mask ID for the normal state icon.
|
const
TInt
aDimmedBmpId
|
The bitmap ID for the dimmed state icon.
|
const
TInt
aDimmedMaskId
|
The mask ID for the dimmed state icon.
|
const
TInt
aPressedBmpId
|
The bitmap ID for the pressed down state.
|
const
TInt
aPressedMaskId
|
The mask ID for the pressed down state.
|
const
TInt
aHoverBmpId
|
The bitmap ID for the hover state icon.
|
const
TInt
aHoverMaskId
|
The mask ID for the hover state icon.
|
const
TDesC
& aText
|
The text inside the button.
|
const
TDesC
& aHelpText
|
The text for the tooltip.
|
const
TAknsItemID
& aId =
KAknsIIDNone
|
Item ID of the masked bitmap to be created for skin specific icon.
|
const
TAknsItemID
& aDimmedId =
KAknsIIDNone
|
Item ID of the dimmed masked bitmap to be created for skin specific icon.
|
const
TAknsItemID
& aPressedId =
KAknsIIDNone
|
Item ID of the pressed masked bitmap to be created for skin specific icon.
|
const
TAknsItemID
& aHoverId =
KAknsIIDNone
|
Item ID of the masked hover bitmap to be created for skin specific icon.
|
CreateButtonIconL(CGulIcon *&, const TDesC &, TInt, TInt, const TAknsItemID &)
Creates one icon based on the specified file path and IDs.
Parameters
CGulIcon
*& aIcon
|
The icon object which is created and returned. Will be deleted if it is not NULL on entry.
|
const
TDesC
& aFilePath
|
The path to the file which contains icons.
|
TInt
aBmpId
|
The bitmap ID for the icon.
|
TInt
aMaskId
|
The mask ID for the icon.
|
const
TAknsItemID
& aId =
KAknsIIDNone
|
Item ID of the masked bitmap to be created for skin specific icon.
|
DimmedIcon()
IMPORT_C const
CGulIcon
*
|
DimmedIcon
|
(
|
)
|
const
|
Provides the icon for the dimmed state.
Extension()
CAknButtonStateExtension *
|
Extension
|
(
|
)
|
const [private]
|
Flags()
IMPORT_C
TInt
|
Flags
|
(
|
)
|
const
|
Provides the flags for the state.
FlagsChanged()
TBool
|
FlagsChanged
|
(
|
)
|
[private]
|
Tells if frame update is needed, it is needed when the flag KAknButtonStateHasLatchedFrame has changed.
HandleResourceChange(TInt)
void
|
HandleResourceChange
|
(
|
TInt
|
aType
|
)
|
[protected]
|
Handles changes in state's environment.
Parameters
TInt
aType
|
Resource change's type.
|
HasHelp()
IMPORT_C
TBool
|
HasHelp
|
(
|
)
|
const [protected]
|
HasText()
IMPORT_C
TBool
|
HasText
|
(
|
)
|
const [protected]
|
HelpText()
IMPORT_C const
TDesC
&
|
HelpText
|
(
|
)
|
const
|
Provides the text inside the help note.
HoverIcon()
IMPORT_C const
CGulIcon
*
|
HoverIcon
|
(
|
)
|
const
|
Provides the icon for the hover state.
Icon()
IMPORT_C const
CGulIcon
*
|
Icon
|
(
|
)
|
const
|
Provides the icon for the normal state.
LoadButtonIcon(CGulIcon *&)
void
|
LoadButtonIcon
|
(
|
CGulIcon
*&
|
aIcon
|
)
|
const [private]
|
Loads one icon based on the specified file path and IDs. If the icon is already loaded it is deleted and replaced with a reloaded copy.
Parameters
CGulIcon
*& aIcon
|
The icon object which is created and returned. Will be deleted if it is not NULL on entry.
|
PressedIcon()
IMPORT_C const
CGulIcon
*
|
PressedIcon
|
(
|
)
|
const
|
Provides the icon for the pressed down (not released) state.
ReplaceIcon(CGulIcon *&, CGulIcon *)
Replaces the given icon with a new one. If the original icon had its size set then the new icon is scaled to that size.
ResetFlagsChanged()
void
|
ResetFlagsChanged
|
(
|
)
|
[private]
|
Frame has been updated. No need to update anymore.
ResetTextChanged()
void
|
ResetTextChanged
|
(
|
)
|
[private]
|
Visual text has been updated, so iTextChanged can be set to EFalse.
ScaleIcons(const TSize &, TScaleMode)
SetDimmedIcon(CGulIcon *)
IMPORT_C void
|
SetDimmedIcon
|
(
|
CGulIcon
*
|
aDimmedIcon
|
)
|
|
Sets the icon for the dimmed state. Takes ownership.
Parameters
CGulIcon
* aDimmedIcon
|
The icon for the dimmed state.
|
SetFlags(const TInt)
IMPORT_C void
|
SetFlags
|
(
|
const
TInt
|
aFlags
|
)
|
|
Sets the flags for the state.
Parameters
const
TInt
aFlags
|
The flags for the state.
|
SetGeneratedDimmedIcon(TBool)
void
|
SetGeneratedDimmedIcon
|
(
|
TBool
|
aDimmedIconCreatedByButton
|
)
|
[private]
|
Parameters
TBool
aDimmedIconCreatedByButton
|
ETrue, if the dimmed icon of the state is created by owning Button
|
SetHelpTextL(const TDesC &)
IMPORT_C void
|
SetHelpTextL
|
(
|
const
TDesC
&
|
aHelpText
|
)
|
|
Sets the text inside the help note.
Parameters
const
TDesC
& aHelpText
|
The text inside the tooltip.
|
SetHoverIcon(CGulIcon *)
IMPORT_C void
|
SetHoverIcon
|
(
|
CGulIcon
*
|
aHoverIcon
|
)
|
|
Sets the icon for the hover state. Takes ownership.
Parameters
CGulIcon
* aHoverIcon
|
The icon for the hover state.
|
SetIcon(CGulIcon *)
IMPORT_C void
|
SetIcon
|
(
|
CGulIcon
*
|
aIcon
|
)
|
|
Sets the icon for the normal state. Takes ownership.
Parameters
CGulIcon
* aIcon
|
The icon for the normal state.
|
SetIconScaleMode(const TScaleMode)
void
|
SetIconScaleMode
|
(
|
const
TScaleMode
|
aScaleMode
|
)
|
[protected]
|
Sets default scaling mode.
SetPressedIcon(CGulIcon *)
IMPORT_C void
|
SetPressedIcon
|
(
|
CGulIcon
*
|
aPressedIcon
|
)
|
|
Sets the icon for the pressed down state. Takes ownership.
Parameters
CGulIcon
* aPressedIcon
|
The icon for the pressed down state.
|
SetTextL(const TDesC &)
IMPORT_C void
|
SetTextL
|
(
|
const
TDesC
&
|
aText
|
)
|
|
Sets the text inside the button.
Parameters
const
TDesC
& aText
|
The text inside the button.
|
SizeChanged(const TRect &, TScaleMode)
IMPORT_C void
|
SizeChanged
|
(
|
const
TRect
&
|
aRect,
|
|
TScaleMode
|
aScaleMode
|
|
)
|
[protected, virtual]
|
Parameters
const
TRect
& aRect
|
The new rectangle for the icons.
|
TScaleMode
aScaleMode
|
The scale mode which was set for the button.
|
Text()
IMPORT_C const
TDesC
&
|
Text
|
(
|
)
|
const
|
Provides the text inside the button.
TextChanged()
TBool
|
TextChanged
|
(
|
)
|
[private]
|
Checks if text has changed.
UpdateExtensionInfoL(TInt)
void
|
UpdateExtensionInfoL
|
(
|
TInt
|
aResource
|
)
|
|
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 &)
void
|
UpdateIconL
|
(
|
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
TAknsItemID
&
|
aId =
KAknsIIDNone
,
|
|
const
TAknsItemID
&
|
aDimmedId =
KAknsIIDNone
,
|
|
const
TAknsItemID
&
|
aPressedId =
KAknsIIDNone
,
|
|
const
TAknsItemID
&
|
aHoverId =
KAknsIIDNone
|
|
)
|
|
Sets the icon for the normal state
Member Data Documentation
CAknButtonStateExtension * iExtension
CAknButtonStateExtension *
|
iExtension
|
[protected]
|
HBufC * iHelpText
HBufC
*
|
iHelpText
|
[protected]
|
HBufC * iText
HBufC
*
|
iText
|
[protected]
|
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.