CButtonBase Class Reference

class CButtonBase : public CFepUiBaseCtrl

CButtonBase

Button base control. This class could be used directly by user.

peninputlayoutcontrol.lib
Since
S60 V4.0

Inherits from

Public Member Functions
~CButtonBase()
IMPORT_C voidBaseConstructL()
IMPORT_C CFbsBitmap *Bitmap(TButtonBmpType, TBool)
TBool BmpStretchable()
IMPORT_C voidDraw()
IMPORT_C voidHandlePointerEnter(const TPoint &)
IMPORT_C voidHandlePointerLeave(const TPoint &)
IMPORT_C voidHide(TBool)
TBool IsDimmed()
IMPORT_C CButtonBase *NewL(const TRect &, CFepUiLayout *, TInt)
IMPORT_C voidResetBmpPool()
IMPORT_C voidSetActive(TBool)
IMPORT_C voidSetBitmapL(CFbsBitmap *, TButtonBmpType)
voidSetBmpStretchable(TBool)
voidSetCaptionColor(const TRgb &)
IMPORT_C voidSetCaptionL(const TDesC &)
voidSetCaptionShadowColor(const TRgb &)
IMPORT_C voidSetDimmed(TBool)
IMPORT_C voidSetFont(const TFontSpec &)
IMPORT_C voidSetFont(const CFont *)
IMPORT_C voidSetMaskBitmapL(CFbsBitmap *, TButtonBmpType)
Protected Member Functions
CButtonBase(const TRect &, CFepUiLayout *, TInt)
IMPORT_C CFepUiBaseCtrl *HandlePointerDownEventL(const TPoint &)
IMPORT_C CFepUiBaseCtrl *HandlePointerMoveEventL(const TPoint &)
IMPORT_C CFepUiBaseCtrl *HandlePointerUpEventL(const TPoint &)
IMPORT_C voidSetBackgroundBitmapL(CFbsBitmap *)
IMPORT_C voidSetBackgroundMaskBitmapL(CFbsBitmap *)
Private Member Functions
voidAddBmpToPool(CFbsBitmap *)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
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()
CFepUiBaseCtrl::AbleToDraw()
CFepUiBaseCtrl::AbsOrderPos()
CFepUiBaseCtrl::ActiveExtResponseArea()
CFepUiBaseCtrl::AddEventObserver(MEventObserver *)
CFepUiBaseCtrl::AllowOverlap()
CFepUiBaseCtrl::BackgroundBmp()
CFepUiBaseCtrl::BaseConstructL(CFepUiLayoutRootCtrl *)
CFepUiBaseCtrl::BitGc()
CFepUiBaseCtrl::BitmapDevice()
CFepUiBaseCtrl::BkColor()
CFepUiBaseCtrl::BkMaskBmp()
CFepUiBaseCtrl::BorderColor()
CFepUiBaseCtrl::BorderSize()
CFepUiBaseCtrl::BringToBack()
CFepUiBaseCtrl::BringToTop()
CFepUiBaseCtrl::CFepUiBaseCtrl(CCoeControl *,CFepUiLayout *,TBool)
CFepUiBaseCtrl::CFepUiBaseCtrl(const TRect &,CFepUiLayout *,TInt)
CFepUiBaseCtrl::CancelExtResponseArea()
CFepUiBaseCtrl::CancelPointerDownL()
CFepUiBaseCtrl::CapturePointer(TBool)
CFepUiBaseCtrl::Clear()
CFepUiBaseCtrl::ClearRect(const TRect &)
CFepUiBaseCtrl::CompareOrder(CFepUiBaseCtrl *)
CFepUiBaseCtrl::CompareOrderInSameGroup(CFepUiBaseCtrl *)
CFepUiBaseCtrl::ConstructFromResourceL()
CFepUiBaseCtrl::Contains(const TPoint &)
CFepUiBaseCtrl::ControlId()
CFepUiBaseCtrl::ControlType()
CFepUiBaseCtrl::CreateOwnDeviceL(CFbsBitmap *,CFbsBitmap *)
CFepUiBaseCtrl::DisableRegionUpdating()
CFepUiBaseCtrl::DrawBackground(TBool)
CFepUiBaseCtrl::DrawBackground(const TRect,TBool)
CFepUiBaseCtrl::DrawBackgroundToDevice(TRect,CFbsDevice *,CFbsBitmap *,const TRgb &,const TRgb &,TBool)
CFepUiBaseCtrl::DrawBitmap(const CFbsBitmap *,TBool)
CFepUiBaseCtrl::DrawBitmap(const TRect,const CFbsBitmap *,TBool)
CFepUiBaseCtrl::DrawMaskBackground(TBool)
CFepUiBaseCtrl::DrawOpaqueMaskBackground(TBool)
CFepUiBaseCtrl::DrawOpaqueMaskBackground(const TRect,TBool)
CFepUiBaseCtrl::DrawShadow()
CFepUiBaseCtrl::DrawTransparentMaskBackground(const TRect &,TBool)
CFepUiBaseCtrl::EnableExtResponseArea(TBool,const TRect &)
CFepUiBaseCtrl::EnableRegionUpdating()
CFepUiBaseCtrl::Extension_(TUint,TAny *&,TAny *)
CFepUiBaseCtrl::GraphicDeviceSizeChanged()
CFepUiBaseCtrl::HandlePositionChange(const TPoint &)
CFepUiBaseCtrl::HandleResourceChange(TInt)
CFepUiBaseCtrl::Hiden()
CFepUiBaseCtrl::IsActive()
CFepUiBaseCtrl::IsFepBaseControl()
CFepUiBaseCtrl::IsKindOfControl(TStockBaseCtrlType)
CFepUiBaseCtrl::IsOnTopOf(CFepUiBaseCtrl *)
CFepUiBaseCtrl::MaskBitmapDevice()
CFepUiBaseCtrl::MaskBkCol()
CFepUiBaseCtrl::Move(const TPoint &)
CFepUiBaseCtrl::MovingArea()
CFepUiBaseCtrl::NONSHARABLE_CLASS(CFepUiBaseCtrlExtension)
CFepUiBaseCtrl::OnActivate()
CFepUiBaseCtrl::OnDeActivate()
CFepUiBaseCtrl::OnLayoutDraggingEnd()
CFepUiBaseCtrl::OnLayoutDraggingStart()
CFepUiBaseCtrl::OrderPos()const
CFepUiBaseCtrl::Overlapped(CFepUiBaseCtrl *)
CFepUiBaseCtrl::ParentCtrl()
CFepUiBaseCtrl::PenColor()
CFepUiBaseCtrl::PenSize()
CFepUiBaseCtrl::PointerDown()
CFepUiBaseCtrl::ReDrawRect(const TRect &)
CFepUiBaseCtrl::Ready()
CFepUiBaseCtrl::Rect()
CFepUiBaseCtrl::Region()
CFepUiBaseCtrl::RemoveEventObserver(MEventObserver *)
CFepUiBaseCtrl::ReportEvent(TInt,const TDesC &)
CFepUiBaseCtrl::RequireRegionUpdateL(TBool)
CFepUiBaseCtrl::ResizeDeviceL()
CFepUiBaseCtrl::ResourceId()
CFepUiBaseCtrl::RootControl()
CFepUiBaseCtrl::SetAllowOverlap(TBool)
CFepUiBaseCtrl::SetBackgroundBmp(CFbsBitmap *)
CFepUiBaseCtrl::SetBackgroundMaskBmp(CFbsBitmap *)
CFepUiBaseCtrl::SetBkColor(const TRgb &)
CFepUiBaseCtrl::SetBorderColor(const TRgb &)
CFepUiBaseCtrl::SetBorderSize(const TSize &)
CFepUiBaseCtrl::SetControlType(TControlType)
CFepUiBaseCtrl::SetHidenFlag(TBool)
CFepUiBaseCtrl::SetMaskBkCol(const TRgb &)
CFepUiBaseCtrl::SetOrdinalPos(TInt)
CFepUiBaseCtrl::SetParent(CFepUiBaseCtrl *)
CFepUiBaseCtrl::SetPenColor(const TRgb &)
CFepUiBaseCtrl::SetPenSize(const TSize &)
CFepUiBaseCtrl::SetPointerDown(TBool)
CFepUiBaseCtrl::SetReady(TBool)
CFepUiBaseCtrl::SetRect(const TRect &)
CFepUiBaseCtrl::SetRegion(const RRegion &)
CFepUiBaseCtrl::SetResourceId(TInt32)
CFepUiBaseCtrl::SetShadowAreaRect(const TRect &,TShadowBitmapIndex)
CFepUiBaseCtrl::SetShadowBmp(CFbsBitmap *,CFbsBitmap *,TShadowBitmapIndex)
CFepUiBaseCtrl::SetShadowRect(const TRect &)
CFepUiBaseCtrl::SetTactileFeedbackType(TInt)
CFepUiBaseCtrl::ShadowAreaRect(TShadowBitmapIndex)
CFepUiBaseCtrl::ShadowRect()
CFepUiBaseCtrl::SimulateRawEvent(const TRawEvent &)
CFepUiBaseCtrl::TactileFeedbackType()const
CFepUiBaseCtrl::UiLayout()
CFepUiBaseCtrl::UpdateArea(const TRect &,TBool)
CFepUiBaseCtrl::UpdateAreaImmed(const TRect &,TBool)
CFepUiBaseCtrl::UpdateValidRegion(CFepUiBaseCtrl *,TBool)
CFepUiBaseCtrl::ValidClipRegion()
CFepUiBaseCtrl::WholeHiden()
CFepUiBaseCtrl::WndBasedControl()
CFepUiBaseCtrl::WndControl()
CFepUiBaseCtrl::~CFepUiBaseCtrl()
Inherited Enumerations
CFepUiBaseCtrl:TZOrder
Protected Attributes
CFbsBitmap *iActiveBmp
CFbsBitmap *iActiveBmpPressed
CFbsBitmap *iActiveMaskBmp
CFbsBitmap *iActiveMaskBmpPressed
CFbsBitmap *iNonActiveBkBmp
CFbsBitmap *iNonActiveBkBmpPressed
CFbsBitmap *iNonActiveBkMaskBmp
CFbsBitmap *iNonActiveBkMaskBmpPressed
Private Attributes
TInt iBaseline
RPointerArray< CFbsBitmap >iBmpPool
HBufC *iCaption
TRgb iCaptionColor
TRgb iCaptionShadowColor
TBool iDimmed
CFbsBitmap *iDimmedBmp
CFbsBitmap *iDimmedMaskBmp
CFont *iFont
TBool iFontOwnership
TFontSpec iFontSpec
CFbsBitmap *iNoUsedBkbmp
CFbsBitmap *iNoUsedMaskBkbmp
TBool iPressed
TInt iReserved1
TInt iReserved2
TBool iStretchable
Inherited Attributes
CFepUiBaseCtrl::iBorderColor
CFepUiBaseCtrl::iBorderSize
CFepUiBaseCtrl::iClipRegion
CFepUiBaseCtrl::iParentCtrl
CFepUiBaseCtrl::iPointerLeft
CFepUiBaseCtrl::iRect
CFepUiBaseCtrl::iResourceId
CFepUiBaseCtrl::iShadowAreaRect
CFepUiBaseCtrl::iShadowRect
CFepUiBaseCtrl::iUpdateFlagEnabled
CFepUiBaseCtrl::iValidRegion
CFepUiBaseCtrl::iWndControl

