CAknButtonState Class Reference

Link against: eikcoctl.lib


#include <AknButton.h>

Detailed Description

Class which represents one of the button states.
Dll eikcoctl.lib
Since:
Series 60 3.1

Public Member Functions

IMPORT_C  ~CAknButtonState ()
  Destructor.
IMPORT_C const CGulIcon *  Icon () const
  Provides the icon for the normal state.
IMPORT_C const CGulIcon *  DimmedIcon () const
  Provides the icon for the dimmed state.
IMPORT_C const CGulIcon *  PressedIcon () const
  Provides the icon for the pressed down (not released) state.
IMPORT_C const CGulIcon *  HoverIcon () const
  Provides the icon for the hover state.
IMPORT_C const TDesC &  Text () const
  Provides the text inside the button.
IMPORT_C const TDesC &  HelpText () const
  Provides the text inside the help note.
IMPORT_C TInt  Flags () const
  Provides the flags for the state.
IMPORT_C void  SetIcon (CGulIcon *aIcon)
  Sets the icon for the normal state.
IMPORT_C void  SetDimmedIcon (CGulIcon *aDimmedIcon)
  Sets the icon for the dimmed state.
IMPORT_C void  SetPressedIcon (CGulIcon *aPressedIcon)
  Sets the icon for the pressed down state.
IMPORT_C void  SetHoverIcon (CGulIcon *aHoverIcon)
  Sets the icon for the hover state.
IMPORT_C void  SetTextL (const TDesC &aText)
  Sets the text inside the button.
IMPORT_C void  SetHelpTextL (const TDesC &aHelpText)
  Sets the text inside the help note.
IMPORT_C void  SetFlags (const TInt aFlags)
  Sets the flags for the state.
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.

Protected Member Functions

IMPORT_C  CAknButtonState (const TInt aFlags)
  Constructor.
IMPORT_C void  ConstructL (CGulIcon *aIcon, CGulIcon *aDimmedIcon, CGulIcon *aPressedIcon, CGulIcon *aHoverIcon, const TDesC &aText, const TDesC &aHelpText)
  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 TAknsItemID &aId=KAknsIIDNone, const TAknsItemID &aDimmedId=KAknsIIDNone, const TAknsItemID &aPressedId=KAknsIIDNone, const TAknsItemID &aHoverId=KAknsIIDNone)
  Symbian 2nd phase constructor.
virtual IMPORT_C void  ConstructFromResourceL (TResourceReader &aReader)
  Constructs controls from a resource file.
virtual IMPORT_C void  SizeChanged (const TRect &aRect, TScaleMode aScaleMode)
  Updates the size of icons.
IMPORT_C TBool  HasText () const
IMPORT_C TBool  HasHelp () const
void  HandleResourceChange (TInt aType)
  Handles changes in state's environment.
void  SetIconScaleMode (const TScaleMode aScaleMode)
  Sets default scaling mode.

Protected Attributes

CGulIcon *  iIcon
CGulIcon *  iDimmedIcon
CGulIcon *  iPressedIcon
CGulIcon *  iHoverIcon
HBufC *  iText
HBufC *  iHelpText
TInt  iFlags
CAknButtonStateExtension *  iExtension

Friends

class  CAknButton

Constructor & Destructor Documentation

IMPORT_C CAknButtonState::~CAknButtonState  ) 
 

Destructor.

IMPORT_C CAknButtonState::CAknButtonState const TInt  aFlags  )  [protected]
 

Constructor.

Parameters:
aFlags  The flags for the button state

Member Function Documentation

virtual IMPORT_C void CAknButtonState::ConstructFromResourceL TResourceReader &  aReader  )  [protected, virtual]
 

Constructs controls from a resource file.

Parameters:
aReader  The resource reader with which to access the control's resource values.
IMPORT_C void CAknButtonState::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:
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.
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 CAknButtonState::ConstructL CGulIcon *  aIcon,
CGulIcon *  aDimmedIcon,
CGulIcon *  aPressedIcon,
CGulIcon *  aHoverIcon,
const TDesC &  aText,
const TDesC &  aHelpText
[protected]
 

Symbian 2nd phase constructor.

Parameters:
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.
IMPORT_C const CGulIcon* CAknButtonState::DimmedIcon  )  const
 

