CEikLabeledButton Class Reference

#include <mw/eiklbbut.h>

Link against: eikcoctl

class CEikLabeledButton : public CAknControl

Inherits from

Public Member Enumerations
enumTFlags { EShowHotKey, EPlainHotKey }
Public Member Functions
CEikLabeledButton()
~CEikLabeledButton()
IMPORT_C voidAnimate()
IMPORT_C CEikCommandButtonBase *Button()
virtual IMPORT_C voidConstructFromResourceL(TResourceReader &)
IMPORT_C voidConstructL(CEikCommandButtonBase *, TInt, TInt)
virtual IMPORT_C voidGetColorUseListL(CArrayFix< TCoeColorUse > &)
virtual IMPORT_C voidHandlePointerEventL(const TPointerEvent &)
virtual IMPORT_C voidHandleResourceChange(TInt)
IMPORT_C TIntHotKeyCode()
virtual IMPORT_C TCoeInputCapabilitiesInputCapabilities()
IMPORT_C CEikLabel *Label()
virtual IMPORT_C TSizeMinimumSize()
virtual IMPORT_C TKeyResponseOfferKeyEventL(const TKeyEvent &, TEventCode)
IMPORT_C TBoolPlainHotKey()
virtual IMPORT_C voidSetContainerWindowL(const CCoeControl &)
virtual IMPORT_C voidSetDimmed(TBool)
IMPORT_C TBoolShowsHotKey()
IMPORT_C voidUpdateHotKey(TInt, TFlags)
Protected Member Functions
virtual IMPORT_C voidWriteInternalStateL(RWriteStream &)
Inherited Attributes
CCoeControl::iCoeEnv
CCoeControl::iContext
CCoeControl::iPosition
CCoeControl::iSize
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::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()

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.

Since
S60 1.0

Member Enumeration Documentation

Enum TFlags

Options for display of the hotkey shortcut

EnumeratorValueDescription
EShowHotKey0x01
EPlainHotKey0x02

Constructor & Destructor Documentation

CEikLabeledButton ( )

IMPORT_CCEikLabeledButton()

Constructor

~CEikLabeledButton ( )

IMPORT_C~CEikLabeledButton()

C++ Destructor

Member Function 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

Returns: Pointer to the button component. No ownership is transferred.

ConstructFromResourceL ( TResourceReader & )

IMPORT_C voidConstructFromResourceL(TResourceReader &aReader)[virtual]

Reimplemented from CCoeControl::ConstructFromResourceL(TResourceReader &)

From CCoeControl

Construct the object from resource

ParameterDescription
aReaderFully constructed resource reader

ConstructL ( CEikCommandButtonBase *, TInt, TInt )

IMPORT_C voidConstructL(CEikCommandButtonBase *aButton,
TIntaHotKeyCode,
TIntaFlags
)

2nd Stage constructor

ParameterDescription
aButtonSets the button to use as the active part of the CEikLabeledButton

GetColorUseListL ( CArrayFix< TCoeColorUse > & )

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

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

From CCoeControl

Obtain the list of colors to be used by this control

HandlePointerEventL ( const TPointerEvent & )

IMPORT_C voidHandlePointerEventL(const TPointerEvent &aPointerEvent)[virtual]

From CCoeControl

Handle a pointer event coming from the CONE framework

ParameterDescription
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.

ParameterDescription
aTypeType of resource or setting that has changed

HotKeyCode ( )

IMPORT_C TIntHotKeyCode()const

Access the hotkey code

Returns: The hot key code

InputCapabilities ( )

IMPORT_C TCoeInputCapabilitiesInputCapabilities()const [virtual]

From CCoeControl

Report the input capabilities of the control

Returns: A copy of the object holding the capabilities of this control

Label ( )

IMPORT_C CEikLabel *Label()const

Access to the label component of the labeled button

Returns: Pointer to the CEikLabel component. No ownership is transferred.

MinimumSize ( )

IMPORT_C TSizeMinimumSize()[virtual]

Reimplemented from CCoeControl::MinimumSize()

From CCoeControl

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

Returns: The minimum size

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.

ParameterDescription
aKeyEventWserv event type

PlainHotKey ( )

IMPORT_C TBoolPlainHotKey()const

Access the key display mode

Returns: EFalse if the key mode is not set to Plain

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

ParameterDescription
aContainercontrol

SetDimmed ( TBool )

IMPORT_C voidSetDimmed(TBoolaDimmed)[virtual]

From CCoeControl

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

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

ShowsHotKey ( )

IMPORT_C TBoolShowsHotKey()const

Access to hot key setting

Returns: EFase iff ShowsHotKeys is not set

UpdateHotKey ( TInt, TFlags )

IMPORT_C voidUpdateHotKey(TIntaKeyCode,
TFlagsaFlags
)

Change the hot key binding

ParameterDescription
aKeyCodeKey to use (along with pressing CTRL) as the hotkey

WriteInternalStateL ( RWriteStream & )

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

From CCoeControl

Serialize the state of the control

ParameterDescription
aWriteStreamOutput stream for the serialization