Constructor & Destructor Documentation

CButtonBase(const TRect &, CFepUiLayout *, TInt)

IMPORT_CCButtonBase(const TRect &aRect,
CFepUiLayout *aUiLayout,
TIntaControlId
)[protected]

Constructor

Since
S60 V4.0

Parameters

const TRect & aRectThe rectangle area for this control
CFepUiLayout * aUiLayoutUi layout who contains this control.Ownership not transferred
TInt aControlIdcontrol Id

~CButtonBase()

IMPORT_C~CButtonBase()[virtual]

Destructor.

Since
S60 V4.0

Member Functions Documentation

AddBmpToPool(CFbsBitmap *)

voidAddBmpToPool(CFbsBitmap *aBmp)[private]

Add a bitmap to bitmap pool

Since
S60 V4.0

Parameters

CFbsBitmap * aBmpThe bitmap to be added

BaseConstructL()

IMPORT_C voidBaseConstructL()

Do base contruction

Bitmap(TButtonBmpType, TBool)

IMPORT_C CFbsBitmap *Bitmap(TButtonBmpTypeaType,
TBoolaMaskFlag = EFalse
)

get bitmap for given type .

Since
S60 V4.0

Parameters

TButtonBmpType aTypeThe bitmap type used for
TBool aMaskFlag = EFalseEFalse if want to get the mask bitmap, otherwise, return the bitmap. Default value is EFalse.

