CEikButtonBase Class Reference

#include <mw/eikbutb.h>

Link against: eikcoctl

class CEikButtonBase : public CEikBorderedControl

Inherits from

Protected Attributes
TInt iButFlags
Public Member Enumerations
enumTState { EClear, ESet, EIndeterminate }
Protected Member Enumerations
enumTDrawState { EDrawClear, EDrawSet, EDrawIndeterminate, EDrawClearPressed, ..., EDrawIndeterminatePressed }
Public Member Functions
CEikButtonBase()
~CEikButtonBase()
virtual IMPORT_C voidAnimate()
virtual IMPORT_C voidGetColorUseListL(CArrayFix< TCoeColorUse > &)
virtual IMPORT_C voidHandlePointerEventL(const TPointerEvent &)
virtual IMPORT_C voidHandleResourceChange(TInt)
virtual IMPORT_C TCoeInputCapabilitiesInputCapabilities()
virtual IMPORT_C TKeyResponseOfferKeyEventL(const TKeyEvent &, TEventCode)
IMPORT_C voidSetBehavior(TButtonBehavior)
IMPORT_C voidSetCoordinator(TEikButtonCoordinator *)
IMPORT_C voidSetIgnoreNextPointerUp()
IMPORT_C voidSetState(TState)
IMPORT_C TStateState()
virtual IMPORT_C voidWriteInternalStateL(RWriteStream &)
Protected Member Functions
IMPORT_C voidCopyDrawStateTo(CEikButtonBase *)
IMPORT_C TDrawStateDrawState()
IMPORT_C TBoolIsPressed()
IMPORT_C voidSetAllowTristate()
IMPORT_C voidSetReportOnPointerDown()
Inherited Attributes
CCoeControl::iCoeEnv
CCoeControl::iContext
CCoeControl::iPosition
CCoeControl::iSize
CEikBorderedControl::iBorder
Inherited Enumerations
CCoeControl:TZoomType
Inherited Functions
CAknControl::CAknControl()
CAknControl::~CAknControl()
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()
CCoeControl::AccumulatedZoom()const
CCoeControl::ActivateGc()const
CCoeControl::ActivateL()
CCoeControl::BackedUpWindow()const
CCoeControl::Background()const
CCoeControl::CCoeControl()
CCoeControl::CCoeControl(CCoeEnv *)
CCoeControl::CCoeControl(const CCoeControl &)
CCoeControl::CCoeControlArray
CCoeControl::CapturesPointer()const
CCoeControl::ClaimPointerGrab(TBool)
CCoeControl::ClaimPointerGrab(TInt,TBool)
CCoeControl::CloseWindow()
CCoeControl::ComponentArrayExists()const
CCoeControl::ComponentControl(TInt)const
CCoeControl::Components()
CCoeControl::Components()const
CCoeControl::ConstructFromResourceL(TResourceReader &)
CCoeControl::ControlContext()const
CCoeControl::ControlEnv()const
CCoeControl::CopyControlContextFrom(const CCoeControl *)
CCoeControl::CountComponentControls()const
CCoeControl::CreateBackedUpWindowL(RWindowTreeNode &)
CCoeControl::CreateBackedUpWindowL(RWindowTreeNode &,TDisplayMode)
CCoeControl::CreateWindowL()
CCoeControl::CreateWindowL(RWindowGroup *)
CCoeControl::CreateWindowL(RWindowTreeNode &)
CCoeControl::CreateWindowL(const CCoeControl *)
CCoeControl::CustomGc()const
CCoeControl::DeactivateGc()const
CCoeControl::DrawBackground(const TRect &)const
CCoeControl::DrawDeferred()const
CCoeControl::DrawForeground(const TRect &)const
CCoeControl::DrawNow()const
CCoeControl::DrawNow(const TRect &)const
CCoeControl::DrawableWindow()const
CCoeControl::EnableDragEvents()
CCoeControl::EnableReportControlStateChange(TBool)
CCoeControl::EnableWindowTransparency()
CCoeControl::FindBackground()const
CCoeControl::FindFontProvider()const
CCoeControl::FocusChanged(TDrawNow)
CCoeControl::GetColor(TInt,TRgb &)const
CCoeControl::GetGc()const
CCoeControl::GetHelpContext(TCoeHelpContext &)const
CCoeControl::GrabbingComponent()const
CCoeControl::GrabbingComponent(TInt)const
CCoeControl::HandleComponentControlsResourceChange(TInt)
CCoeControl::HandleControlArrayEventL(CCoeControlArray::TEvent,const CCoeControlArray *,CCoeControl *,TInt)
CCoeControl::HandlePointerBufferReadyL()
CCoeControl::HandleRedrawEvent(const TRect &)const
CCoeControl::HitTest()const
CCoeControl::IgnoreEventsUntilNextPointerUp()
CCoeControl::Index(const CCoeControl *)const
CCoeControl::InitComponentArrayL()
CCoeControl::IsActivated()const
CCoeControl::IsBackedUp()const
CCoeControl::IsBeingDestroyed()const
CCoeControl::IsBlank()const
CCoeControl::IsDimmed()const
CCoeControl::IsFocused()const
CCoeControl::IsNonFocusing()const
CCoeControl::IsReadyToDraw()const
CCoeControl::IsVisible()const
CCoeControl::LayoutManager()const
CCoeControl::MakeVisible(TBool)
CCoeControl::MaximumWidth()const
CCoeControl::MinimumSize()
CCoeControl::MopSupplyObject(TTypeUid)
CCoeControl::NotifyFontChange(const CCoeFontProvider *)
CCoeControl::Observer()const
CCoeControl::OverrideColorL(TInt,TRgb)
CCoeControl::OwnsWindow()const
CCoeControl::Parent()
CCoeControl::Parent()const
CCoeControl::Position()const
CCoeControl::PositionChanged()
CCoeControl::PositionRelativeToScreen()const
CCoeControl::PrepareForFocusGainL()
CCoeControl::PrepareForFocusLossL()
CCoeControl::ProcessPointerBufferReadyL()
CCoeControl::ProcessPointerEventL(const TPointerEvent &)
CCoeControl::Rect()const
CCoeControl::RecursivelyMergeInputCapabilities(TCoeInputCapabilities &)const
CCoeControl::RecursivelyMergedInputCapabilities()const
CCoeControl::RefetchPixelMappingL()
CCoeControl::RemoveFromParent()
CCoeControl::ReportEventL(MCoeControlObserver::TCoeEvent)
CCoeControl::RequestRelayout(const CCoeControl *)
CCoeControl::ResetGc()const
CCoeControl::ScreenFont(const TCoeFont &)const
CCoeControl::SetAllowStrayPointers()
CCoeControl::SetBackground(const MCoeControlBackground *)
CCoeControl::SetBlank()
CCoeControl::SetCanDrawOutsideRect()
CCoeControl::SetComponentsToInheritVisibility(TBool)
CCoeControl::SetContainerWindowL(RBackedUpWindow &)
CCoeControl::SetContainerWindowL(RWindow &)
CCoeControl::SetContainerWindowL(const CCoeControl &)
CCoeControl::SetControlContext(MCoeControlContext *)
CCoeControl::SetCornerAndSize(TGulAlignment,const TSize &)
CCoeControl::SetCustomGc(CWindowGc *)
CCoeControl::SetDimmed(TBool)
CCoeControl::SetExtent(const TPoint &,const TSize &)
CCoeControl::SetExtentToWholeScreen()
CCoeControl::SetFocus(TBool,TDrawNow)
CCoeControl::SetFocusing(TBool)
CCoeControl::SetFontProviderL(const CCoeFontProvider &)
CCoeControl::SetGc(CWindowGc *)const
CCoeControl::SetGloballyCapturing(TBool)
CCoeControl::SetHitTest(const MCoeControlHitTest *)
CCoeControl::SetLayoutManagerL(MCoeLayoutManager *)
CCoeControl::SetMaximumWidth(TInt)
CCoeControl::SetMopParent(MObjectProvider *)
CCoeControl::SetNeighbor(CCoeControl *)
CCoeControl::SetNonFocusing()
CCoeControl::SetObserver(MCoeControlObserver *)
CCoeControl::SetParent(CCoeControl *)
CCoeControl::SetPointerCapture(TBool)
CCoeControl::SetPosition(const TPoint &)
CCoeControl::SetRect(const TRect &)
CCoeControl::SetSize(const TSize &)
CCoeControl::SetSizeWithoutNotification(const TSize &)
CCoeControl::SetTextBaselineSpacing(TInt)
CCoeControl::SetUniqueHandle(TInt)
CCoeControl::SetZoomFactorL(TInt,TZoomType)
CCoeControl::Size()const
CCoeControl::SizeChanged()
CCoeControl::SystemGc()const
CCoeControl::TextBaselineOffset(const TSize &)const
CCoeControl::TextDrawer(TInt)const
CCoeControl::UniqueHandle()const
CCoeControl::Window()const
CCoeControl::WriteInternalStateNowL(RWriteStream &)const
CCoeControl::ZoomWithType()const
CCoeControl::operator=(const CCoeControl &)
CCoeControl::~CCoeControl()
CEikBorderedControl::Border()const
CEikBorderedControl::CEikBorderedControl()
CEikBorderedControl::CEikBorderedControl(const TGulBorder &)
CEikBorderedControl::Draw(const TRect &)const
CEikBorderedControl::HasBorder()const
CEikBorderedControl::SetAdjacent(TInt)
CEikBorderedControl::SetBorder(TGulBorder::TBorderType)
CEikBorderedControl::SetBorder(TInt)

