CEikLabeledButton Class Reference

class CEikLabeledButton : public CAknControl

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.

eikcoctl
Since
S60 1.0

Inherits from

Public Member Functions
CEikLabeledButton()
~CEikLabeledButton()
IMPORT_C voidAnimate()
IMPORT_C CEikCommandButtonBase *Button()
IMPORT_C voidConstructFromResourceL(TResourceReader &)
IMPORT_C voidConstructL(CEikCommandButtonBase *, TInt, TInt)
IMPORT_C voidGetColorUseListL(CArrayFix< TCoeColorUse > &)
IMPORT_C voidHandlePointerEventL(const TPointerEvent &)
IMPORT_C voidHandleResourceChange(TInt)
IMPORT_C TIntHotKeyCode()
IMPORT_C TCoeInputCapabilitiesInputCapabilities()
IMPORT_C CEikLabel *Label()
IMPORT_C TSizeMinimumSize()
IMPORT_C TKeyResponseOfferKeyEventL(const TKeyEvent &, TEventCode)
IMPORT_C TBoolPlainHotKey()
IMPORT_C voidSetContainerWindowL(const CCoeControl &)
IMPORT_C voidSetDimmed(TBool)
IMPORT_C TBoolShowsHotKey()
IMPORT_C voidUpdateHotKey(TInt, TFlags)
Protected Member Functions
IMPORT_C voidWriteInternalStateL(RWriteStream &)
Private Member Functions
CCoeControl *ComponentControl(TInt)
TInt CountComponentControls()
voidCreateLabelL()
IMPORT_C void *ExtensionInterface(TUid)
voidHandleControlEventL(CCoeControl *, TCoeEvent)
voidReserved_2()
voidSizeChanged()
voidUpdateHotKeyL()
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::CapturesPointer()const
CCoeControl::ClaimPointerGrab(TBool)
CCoeControl::ClaimPointerGrab(TInt,TBool)
CCoeControl::CloseWindow()
CCoeControl::ComponentArrayExists()const
CCoeControl::Components()
CCoeControl::Components()const
CCoeControl::ControlContext()const
CCoeControl::ControlEnv()const
CCoeControl::CopyControlContextFrom(const CCoeControl *)
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::HasBorder()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::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::SetAdjacent(TInt)
CCoeControl::SetAllowStrayPointers()
CCoeControl::SetBackground(const MCoeControlBackground *)
CCoeControl::SetBlank()
CCoeControl::SetCanDrawOutsideRect()
CCoeControl::SetComponentsToInheritVisibility(TBool)
CCoeControl::SetContainerWindowL(RBackedUpWindow &)
CCoeControl::SetContainerWindowL(RWindow &)
CCoeControl::SetControlContext(MCoeControlContext *)
CCoeControl::SetCornerAndSize(TGulAlignment,const TSize &)
CCoeControl::SetCustomGc(CWindowGc *)
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::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()
Public Member Enumerations
enumTFlags { EShowHotKey = 0x01, EPlainHotKey = 0x02 }
Inherited Enumerations
CCoeControl:TZoomType
Private Attributes
CEikCommandButtonBase *iButton
TInt iHotKeyCode
TInt iLButFlags
CEikLabel *iLabel
TInt iSpare
Inherited Attributes
CCoeControl::iCoeEnv
CCoeControl::iContext
CCoeControl::iPosition
CCoeControl::iSize

Constructor & Destructor Documentation

CEikLabeledButton()

IMPORT_CCEikLabeledButton()

Constructor

~CEikLabeledButton()

IMPORT_C~CEikLabeledButton()

C++ Destructor

Member Functions Documentation

Animate()

IMPORT_C voidAnimate()

Cause the button to animate and to generate its command ID

Button()

IMPORT_C CEikCommandButtonBase *Button()const

Access to the button component of the labeled button

ComponentControl(TInt)

CCoeControl *ComponentControl(TIntaIndex)const [private, virtual]

From CCoeControl

Return a pointer to the component control at the give index.

Parameters

TInt aIndex

ConstructFromResourceL(TResourceReader &)

IMPORT_C voidConstructFromResourceL(TResourceReader &aReader)[virtual]

From CCoeControl

Construct the object from resource

Parameters

TResourceReader & aReaderFully constructed resource reader

ConstructL(CEikCommandButtonBase *, TInt, TInt)

IMPORT_C voidConstructL(CEikCommandButtonBase *aButton,
TIntaHotKeyCode,
TIntaFlags
)

