CEikButtonBase Class Reference

API published in: S60 1st Ed

Link against: eikcoctl.lib avkon.lib

Capability Information

Required Capabilities

None


#include <eikbutb.h>

Inherits CEikBorderedControl.

Inherited by CEikCommandButtonBase, and CEikScrollButton.


Detailed Description

Base class for button controls.

This class defines behavior available to all button classes.


Public Types

enum   TState { EClear = 0, ESet = 1, EIndeterminate = 2 }
  States that the button can be in. More...

Public Member Functions

IMPORT_C  CEikButtonBase ()
  C++ constructor.
IMPORT_C  ~CEikButtonBase ()
  C++ destructor.
IMPORT_C TState  State () const
  Access the state.
IMPORT_C void  SetState (TState aState)
  Set the state of the button.
virtual IMPORT_C void  Animate ()
  Cause the button to animate.
IMPORT_C void  SetCoordinator (TEikButtonCoordinator *aButCoord)
  Sets the coordinator for the button.
IMPORT_C void  SetBehavior (TButtonBehavior aBehavior)
  Sets the button’s behaviour.
IMPORT_C void  SetIgnoreNextPointerUp ()
  Sets the control to ignore the next pointer up event.
virtual IMPORT_C void  GetColorUseListL (CArrayFix< TCoeColorUse > &aColorUseList) const
  From CCoeControl.
virtual IMPORT_C void  HandleResourceChange (TInt aType)
  From CCoeControl.
IMPORT_C void  WriteInternalStateL (RWriteStream &aWriteStream) const
  From CCoeControl.
IMPORT_C void  HandlePointerEventL (const TPointerEvent &aPointerEvent)
  From CCoeControl.
IMPORT_C TKeyResponse  OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType)
  From CCoeControl.
IMPORT_C TCoeInputCapabilities  InputCapabilities () const
  From CCoeControl.

Protected Types

enum   TDrawState {
  EDrawClear = SLafButtonBase::EDrawClear, EDrawSet = SLafButtonBase::EDrawSet, EDrawIndeterminate = SLafButtonBase::EDrawIndeterminate, EDrawClearPressed = SLafButtonBase::EDrawClearPressed,
  EDrawSetPressed = SLafButtonBase::EDrawSetPressed, EDrawIndeterminatePressed = SLafButtonBase::EDrawIndeterminatePressed
}
  The draw state of the button. More...

Protected Member Functions

IMPORT_C void  SetReportOnPointerDown ()
  Set whether the control should report on pointer down.
IMPORT_C TDrawState  DrawState () const
  Access the draw state defined in SLafButtonBase.
IMPORT_C TBool  IsPressed () const
  Returns whether the button is currently pressed.
IMPORT_C void  SetAllowTristate ()
  Sets the button to be tri-state.
IMPORT_C void  CopyDrawStateTo (CEikButtonBase *aTargetButton) const
  Transfers the draw state to the referenced button.

Protected Attributes

TInt  iButFlags
  Flags for the button class hierarchy.

Member Enumeration Documentation

enum CEikButtonBase::TDrawState [protected]
 

The draw state of the button.

Enumerator:
EDrawClear 
EDrawSet 
EDrawIndeterminate 
EDrawClearPressed 
EDrawSetPressed 
EDrawIndeterminatePressed 
enum CEikButtonBase::TState
 

States that the button can be in.

Enumerator:
EClear 
ESet 
EIndeterminate 

Constructor & Destructor Documentation

IMPORT_C CEikButtonBase::CEikButtonBase  ) 
 

C++ constructor.

IMPORT_C CEikButtonBase::~CEikButtonBase  ) 
 

C++ destructor.


Member Function Documentation

virtual IMPORT_C void CEikButtonBase::Animate  )  [virtual]
 

Cause the button to animate.

The appearance changes to the "pressed in" state. Subsequent behaviour depends upon the SetBehavior setting

Reimplemented in CEikMenuButton.

IMPORT_C void CEikButtonBase::CopyDrawStateTo CEikButtonBase aTargetButton  )  const [protected]
 

Transfers the draw state to the referenced button.

