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 void BaseConstructL ()
IMPORT_C CFbsBitmap * Bitmap ( TButtonBmpType , TBool )
TBool BmpStretchable ()
IMPORT_C void Draw ()
IMPORT_C void HandlePointerEnter (const TPoint &)
IMPORT_C void HandlePointerLeave (const TPoint &)
IMPORT_C void Hide ( TBool )
TBool IsDimmed ()
IMPORT_C CButtonBase * NewL (const TRect &, CFepUiLayout *, TInt )
IMPORT_C void ResetBmpPool ()
IMPORT_C void SetActive ( TBool )
IMPORT_C void SetBitmapL ( CFbsBitmap *, TButtonBmpType )
void SetBmpStretchable ( TBool )
void SetCaptionColor (const TRgb &)
IMPORT_C void SetCaptionL (const TDesC &)
void SetCaptionShadowColor (const TRgb &)
IMPORT_C void SetDimmed ( TBool )
IMPORT_C void SetFont (const TFontSpec &)
IMPORT_C void SetFont (const CFont *)
IMPORT_C void SetMaskBitmapL ( 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 void SetBackgroundBitmapL ( CFbsBitmap *)
IMPORT_C void SetBackgroundMaskBitmapL ( CFbsBitmap *)
Private Member Functions
void AddBmpToPool ( 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_C CButtonBase ( const TRect & aRect,
CFepUiLayout * aUiLayout,
TInt aControlId
) [protected]

Constructor

Since
S60 V4.0

Parameters

const TRect & aRect The rectangle area for this control
CFepUiLayout * aUiLayout Ui layout who contains this control.Ownership not transferred
TInt aControlId control Id

~CButtonBase()

IMPORT_C ~CButtonBase ( ) [virtual]

Destructor.

Since
S60 V4.0

Member Functions Documentation

AddBmpToPool(CFbsBitmap *)

void AddBmpToPool ( CFbsBitmap * aBmp ) [private]

Add a bitmap to bitmap pool

Since
S60 V4.0

Parameters

CFbsBitmap * aBmp The bitmap to be added

BaseConstructL()

IMPORT_C void BaseConstructL ( )

Do base contruction

Bitmap(TButtonBmpType, TBool)

IMPORT_C CFbsBitmap * Bitmap ( TButtonBmpType aType,
TBool aMaskFlag = EFalse
)

get bitmap for given type .

Since
S60 V4.0

Parameters

TButtonBmpType aType The bitmap type used for
TBool aMaskFlag = EFalse EFalse 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 void Draw ( ) [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 & aPoint The point position relative the layout

HandlePointerEnter(const TPoint &)

IMPORT_C void HandlePointerEnter ( 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 & aPoint current pointer position

HandlePointerLeave(const TPoint &)

IMPORT_C void HandlePointerLeave ( 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 & aPoint current 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 & aPoint The 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 & aPoint The point position relative the layout

Hide(TBool)

IMPORT_C void Hide ( TBool aFlag ) [virtual]

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

Since
S60 V4.0

Parameters

TBool aFlag ETrue 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,
TInt aControlId
) [static]

Factory function.

Since
S60 V4.0

Parameters

const TRect & aRect The rectangle area for this control
CFepUiLayout * aUiLayout Ui layout who contains this control.Ownership not transferred
TInt aControlId control Id

ResetBmpPool()

IMPORT_C void ResetBmpPool ( )

Reset the bitmap pool.

Since
S60 v4.0

SetActive(TBool)

IMPORT_C void SetActive ( TBool aFlag ) [virtual]

Set button active or deactive.

Since
S60 V4.0

Parameters

TBool aFlag Button status flag.

SetBackgroundBitmapL(CFbsBitmap *)

IMPORT_C void SetBackgroundBitmapL ( CFbsBitmap * aBmp ) [protected, virtual]

Set background bitmap

Since
S60 V4.0

Parameters

CFbsBitmap * aBmp The background bitmap. Ownership transferred to control

SetBackgroundMaskBitmapL(CFbsBitmap *)

IMPORT_C void SetBackgroundMaskBitmapL ( CFbsBitmap * aBmp ) [protected, virtual]

Set background mask bitmap

Since
S60 V4.0

Parameters

CFbsBitmap * aBmp The background bitmap. Ownership transferred to control

SetBitmapL(CFbsBitmap *, TButtonBmpType)

IMPORT_C void SetBitmapL ( CFbsBitmap * aBmp,
TButtonBmpType aType
)

Set bitmap for given status .

Since
S60 V4.0

Parameters

CFbsBitmap * aBmp The bitmap. Ownership transferred to button
TButtonBmpType aType The bitmap type used for

SetBmpStretchable(TBool)

void SetBmpStretchable ( TBool aFlag = 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 = ETrue the bitmap stretching flag

SetCaptionColor(const TRgb &)

void SetCaptionColor ( const TRgb & aCol ) [inline]

Set caption color

Since
S60 V4.0

Parameters

const TRgb & aCol The caption font color

SetCaptionL(const TDesC &)

IMPORT_C void SetCaptionL ( const TDesC & aText )

Set caption.

Since
S60 V4.0

Parameters

const TDesC & aText The button caption

SetCaptionShadowColor(const TRgb &)

void SetCaptionShadowColor ( const TRgb & aCol ) [inline]

Set font shadow color

Since
S60 V4.0

Parameters

const TRgb & aCol The font color

SetDimmed(TBool)

IMPORT_C void SetDimmed ( TBool aFlag )

Set button dimmed.

Since
S60 V4.0

Parameters

TBool aFlag Dim status. Default value is ETrue.

SetFont(const TFontSpec &)

IMPORT_C void SetFont ( 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 void SetFont ( const CFont * aFont )

Set font information

Since
S60 V4.0

Parameters

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

SetMaskBitmapL(CFbsBitmap *, TButtonBmpType)

IMPORT_C void SetMaskBitmapL ( CFbsBitmap * aBmp,
TButtonBmpType aType
)

Set mask bitmap for given status.

Since
S60 V4.0

Parameters

CFbsBitmap * aBmp The bitmap. Ownership transferred to button
TButtonBmpType aType The 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