CEikCbaButton Class Reference

#include <mw/eikcba.h>

Link against: mpxupnpplaybackdialog.lib

class CEikCbaButton : public CAknControl

Inherits from

Nested Classes and Structures

Protected Attributes
CArrayFix< SButtonOptions > *iButtonOptions
TBool iDoImage
TBuf< KMaxCbaLabelLength >iFullLabelText
CEikImage *iImage
CEikLabel *iLabel
TPtrC iLongLabelText
const CFbsBitmap *iMask
TBool iPressedDown
CFbsBitmap *iSfeMask
TPtrC iShortLabelText
CDesCArray *iText
TBool iUseTextBitmap
Public Member Functions
~CEikCbaButton()
voidAddCommandL(const TDesC &)
voidConstructEmptyButtonL()
voidConstructFromResourceL(TResourceReader &, TGulAlignmentValue)
voidConstructL(TGulAlignmentValue)
voidDrawToContext(CBitmapContext &, CBitmapContext &, const TPoint &)
TPtrC FullLabelText()
virtual IMPORT_C voidHandlePointerEventL(const TPointerEvent &)
TBool IsEmptyText()
TBool IsImageOn()
virtual TSize MinimumSize()
TInt PopCommand()
TBool PressedDown()
voidPushCommandL(TInt, const TDesC &)
voidRemoveCommand(TInt)
voidRemovePreviousCommand()
voidReplaceImageByLabel()
virtual voidSetContainerWindowL(const CCoeControl &)
virtual voidSetDimmed(TBool)
voidSetImage(CEikImage &)
voidSetLabelFont(const CFont *)
voidSetPressedDown(const TBool)
voidSetTextBitmapMode(TBool)
voidSwitchToShortTextL(TBool)
voidTruncateLabelText()
Protected Member Functions
TInt IndexFromCommandId(TInt)
voidUpdateLabelText(TPtrC)
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::ConstructFromResourceL(TResourceReader &)
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::GetColorUseListL(CArrayFix< TCoeColorUse > &)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::HandleResourceChange(TInt)
CCoeControl::HasBorder()const
CCoeControl::HitTest()const
CCoeControl::IgnoreEventsUntilNextPointerUp()
CCoeControl::Index(const CCoeControl *)const
CCoeControl::InitComponentArrayL()
CCoeControl::InputCapabilities()const
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::OfferKeyEventL(const TKeyEvent &,TEventCode)
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::WriteInternalStateL(RWriteStream &)const
CCoeControl::WriteInternalStateNowL(RWriteStream &)const
CCoeControl::ZoomWithType()const
CCoeControl::operator=(const CCoeControl &)
CCoeControl::~CCoeControl()

Detailed Description

EIKON CBA button class definition.

Member Attribute Documentation

iButtonOptions

CArrayFix< SButtonOptions > *iButtonOptions[protected]

iDoImage

TBool iDoImage[protected]

iFullLabelText

TBuf< KMaxCbaLabelLength >iFullLabelText[protected]

iImage

CEikImage *iImage[protected]

iLabel

CEikLabel *iLabel[protected]

iLongLabelText

TPtrC iLongLabelText[protected]

iMask

const CFbsBitmap *iMask[protected]

Original mask for softkey image.

iPressedDown

TBool iPressedDown[protected]

Buttons state.

iSfeMask

CFbsBitmap *iSfeMask[protected]

Feedback effects transparency mask for softkey image.

iShortLabelText

TPtrC iShortLabelText[protected]

iText

CDesCArray *iText[protected]

iUseTextBitmap

TBool iUseTextBitmap[protected]

ETrue if should use text bitmap mode.

Constructor & Destructor Documentation

~CEikCbaButton ( )

~CEikCbaButton()

Destructor.

Member Function Documentation

AddCommandL ( const TDesC & )

voidAddCommandL(const TDesC &aText)

Updates the label text with the given label.

ParameterDescription
aTextThe new label text.

ConstructEmptyButtonL ( )

voidConstructEmptyButtonL()

Constructs empty button with id EAknSoftkeyEmpty

ConstructFromResourceL ( TResourceReader &, TGulAlignmentValue )

voidConstructFromResourceL(TResourceReader &aReader,
TGulAlignmentValueanAlignment
)

Constructs the control from a resource file.

ParameterDescription
aReaderThe resource reader.
anAlignmentAlignment for label.