BmpStretchable()

TBool BmpStretchable()[inline]

Get bitmap stretchable flag

Since
S60 V4.0

Draw()

IMPORT_C voidDraw()[virtual]

From CFepUiBaseCtrl Draw control

Since
S60 V4.0

HandlePointerDownEventL(const TPoint &)

IMPORT_C CFepUiBaseCtrl *HandlePointerDownEventL(const TPoint &aPoint)[protected, virtual]

From CFepUiBaseCtrl Handle pointer down event

Since
S60 V4.0

Parameters

const TPoint & aPointThe point position relative the layout

HandlePointerEnter(const TPoint &)

IMPORT_C voidHandlePointerEnter(const TPoint &aPoint)[virtual]

From CFepUiBaseCtrl Handle pointer enter event. This will be called only when it's got pointer down event before and pointer leaves but now comes back without pointer up event.

Since
S60 V4.0

Parameters

const TPoint & aPointcurrent pointer position

HandlePointerLeave(const TPoint &)

IMPORT_C voidHandlePointerLeave(const TPoint &aPoint)[virtual]

From CFepUiBaseCtrl Handle pointer levae event. This will be called only when it's got pointer down event before and now pointer leaves without pointer up event

Since
S60 V4.0

Parameters

const TPoint & aPointcurrent pointer position

