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 void Animate ()
IMPORT_C CEikCommandButtonBase * Button ()
IMPORT_C void ConstructFromResourceL ( TResourceReader &)
IMPORT_C void ConstructL ( CEikCommandButtonBase *, TInt , TInt )
IMPORT_C void GetColorUseListL ( CArrayFix < TCoeColorUse > &)
IMPORT_C void HandlePointerEventL (const TPointerEvent &)
IMPORT_C void HandleResourceChange ( TInt )
IMPORT_C TInt HotKeyCode ()
IMPORT_C TCoeInputCapabilities InputCapabilities ()
IMPORT_C CEikLabel * Label ()
IMPORT_C TSize MinimumSize ()
IMPORT_C TKeyResponse OfferKeyEventL (const TKeyEvent &, TEventCode )
IMPORT_C TBool PlainHotKey ()
IMPORT_C void SetContainerWindowL (const CCoeControl &)
IMPORT_C void SetDimmed ( TBool )
IMPORT_C TBool ShowsHotKey ()
IMPORT_C void UpdateHotKey ( TInt , TFlags )
Protected Member Functions
IMPORT_C void WriteInternalStateL ( RWriteStream &)
Private Member Functions
CCoeControl * ComponentControl ( TInt )
TInt CountComponentControls ()
void CreateLabelL ()
IMPORT_C void * ExtensionInterface ( TUid )
void HandleControlEventL ( CCoeControl *, TCoeEvent)
void Reserved_2 ()
void SizeChanged ()
void UpdateHotKeyL ()
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
enum TFlags { 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_C CEikLabeledButton ( )

Constructor

~CEikLabeledButton()

IMPORT_C ~CEikLabeledButton ( )

C++ Destructor

Member Functions Documentation

Animate()

IMPORT_C void Animate ( )

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 ( TInt aIndex ) const [private, virtual]

From CCoeControl

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

Parameters

TInt aIndex

ConstructFromResourceL(TResourceReader &)

IMPORT_C void ConstructFromResourceL ( TResourceReader & aReader ) [virtual]

From CCoeControl

Construct the object from resource

Parameters

TResourceReader & aReader Fully constructed resource reader

ConstructL(CEikCommandButtonBase *, TInt, TInt)

IMPORT_C void ConstructL ( CEikCommandButtonBase * aButton,
TInt aHotKeyCode,
TInt aFlags
)

2nd Stage constructor

Parameters

CEikCommandButtonBase * aButton Sets 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()

void CreateLabelL ( ) [private]

ExtensionInterface(TUid)

IMPORT_C void * ExtensionInterface ( TUid aInterface ) [private, virtual]

Parameters

TUid aInterface

GetColorUseListL(CArrayFix< TCoeColorUse > &)

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

From CCoeControl

Obtain the list of colors to be used by this control

Since
ER5U

Parameters

CArrayFix < TCoeColorUse > & aColorUseList Gets 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)

void HandleControlEventL ( CCoeControl * aControl,
TCoeEvent aEventType
) [private]

Parameters

CCoeControl * aControl
TCoeEvent aEventType

HandlePointerEventL(const TPointerEvent &)

IMPORT_C void HandlePointerEventL ( const TPointerEvent & aPointerEvent ) [virtual]

From CCoeControl

Handle a pointer event coming from the CONE framework

Parameters

const TPointerEvent & aPointerEvent Event to handle

HandleResourceChange(TInt)

IMPORT_C void HandleResourceChange ( TInt aType ) [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 aType Type of resource or setting that has changed

HotKeyCode()

IMPORT_C TInt HotKeyCode ( ) const

Access the hotkey code

InputCapabilities()

IMPORT_C TCoeInputCapabilities InputCapabilities ( ) 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 TSize MinimumSize ( ) [virtual]

From CCoeControl

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

OfferKeyEventL(const TKeyEvent &, TEventCode)

IMPORT_C TKeyResponse OfferKeyEventL ( const TKeyEvent & aKeyEvent,
TEventCode aType
) [virtual]

From CCoeControl

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

Parameters

const TKeyEvent & aKeyEvent Wserv event type
TEventCode aType

PlainHotKey()

IMPORT_C TBool PlainHotKey ( ) const

Access the key display mode

Reserved_2()

void Reserved_2 ( ) [private, virtual]

SetContainerWindowL(const CCoeControl &)

IMPORT_C void SetContainerWindowL ( const CCoeControl & aContainer ) [virtual]

From CCoeControl

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

Parameters

const CCoeControl & aContainer control

SetDimmed(TBool)

IMPORT_C void SetDimmed ( TBool aDimmed ) [virtual]

From CCoeControl

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

Parameters

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

ShowsHotKey()

IMPORT_C TBool ShowsHotKey ( ) const

Access to hot key setting

SizeChanged()

void SizeChanged ( ) [private, virtual]

UpdateHotKey(TInt, TFlags)

IMPORT_C void UpdateHotKey ( TInt aKeyCode,
TFlags aFlags
)

Change the hot key binding

Parameters

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

UpdateHotKeyL()

void UpdateHotKeyL ( ) [private]

WriteInternalStateL(RWriteStream &)

IMPORT_C void WriteInternalStateL ( 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 & aWriteStream Output 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]