CEikLabeledButton Class Reference

API published in: S60 1st Ed

Link against: eikcoctl.lib avkon.lib

Capability Information

Required Capabilities

None


#include <eiklbbut.h>

Inherits CAknControl.


Detailed Description

This class combines a command button with a label and a hotkey binding.

The label is used to display a text describing a hotkey. The hotkey is set via API or resource, as the ASCII code of the key that is combined with CTRL to form the hotkey combination. E.g. setting the hotkey to decimal 65 will bind CTRL+'A' as the hotkey. "CTRL+A" will be displayed in the label.

This class does not implement S60 look-and-feel and is not skinned.


Public Types

enum   TFlags { EShowHotKey = 0x01, EPlainHotKey = 0x02 }
  Options for display of the hotkey shortcut. More...

Public Member Functions

IMPORT_C  CEikLabeledButton ()
  Constructor.
IMPORT_C  ~CEikLabeledButton ()
  C++ Destructor.
IMPORT_C void  ConstructL (CEikCommandButtonBase *aButton, TInt aHotKeyCode, TInt aFlags)
  2nd Stage constructor
IMPORT_C CEikCommandButtonBase Button () const
  Access to the button component of the labeled button.
IMPORT_C CEikLabel Label () const
  Access to the label component of the labeled button.
IMPORT_C TInt  HotKeyCode () const
  Access the hotkey code.
IMPORT_C TBool  ShowsHotKey () const
  Access to hot key setting.
IMPORT_C TBool  PlainHotKey () const
  Access the key display mode.
IMPORT_C void  Animate ()
  Cause the button to animate and to generate its command ID.
IMPORT_C void  UpdateHotKey (TInt aKeyCode, TFlags aFlags)
  Change the hot key binding.
IMPORT_C TKeyResponse  OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType)
  From CCoeControl.
IMPORT_C void  ConstructFromResourceL (TResourceReader &aReader)
  From CCoeControl.
IMPORT_C TSize  MinimumSize ()
  From CCoeControl.
IMPORT_C void  SetContainerWindowL (const CCoeControl &aContainer)
  From CCoeControl.
IMPORT_C void  SetDimmed (TBool aDimmed)
  From CCoeControl.
IMPORT_C void  GetColorUseListL (CArrayFix< TCoeColorUse > &aColorUseList) const
  From CCoeControl.
IMPORT_C void  HandleResourceChange (TInt aType)
  From CCoeControl.
IMPORT_C TCoeInputCapabilities  InputCapabilities () const
  From CCoeControl.
IMPORT_C void  HandlePointerEventL (const TPointerEvent &aPointerEvent)
  From CCoeControl.

Protected Member Functions

IMPORT_C void  WriteInternalStateL (RWriteStream &aWriteStream) const
  From CCoeControl.

Member Enumeration Documentation

enum CEikLabeledButton::TFlags
 

Options for display of the hotkey shortcut.

Enumerator:
EShowHotKey 
EPlainHotKey 

Constructor & Destructor Documentation

IMPORT_C CEikLabeledButton::CEikLabeledButton  ) 
 

Constructor.

IMPORT_C CEikLabeledButton::~CEikLabeledButton  ) 
 

C++ Destructor.


Member Function Documentation

IMPORT_C void CEikLabeledButton::Animate  ) 
 

Cause the button to animate and to generate its command ID.

IMPORT_C CEikCommandButtonBase* CEikLabeledButton::Button  )  const
 

Access to the button component of the labeled button.

Returns:
Pointer to the button component. No ownership is transferred.
IMPORT_C void CEikLabeledButton::ConstructFromResourceL TResourceReader &  aReader  ) 
 

From CCoeControl.

Construct the object from resource

Parameters:
aReader  Fully constructed resource reader
IMPORT_C void CEikLabeledButton::ConstructL CEikCommandButtonBase aButton,
TInt  aHotKeyCode,
TInt  aFlags
 

2nd Stage constructor

Parameters:
aButton  Sets the button to use as the active part of the CEikLabeledButton
IMPORT_C void CEikLabeledButton::GetColorUseListL CArrayFix< TCoeColorUse > &  aColorUseList  )  const
 

From CCoeControl.

Obtain the list of colors to be used by this control

Parameters:
aColorUseList 
IMPORT_C void CEikLabeledButton::HandlePointerEventL const TPointerEvent &  aPointerEvent  ) 
 

From CCoeControl.

Handle a pointer event coming from the CONE framework

Parameters:
aPointerEvent  Event to handle
IMPORT_C void CEikLabeledButton::HandleResourceChange TInt  aType  ) 
 

From CCoeControl.

This is called when resource or layout or other display-affecting setting has changed. Change the internals of the control so that it is ready for a subsequent SizeChanged call.

Parameters:
aType  Type of resource or setting that has changed
IMPORT_C TInt CEikLabeledButton::HotKeyCode  )  const
 

Access the hotkey code.

Returns:
The hot key code
IMPORT_C TCoeInputCapabilities CEikLabeledButton::InputCapabilities  )  const
 

From CCoeControl.

Report the input capabilities of the control

Returns:
A copy of the object holding the capabilities of this control
IMPORT_C CEikLabel* CEikLabeledButton::Label  )  const
 

Access to the label component of the labeled button.

Returns:
Pointer to the CEikLabel component. No ownership is transferred.
IMPORT_C TSize CEikLabeledButton::MinimumSize  ) 
 

From CCoeControl.

Reports to the caller the minimum size that the control can be, given its contents.

Returns:
The minimum size
IMPORT_C TKeyResponse CEikLabeledButton::OfferKeyEventL const TKeyEvent &  aKeyEvent,
TEventCode  aType
 

From CCoeControl.

CONE framework is requesting that the passed-in key be handled.

Parameters:
aKeyEvent  Wserv event type
aKeyCode  Key code
IMPORT_C TBool CEikLabeledButton::PlainHotKey  )  const
 

Access the key display mode.

Returns:
EFalse if the key mode is not set to Plain
IMPORT_C void CEikLabeledButton::SetContainerWindowL const CCoeControl &  aContainer  ) 
 

From CCoeControl.

Sets the control whose window is to be used as a container for this control

Parameters:
aContainer  control
IMPORT_C void CEikLabeledButton::SetDimmed TBool  aDimmed  ) 
 

From CCoeControl.

Sets the button to be inactive. The button is drawn with a dimmed effect.

Parameters:
aDimmed  If not EFalse, set the state to dimmed. Otherwise set to non-dimmed
IMPORT_C TBool CEikLabeledButton::ShowsHotKey  )  const
 

Access to hot key setting.

Returns:
EFase iff ShowsHotKeys is not set
IMPORT_C void CEikLabeledButton::UpdateHotKey TInt  aKeyCode,
TFlags  aFlags
 

Change the hot key binding.

Parameters:
aKeyCode  Key to use (along with pressing CTRL) as the hotkey
IMPORT_C void CEikLabeledButton::WriteInternalStateL RWriteStream &  aWriteStream  )  const [protected]
 

From CCoeControl.

Serialize the state of the control

Parameters:
aWriteStream  Output stream for the serialization

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

Copyright © Nokia Corporation 2001-2008
Back to top