Detailed Description

Base class for button controls

This class defines behavior available to all button classes.

Since
S60 1.0

Member Attribute Documentation

iButFlags

TInt iButFlags[protected]

Flags for the button class hierarchy

Member Enumeration Documentation

Enum TDrawState

The draw state of the button.

EnumeratorValueDescription
EDrawClearSLafButtonBase::EDrawClear
EDrawSetSLafButtonBase::EDrawSet
EDrawIndeterminateSLafButtonBase::EDrawIndeterminate
EDrawClearPressedSLafButtonBase::EDrawClearPressed
EDrawSetPressedSLafButtonBase::EDrawSetPressed
EDrawIndeterminatePressedSLafButtonBase::EDrawIndeterminatePressed

Enum TState

States that the button can be in.

EnumeratorValueDescription
EClear0
ESet1
EIndeterminate2

Constructor & Destructor Documentation

CEikButtonBase ( )

IMPORT_CCEikButtonBase()

C++ constructor

~CEikButtonBase ( )

IMPORT_C~CEikButtonBase()

C++ destructor

Member Function Documentation

Animate ( )

IMPORT_C voidAnimate()[virtual]

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

CopyDrawStateTo ( CEikButtonBase * )

IMPORT_C voidCopyDrawStateTo(CEikButtonBase *aTargetButton)const [protected]