Provides the icon for the dimmed state.

Returns:
The icon for the dimmed state.
IMPORT_C TInt CAknButtonState::Flags  )  const
 

Provides the flags for the state.

Returns:
The state flags.
void CAknButtonState::HandleResourceChange TInt  aType  )  [protected]
 

Handles changes in state's environment.

Since:
S60 3.2.
Parameters:
aType  Resource change's type.
IMPORT_C TBool CAknButtonState::HasHelp  )  const [protected]
 
Returns:
ETrue if the button has valid tooltip text (not empty and not space).
IMPORT_C TBool CAknButtonState::HasText  )  const [protected]
 
Returns:
ETrue if the button has valid text (not empty and not space).
IMPORT_C const TDesC& CAknButtonState::HelpText  )  const
 

Provides the text inside the help note.

Returns:
The tooltip text.
IMPORT_C const CGulIcon* CAknButtonState::HoverIcon  )  const
 

Provides the icon for the hover state.

Returns:
The icon for the hover state.
IMPORT_C const CGulIcon* CAknButtonState::Icon  )  const
 

Provides the icon for the normal state.

Returns:
The icon for the normal state.
IMPORT_C const CGulIcon* CAknButtonState::PressedIcon  )  const
 

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

Returns:
The icon for the pressed down (not released) state.
IMPORT_C void CAknButtonState::SetDimmedIcon CGulIcon *  aDimmedIcon  ) 
 

Sets the icon for the dimmed state.

Takes ownership.

Parameters:
aDimmedIcon  The icon for the dimmed state.
IMPORT_C void CAknButtonState::SetFlags const TInt  aFlags  ) 
 

Sets the flags for the state.

Parameters:
aFlags  The flags for the state.
IMPORT_C void CAknButtonState::SetHelpTextL const TDesC &  aHelpText  ) 
 

Sets the text inside the help note.

Parameters:
aHelpText  The text inside the tooltip.
IMPORT_C void CAknButtonState::SetHoverIcon CGulIcon *  aHoverIcon  ) 
 

Sets the icon for the hover state.

Takes ownership.

Parameters:
aHoverIcon  The icon for the hover state.
IMPORT_C void CAknButtonState::SetIcon CGulIcon *  aIcon  ) 
 

Sets the icon for the normal state.

Takes ownership.

Parameters:
aIcon  The icon for the normal state.
void CAknButtonState::SetIconScaleMode const TScaleMode  aScaleMode  )  [protected]
 

Sets default scaling mode.

Since:
S60 3.2
Parameters:
aScaleMode  Scaling mode.
IMPORT_C void CAknButtonState::SetPressedIcon CGulIcon *  aPressedIcon  ) 
 

Sets the icon for the pressed down state.

Takes ownership.

Parameters:
aPressedIcon  The icon for the pressed down state.
IMPORT_C void CAknButtonState::SetTextL const TDesC &  aText  ) 
 

Sets the text inside the button.

Parameters:
aText  The text inside the button.
virtual IMPORT_C void CAknButtonState::SizeChanged const TRect &  aRect,
TScaleMode  aScaleMode
[protected, virtual]
 

Updates the size of icons.

Called from CAknButton::SizeChanged() function.

Parameters:
aRect  The new rectangle for the icons.
aScaleMode  The scale mode which was set for the button.
IMPORT_C const TDesC& CAknButtonState::Text  )  const
 

Provides the text inside the button.

Returns:
The button text.
void CAknButtonState::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.

Parameters:
aFlags  The flags for the state.

Friends And Related Function Documentation

friend class CAknButton [friend]
 

Field Documentation

CGulIcon* CAknButtonState::iDimmedIcon [protected]
 
CAknButtonStateExtension* CAknButtonState::iExtension [protected]
 
TInt CAknButtonState::iFlags [protected]
 
HBufC* CAknButtonState::iHelpText [protected]
 
CGulIcon* CAknButtonState::iHoverIcon [protected]
 
CGulIcon* CAknButtonState::iIcon [protected]
 
CGulIcon* CAknButtonState::iPressedIcon [protected]
 
HBufC* CAknButtonState::iText [protected]
 

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2007
Back to top