ConstructL ( TGulAlignmentValue )

voidConstructL(TGulAlignmentValueaAlignment)

Constructs a new CBA button instance.

ParameterDescription
aAlignmentAlignment for label.

DrawToContext ( CBitmapContext &, CBitmapContext &, const TPoint & )

voidDrawToContext(CBitmapContext &aContext,
CBitmapContext &aMaskContext,
const TPoint &aOffset
)const

Draws the button text and mask to give graphics contexts. Background is not drawn.

FullLabelText ( )

TPtrC FullLabelText()[inline]

Returns the textual value of the button

HandlePointerEventL ( const TPointerEvent & )

IMPORT_C voidHandlePointerEventL(const TPointerEvent &aPointerEvent)[virtual]

From CCoeControl. Handles pointer events.

ParameterDescription
aPointerEventThe pointer event.

IndexFromCommandId ( TInt )

TInt IndexFromCommandId(TIntaCommandId)[protected]

Returns the button's index by command id.

ParameterDescription
aCommandIdThe button's command id.

Returns: The button's index.

IsEmptyText ( )

TBool IsEmptyText()const

Checks if text is empty in this button.

IsImageOn ( )

TBool IsImageOn()const [inline]

Returns whether the button has image set.

Returns: ETrue if the button has image set, EFalse otherwise.

MinimumSize ( )

TSize MinimumSize()[virtual]

Reimplemented from CCoeControl::MinimumSize()

From CCoeControl. Sets the control's minimum required size.

Returns: The minimum size required by the control.

PopCommand ( )

TInt PopCommand()

Pops a command from the button stack.

Returns: The button's command id. KErrNotFound if the button stack is empty.

PressedDown ( )

TBool PressedDown()const

Returns the state of CEikCbaButton.

Returns: Boolean value for CEikCbaButtons state. ETrue if button is pressed down. Otherwise returns EFalse.

PushCommandL ( TInt, const TDesC & )

voidPushCommandL(TIntaCommandId,
const TDesC &aText
)

Pushes a command into button stack.

ParameterDescription
aCommandIdThe command to be pushed.
aTextText for the button.

RemoveCommand ( TInt )

voidRemoveCommand(TIntaCommandId)

Removes a command from the button stack.

ParameterDescription
aCommandIdThe command to be removed.

RemovePreviousCommand ( )

voidRemovePreviousCommand()

Removes the previous command from the button stack.

ReplaceImageByLabel ( )

voidReplaceImageByLabel()

Replaces the buttons image with label.

SetContainerWindowL ( const CCoeControl & )

voidSetContainerWindowL(const CCoeControl &aContainer)[virtual]

From CCoeControl. Sets the control's containing window by copying it from aContainer.

ParameterDescription
aContainerThe compound control that is the container for this control.

SetDimmed ( TBool )

voidSetDimmed(TBoolaDimmed)[virtual]

From CCoeControl. Sets the control to be dimmed.

ParameterDescription
aDimmedETrue to dim the control, EFalse to set the control as not dimmed.

SetImage ( CEikImage & )

voidSetImage(CEikImage &aImage)

Sets the button's image.

ParameterDescription
aImageThe image to be set.

SetLabelFont ( const CFont * )

voidSetLabelFont(const CFont *aLabelFont)

Sets the labels font.

ParameterDescription
aLabelFontThe font to be used.

SetPressedDown ( const TBool )

voidSetPressedDown(const TBoolaPressedDown)

Changes the state of CEikCbaButton. Button's state is stored in a member variable.

ParameterDescription
aPressedDownThe state that button has. ETrue if button's state is pressed down. EFalse for normal, not pressed state.

SetTextBitmapMode ( TBool )

voidSetTextBitmapMode(TBoolaEnableBitmap)

Enables bitmap mode and hides the label. The text is drawn by CEikCba in bitmap mode.

SwitchToShortTextL ( TBool )

voidSwitchToShortTextL(TBoolaShortText)

Switches the button's text to short or long depending on the parameter given.

ParameterDescription
aShortTextETrue for short text, EFalse for the long text.

TruncateLabelText ( )

voidTruncateLabelText()

Truncates the label. This is done by CEikLabel.

UpdateLabelText ( TPtrC )

voidUpdateLabelText(TPtrCaLabelText)[protected]

Updates the label text with the given label.