Transfers the draw state to the referenced button

ParameterDescription
aTargetButtonbutton to transfer the

DrawState ( )

IMPORT_C TDrawStateDrawState()const [protected]

Access the draw state defined in SLafButtonBase

Returns: The draw state of the control

GetColorUseListL ( CArrayFix< TCoeColorUse > & )

IMPORT_C voidGetColorUseListL(CArrayFix< TCoeColorUse > &aColorUseList)const [virtual]

Reimplemented from CEikBorderedControl::GetColorUseListL(CArrayFix< TCoeColorUse > &)const

From CCoeControl

Obtain the color use list for this control

ParameterDescription
aColorUseListOutput; upon non-leaving return, constains the color use list

HandlePointerEventL ( const TPointerEvent & )

IMPORT_C voidHandlePointerEventL(const TPointerEvent &aPointerEvent)[virtual]

Reimplemented from CEikBorderedControl::HandlePointerEventL(const TPointerEvent &)

From CCoeControl

A pointer event is being routed to this control for handling

ParameterDescription
aPointerEventWserv pointer event

HandleResourceChange ( TInt )

IMPORT_C voidHandleResourceChange(TIntaType)[virtual]

Reimplemented from CEikBorderedControl::HandleResourceChange(TInt)

From CCoeControl

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

ParameterDescription
aTypeType of resouce changed

InputCapabilities ( )

IMPORT_C TCoeInputCapabilitiesInputCapabilities()const [virtual]

Reimplemented from CCoeControl::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.

IsPressed ( )

IMPORT_C TBoolIsPressed()const [protected]

Returns whether the button is currently pressed.

Returns: EFalse if the button is not pressed

OfferKeyEventL ( const TKeyEvent &, TEventCode )

IMPORT_C TKeyResponseOfferKeyEventL(const TKeyEvent &aKeyEvent,
TEventCodeaType
)[virtual]

Reimplemented from CCoeControl::OfferKeyEventL(const TKeyEvent &,TEventCode)

From CCoeControl

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

ParameterDescription
aKeyEventKey event code
aTypeType of event (i.e.. EEventKey, EEventKeyUp, EEventKeyDown)

Returns: EKeyWasConsumed or EKeyWasNotConsumed

SetAllowTristate ( )

IMPORT_C voidSetAllowTristate()[protected]

Sets the button to be tri-state

SetBehavior ( TButtonBehavior )

IMPORT_C voidSetBehavior(TButtonBehavioraBehavior)

Sets the button s behaviour. A button can be made to stay set or stay clear. It can also be made a latching button.

ParameterDescription
aBehaviorBehaviour to use

SetCoordinator ( TEikButtonCoordinator * )

IMPORT_C voidSetCoordinator(TEikButtonCoordinator *aButCoord)

Sets the coordinator for the button.

ParameterDescription
aButCoordThe coordinator to set for these button

SetIgnoreNextPointerUp ( )

IMPORT_C voidSetIgnoreNextPointerUp()

Sets the control to ignore the next pointer up event

SetReportOnPointerDown ( )

IMPORT_C voidSetReportOnPointerDown()[protected]

Set whether the control should report on pointer down

SetState ( TState )

IMPORT_C voidSetState(TStateaState)

Set the state of the button.

ParameterDescription
aStateThe state the button is to be set to.

State ( )

IMPORT_C TStateState()const

Access the state

Returns: The state of the button

WriteInternalStateL ( RWriteStream & )

IMPORT_C voidWriteInternalStateL(RWriteStream &aWriteStream)const [virtual]

Reimplemented from CEikBorderedControl::WriteInternalStateL(RWriteStream &)const

From CCoeControl

Serialize the control's state. For testing

ParameterDescription
aWriteStreamStream to write to.