2nd Stage constructor

Parameters

CEikCommandButtonBase * aButtonSets the button to use as the active part of the CEikLabeledButton
TInt aHotKeyCode
TInt aFlags

CountComponentControls()

TInt CountComponentControls()const [private, virtual]

From CCoeControl

Returns the number of component controls

CreateLabelL()

voidCreateLabelL()[private]

ExtensionInterface(TUid)

IMPORT_C void *ExtensionInterface(TUidaInterface)[private, virtual]

Parameters

TUid aInterface

GetColorUseListL(CArrayFix< TCoeColorUse > &)

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

From CCoeControl

Obtain the list of colors to be used by this control

Since
ER5U

Parameters

CArrayFix< TCoeColorUse > & aColorUseListGets the list of logical colors employed in the drawing of the control, paired with an explanation of how they are used. Appends the list to aColorUseList.

HandleControlEventL(CCoeControl *, TCoeEvent)

voidHandleControlEventL(CCoeControl *aControl,
TCoeEventaEventType
)[private]

Parameters

CCoeControl * aControl
TCoeEvent aEventType

HandlePointerEventL(const TPointerEvent &)

IMPORT_C voidHandlePointerEventL(const TPointerEvent &aPointerEvent)[virtual]

From CCoeControl

Handle a pointer event coming from the CONE framework

Parameters

const TPointerEvent & aPointerEventEvent to handle

HandleResourceChange(TInt)

IMPORT_C voidHandleResourceChange(TIntaType)[virtual]

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.

Handles a change to the control's resources of type aType which are shared across the environment, e.g. colors or fonts.

Since
ER5U

Parameters

TInt aTypeType of resource or setting that has changed

HotKeyCode()

IMPORT_C TIntHotKeyCode()const

Access the hotkey code

InputCapabilities()

IMPORT_C TCoeInputCapabilitiesInputCapabilities()const [virtual]

From CCoeControl

Report the input capabilities of the control

Label()

IMPORT_C CEikLabel *Label()const

Access to the label component of the labeled button

MinimumSize()

IMPORT_C TSizeMinimumSize()[virtual]

From CCoeControl

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

OfferKeyEventL(const TKeyEvent &, TEventCode)

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

From CCoeControl

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

Parameters

const TKeyEvent & aKeyEventWserv event type
TEventCode aType

PlainHotKey()

IMPORT_C TBoolPlainHotKey()const

Access the key display mode

Reserved_2()

voidReserved_2()[private, virtual]

SetContainerWindowL(const CCoeControl &)

IMPORT_C voidSetContainerWindowL(const CCoeControl &aContainer)[virtual]

From CCoeControl

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

Parameters

const CCoeControl & aContainercontrol

SetDimmed(TBool)

IMPORT_C voidSetDimmed(TBoolaDimmed)[virtual]

From CCoeControl

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

Parameters

TBool aDimmedIf not EFalse, set the state to dimmed. Otherwise set to non-dimmed

ShowsHotKey()

IMPORT_C TBoolShowsHotKey()const

Access to hot key setting

SizeChanged()

voidSizeChanged()[private, virtual]

UpdateHotKey(TInt, TFlags)

IMPORT_C voidUpdateHotKey(TIntaKeyCode,
TFlagsaFlags
)

Change the hot key binding

Parameters

TInt aKeyCodeKey to use (along with pressing CTRL) as the hotkey
TFlags aFlags

UpdateHotKeyL()

voidUpdateHotKeyL()[private]

WriteInternalStateL(RWriteStream &)

IMPORT_C voidWriteInternalStateL(RWriteStream &aWriteStream)const [protected, virtual]

From CCoeControl

Serialize the state of the control

Writes the internal state of the control and its components to aStream. Does nothing in release mode. Designed to be overidden and base called by subclasses.

Parameters

RWriteStream & aWriteStreamOutput stream for the serialization

Member Enumerations Documentation

Enum TFlags

Options for display of the hotkey shortcut

Enumerators

EShowHotKey = 0x01
EPlainHotKey = 0x02

Member Data Documentation

CEikCommandButtonBase * iButton

CEikCommandButtonBase *iButton[private]

Contained command button object. Owned

TInt iHotKeyCode

TInt iHotKeyCode[private]

TInt iLButFlags

TInt iLButFlags[private]

CEikLabel * iLabel

CEikLabel *iLabel[private]

Contained label to implement the text Owned

TInt iSpare

TInt iSpare[private]