HandlePointerMoveEventL(const TPoint &)

IMPORT_C CFepUiBaseCtrl *HandlePointerMoveEventL(const TPoint &aPoint)[protected, virtual]

Handle pointer move event From CFepUiBaseCtrl

Since
S60 V4.0

Parameters

const TPoint & aPointThe point position relative the layout

HandlePointerUpEventL(const TPoint &)

IMPORT_C CFepUiBaseCtrl *HandlePointerUpEventL(const TPoint &aPoint)[protected, virtual]

From CFepUiBaseCtrl Handle pointer up event

Since
S60 V4.0

Parameters

const TPoint & aPointThe point position relative the layout

Hide(TBool)

IMPORT_C voidHide(TBoolaFlag)[virtual]

Hide or shoe control. A hiden control will not handle the event.

Since
S60 V4.0

Parameters

TBool aFlagETrue if want to hide the control.

IsDimmed()

TBool IsDimmed()[inline]

Get button dimmed status .

Since
S60 V4.0

NewL(const TRect &, CFepUiLayout *, TInt)

IMPORT_C CButtonBase *NewL(const TRect &aRect,
CFepUiLayout *aUiLayout,
TIntaControlId
)[static]

Factory function.

Since
S60 V4.0

Parameters

const TRect & aRectThe rectangle area for this control
CFepUiLayout * aUiLayoutUi layout who contains this control.Ownership not transferred
TInt aControlIdcontrol Id

ResetBmpPool()

IMPORT_C voidResetBmpPool()

Reset the bitmap pool.

Since
S60 v4.0

SetActive(TBool)

IMPORT_C voidSetActive(TBoolaFlag)[virtual]

Set button active or deactive.

Since
S60 V4.0

Parameters

TBool aFlagButton status flag.

SetBackgroundBitmapL(CFbsBitmap *)

IMPORT_C voidSetBackgroundBitmapL(CFbsBitmap *aBmp)[protected, virtual]

Set background bitmap

Since
S60 V4.0

Parameters

CFbsBitmap * aBmpThe background bitmap. Ownership transferred to control

SetBackgroundMaskBitmapL(CFbsBitmap *)

IMPORT_C voidSetBackgroundMaskBitmapL(CFbsBitmap *aBmp)[protected, virtual]

Set background mask bitmap

Since
S60 V4.0

Parameters

CFbsBitmap * aBmpThe background bitmap. Ownership transferred to control

SetBitmapL(CFbsBitmap *, TButtonBmpType)

IMPORT_C voidSetBitmapL(CFbsBitmap *aBmp,
TButtonBmpTypeaType
)

Set bitmap for given status .

Since
S60 V4.0

Parameters

CFbsBitmap * aBmpThe bitmap. Ownership transferred to button
TButtonBmpType aTypeThe bitmap type used for

SetBmpStretchable(TBool)

voidSetBmpStretchable(TBoolaFlag = ETrue)[inline]

Enable bitmap stretchable. When it's set, all bitmap in this control will be stretched to fit in the control. It's stretchable by default

Since
S60 V4.0

Parameters

TBool aFlag = ETruethe bitmap stretching flag

SetCaptionColor(const TRgb &)

voidSetCaptionColor(const TRgb &aCol)[inline]

Set caption color

Since
S60 V4.0

Parameters

const TRgb & aColThe caption font color

SetCaptionL(const TDesC &)

IMPORT_C voidSetCaptionL(const TDesC &aText)

Set caption.

Since
S60 V4.0

Parameters

const TDesC & aTextThe button caption

SetCaptionShadowColor(const TRgb &)