Parameters:
aTargetButton  button to transfer the
IMPORT_C TDrawState CEikButtonBase::DrawState  )  const [protected]
 

Access the draw state defined in SLafButtonBase.

Returns:
The draw state of the control
virtual IMPORT_C void CEikButtonBase::GetColorUseListL CArrayFix< TCoeColorUse > &  aColorUseList  )  const [virtual]
 

From CCoeControl.

Obtain the color use list for this control

Parameters:
aColorUseList  Output; upon non-leaving return, constains the color use list

Reimplemented from CEikBorderedControl.

Reimplemented in CEikCommandButtonBase.

IMPORT_C void CEikButtonBase::HandlePointerEventL const TPointerEvent &  aPointerEvent  ) 
 

From CCoeControl.

A pointer event is being routed to this control for handling

Parameters:
aPointerEvent  Wserv pointer event

Reimplemented from CEikBorderedControl.

Reimplemented in CEikCommandButtonBase, CEikCommandButton, CEikTwoPictureCommandButton, CEikInverterCommandButton, CEikTextButton, CEikBitmapButton, CEikMenuButton, and CEikScrollButton.

virtual IMPORT_C void CEikButtonBase::HandleResourceChange TInt  aType  )  [virtual]
 

From CCoeControl.

Perform necessary operations when resource changes. This includes layout switches, or other events that affect appearance.

Parameters:
aType  Type of resouce changed

Reimplemented from CEikBorderedControl.

Reimplemented in CEikCommandButtonBase.

IMPORT_C TCoeInputCapabilities CEikButtonBase::InputCapabilities  )  const
 

From CCoeControl.

Interface used by the FEP or others to determine what type of input the control requires.

Returns:
A value indicating what input is required.
IMPORT_C TBool CEikButtonBase::IsPressed  )  const [protected]
 

Returns whether the button is currently pressed.

Returns:
EFalse if the button is not pressed
IMPORT_C TKeyResponse CEikButtonBase::OfferKeyEventL const TKeyEvent &  aKeyEvent,
TEventCode  aType
 

From CCoeControl.

A key event is being being given to the control for handling

Parameters:
aKeyEvent  Key event code
aType  Type of event (i.e.. EEventKey, EEventKeyUp, EEventKeyDown)
Returns:
EKeyWasConsumed or EKeyWasNotConsumed

Reimplemented in CEikCommandButtonBase.

IMPORT_C void CEikButtonBase::SetAllowTristate  )  [protected]
 

Sets the button to be tri-state.

IMPORT_C void CEikButtonBase::SetBehavior TButtonBehavior  aBehavior  ) 
 

Sets the button’s behaviour.

A button can be made to stay set or stay clear. It can also be made a latching button.

Parameters:
aBehavior  Behaviour to use
IMPORT_C void CEikButtonBase::SetCoordinator TEikButtonCoordinator aButCoord  ) 
 

Sets the coordinator for the button.

Parameters:
aButCoord  The coordinator to set for these button
IMPORT_C void CEikButtonBase::SetIgnoreNextPointerUp  ) 
 

Sets the control to ignore the next pointer up event.

IMPORT_C void CEikButtonBase::SetReportOnPointerDown  )  [protected]
 

Set whether the control should report on pointer down.

IMPORT_C void CEikButtonBase::SetState TState  aState  ) 
 

Set the state of the button.

Parameters:
aState  The state the button is to be set to.
IMPORT_C TState CEikButtonBase::State  )  const
 

Access the state.

Returns:
The state of the button
IMPORT_C void CEikButtonBase::WriteInternalStateL RWriteStream &  aWriteStream  )  const
 

From CCoeControl.

Serialize the control's state. For testing

Parameters:
aWriteStream  Stream to write to.

Reimplemented from CEikBorderedControl.

Reimplemented in CEikCommandButtonBase, CEikTwoPictureCommandButton, CEikInverterCommandButton, and CEikMenuButton.


Field Documentation

TInt CEikButtonBase::iButFlags [protected]
 

Flags for the button class hierarchy.


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

Copyright © Nokia Corporation 2001-2008
Back to top