voidSetCaptionShadowColor(const TRgb &aCol)[inline]

Set font shadow color

Since
S60 V4.0

Parameters

const TRgb & aColThe font color

SetDimmed(TBool)

IMPORT_C voidSetDimmed(TBoolaFlag)

Set button dimmed.

Since
S60 V4.0

Parameters

TBool aFlagDim status. Default value is ETrue.

SetFont(const TFontSpec &)

IMPORT_C voidSetFont(const TFontSpec &aFontSpec)

From CFepUiBaseCtrl Set control's rectangle

Since
S60 V4.0
Since
S60 V4.0

Parameters

const TFontSpec & aFontSpec

SetFont(const CFont *)

IMPORT_C voidSetFont(const CFont *aFont)

Set font information

Since
S60 V4.0

Parameters

const CFont * aFontThe font info for key drawing.Ownership not transferred

SetMaskBitmapL(CFbsBitmap *, TButtonBmpType)

IMPORT_C voidSetMaskBitmapL(CFbsBitmap *aBmp,
TButtonBmpTypeaType
)

Set mask bitmap for given status.

Since
S60 V4.0

Parameters

CFbsBitmap * aBmpThe bitmap. Ownership transferred to button
TButtonBmpType aTypeThe bitmap type used for

Member Data Documentation

CFbsBitmap * iActiveBmp

CFbsBitmap *iActiveBmp[protected]

bitmap for active state Own.

CFbsBitmap * iActiveBmpPressed

CFbsBitmap *iActiveBmpPressed[protected]

bitmap for pressing in active state Own.

CFbsBitmap * iActiveMaskBmp

CFbsBitmap *iActiveMaskBmp[protected]

mask bitmap for active state Own.

CFbsBitmap * iActiveMaskBmpPressed

CFbsBitmap *iActiveMaskBmpPressed[protected]

mask bitmap for pressing in active state Own.

TInt iBaseline

TInt iBaseline[private]

Baseline for caption

RPointerArray< CFbsBitmap > iBmpPool

RPointerArray< CFbsBitmap >iBmpPool[private]

bitmap pool for all bitmaps.

HBufC * iCaption

HBufC *iCaption[private]

Button caption

TRgb iCaptionColor

TRgb iCaptionColor[private]

Pen color for first level caption

TRgb iCaptionShadowColor

TRgb iCaptionShadowColor[private]

Pen color for caption shadow

TBool iDimmed

TBool iDimmed[private]

Button dim status

CFbsBitmap * iDimmedBmp

CFbsBitmap *iDimmedBmp[private]

bitmap for dimmed state Own.

CFbsBitmap * iDimmedMaskBmp

CFbsBitmap *iDimmedMaskBmp[private]

mask bitmap for dim stute Own.

CFont * iFont

CFont *iFont[private]

Font object for key drawing Ownership depends on flag iFontOwnership.

TBool iFontOwnership

TBool iFontOwnership[private]

Flag ownership flag. ETrue if CFont object is owned by this control.

TFontSpec iFontSpec

TFontSpec iFontSpec[private]

Font information for key drawing

CFbsBitmap * iNoUsedBkbmp

CFbsBitmap *iNoUsedBkbmp[private]

keep the bitmap for background bitmap set by SetBackgroundBitmapL in case someone used. Own.

CFbsBitmap * iNoUsedMaskBkbmp

CFbsBitmap *iNoUsedMaskBkbmp[private]

keep the bitmap for mask background bitmap set by SetBackgroundMaskBitmapL in case someone used. Own.

CFbsBitmap * iNonActiveBkBmp

CFbsBitmap *iNonActiveBkBmp[protected]

bitmap for non active state Own.

CFbsBitmap * iNonActiveBkBmpPressed

CFbsBitmap *iNonActiveBkBmpPressed[protected]

bitmap for pressing in non active state Own.

CFbsBitmap * iNonActiveBkMaskBmp

CFbsBitmap *iNonActiveBkMaskBmp[protected]

mask bitmap for non active state Own.

CFbsBitmap * iNonActiveBkMaskBmpPressed

CFbsBitmap *iNonActiveBkMaskBmpPressed[protected]

mask bitmap for pressing in non active state Own.

TBool iPressed

TBool iPressed[private]

Button pressed status

TInt iReserved1

TInt iReserved1[private]

Reserved item1

TInt iReserved2

TInt iReserved2[private]

Reserved item2

TBool iStretchable

TBool iStretchable[private]

Bitmap stretchable flag