CDragBar Class Reference

class CDragBar : public CButtonBase

CDragBar

Drag bar

peninputlayoutcontrol.lib
Since
S60 V4.0

Inherits from

Public Member Functions
~CDragBar()
IMPORT_C voidAddPositionObserver(MPositionObserver *)
IMPORT_C voidCancelPointerDownL()
voidEnableDragging(TBool)
IMPORT_C voidHandleControlEvent(TInt, CFepUiBaseCtrl *, const TDesC &)
IMPORT_C voidHandleTimerOut(TInt)
TBool IsDragging()
IMPORT_C TBoolIsDraggingComponent(CFepUiBaseCtrl *)
IMPORT_C voidMove(const TPoint &)
IMPORT_C CDragBar *NewL(const TRect &, CFepUiLayout *, TInt)
IMPORT_C voidOnDeActivate()
voidReCalculateDragArea()
IMPORT_C voidRemovePositionObserver(MPositionObserver *)
IMPORT_C voidSetBitmapL(CFbsBitmap *, TButtonBmpType)
IMPORT_C voidSetLongpressTimer(TTimeIntervalMicroSeconds32)
IMPORT_C voidSetMaskBitmapL(CFbsBitmap *, TButtonBmpType)
voidSetRedrawInterval(TTimeIntervalMicroSeconds32)
Protected Member Functions
CDragBar(const TRect &, CFepUiLayout *, TInt)
IMPORT_C voidConstructL()
IMPORT_C CFepUiBaseCtrl *HandlePointerDownEventL(const TPoint &)
IMPORT_C CFepUiBaseCtrl *HandlePointerMoveEventL(const TPoint &)
IMPORT_C CFepUiBaseCtrl *HandlePointerUpEventL(const TPoint &)
IMPORT_C TBoolIsValidDestination(const TPoint &, TBool &, TBool &)
Private Member Functions
voidAddToDraggingCtrlList(CFepUiBaseCtrl *)
voidAfterDragging()
TRect DrawFrame(const TRect &, TBool)
voidPrepareDragging()
voidShowMovingIndicator(TBool)
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()
CButtonBase::BaseConstructL()
CButtonBase::Bitmap(TButtonBmpType,TBool)
CButtonBase::BmpStretchable()
CButtonBase::CButtonBase(const TRect &,CFepUiLayout *,TInt)
CButtonBase::Draw()
CButtonBase::HandlePointerEnter(const TPoint &)
CButtonBase::HandlePointerLeave(const TPoint &)
CButtonBase::Hide(TBool)
CButtonBase::IsDimmed()
CButtonBase::ResetBmpPool()
CButtonBase::SetActive(TBool)
CButtonBase::SetBackgroundBitmapL(CFbsBitmap *)
CButtonBase::SetBackgroundMaskBitmapL(CFbsBitmap *)
CButtonBase::SetBmpStretchable(TBool)
CButtonBase::SetCaptionColor(const TRgb &)
CButtonBase::SetCaptionL(const TDesC &)
CButtonBase::SetCaptionShadowColor(const TRgb &)
CButtonBase::SetDimmed(TBool)
CButtonBase::SetFont(const CFont *)
CButtonBase::SetFont(const TFontSpec &)
CButtonBase::~CButtonBase()
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::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::MovingArea()
CFepUiBaseCtrl::NONSHARABLE_CLASS(CFepUiBaseCtrlExtension)
CFepUiBaseCtrl::OnActivate()
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
Private Attributes
TPoint iCurrentPointerPos
TRect iDragFrameRect
RPointerArray< CFepUiBaseCtrl >iDraggingCtrlList
TBool iDraggingEnabled
TPoint iDraggingStartPt
TTimeIntervalMicroSeconds32 iDrawInterval
TBool iIsDragging
TBool iLayoutBeingDraged
CLayoutTimer *iLongPressTimer
TBool iLongPressed
TTimeIntervalMicroSeconds32 iLongtimePressTimeout
TPoint iMoveOffset
CLayoutTimer *iMoveTimer
TBool iMoved
CFbsBitmap *iMovingIndicatorBmp
CFbsBitmap *iMovingIndicatorMaskBmp
TPoint iMovingIndicatorPos
TBool iNeedLongtimePress
RPointerArray< MPositionObserver >iPosObserverList
TInt iReserved1
TInt iReserved2
Inherited Attributes
CButtonBase::iActiveBmp
CButtonBase::iActiveBmpPressed
CButtonBase::iActiveMaskBmp
CButtonBase::iActiveMaskBmpPressed
CButtonBase::iNonActiveBkBmp
CButtonBase::iNonActiveBkBmpPressed
CButtonBase::iNonActiveBkMaskBmp
CButtonBase::iNonActiveBkMaskBmpPressed
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

CDragBar(const TRect &, CFepUiLayout *, TInt)

IMPORT_CCDragBar(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

~CDragBar()

IMPORT_C~CDragBar()[virtual]

Destructor

Since
S60 V4.0

Member Functions Documentation

AddPositionObserver(MPositionObserver *)

IMPORT_C voidAddPositionObserver(MPositionObserver *aObserver)

Add position observer. When drag bar moved, the observer will get notified.

Since
S60 V4.0

Parameters

MPositionObserver * aObserverThe event observer

AddToDraggingCtrlList(CFepUiBaseCtrl *)

voidAddToDraggingCtrlList(CFepUiBaseCtrl *aCtrl)[private]

Add a control to the dragging list

Since
S60 V4.0

Parameters

CFepUiBaseCtrl * aCtrlThe control to be added

AfterDragging()

voidAfterDragging()[private]

Restore states after dragging

Since
S60 V4.0

CancelPointerDownL()

IMPORT_C voidCancelPointerDownL()[virtual]

Cancel pointer down event. This will be called when a control has pointer down but pointer up event happens in other ways. If overrided, this base implementation must be called in order to report the event.

Since
S60 V4.0

ConstructL()

IMPORT_C voidConstructL()[protected]

Second phrase constructor

Since
S60 V4.0

DrawFrame(const TRect &, TBool)

TRect DrawFrame(const TRect &aFrameRect,
TBoolaDrawFlag = ETrue
)[private]

Draw control frame

Since
S60 V4.0

Parameters

const TRect & aFrameRectThe rect to be drawn
TBool aDrawFlag = ETrueDraw or erase flag. ETrue if draw

EnableDragging(TBool)

voidEnableDragging(TBoolaFlag = ETrue)[inline]

Enable/disable dragging feature. Dragging is enabled by default when created.

Since
S60 V4.0

Parameters

TBool aFlag = ETruedragging flag. Default value is ETrue

HandleControlEvent(TInt, CFepUiBaseCtrl *, const TDesC &)

IMPORT_C voidHandleControlEvent(TIntaEventType,
CFepUiBaseCtrl *aCtrl,
const TDesC &aEventData
)

From MEventObserver Handle control event

Since
S60 V4.0

Parameters

TInt aEventTypeThe event type
CFepUiBaseCtrl * aCtrlThe control who sends the event
const TDesC & aEventDataThe event data

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

HandlePointerMoveEventL(const TPoint &)

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

From CFepUiBaseCtrl Handle pointer move event

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

HandleTimerOut(TInt)

IMPORT_C voidHandleTimerOut(TIntaTimeType)

From MTimerHandler HandleTimerOut. Handling time out event

Since
S60 V4.0

Parameters

TInt aTimeTypeThe timer type

IsDragging()

TBool IsDragging()[inline]

Get dragging status.

Since
S60 V4.0

IsDraggingComponent(CFepUiBaseCtrl *)

IMPORT_C TBoolIsDraggingComponent(CFepUiBaseCtrl *aControl)

Check a control is the position observer of the dragbar

Since
S60 V4.0

Parameters

CFepUiBaseCtrl * aControlThe control to be checked

IsValidDestination(const TPoint &, TBool &, TBool &)

IMPORT_C TBoolIsValidDestination(const TPoint &aPt,
TBool &aVInfo,
TBool &aHInfo
)[protected]

Test whether the moving destination is valid

Since
S60 V4.0

Parameters

const TPoint & aPtThe destionation point
TBool & aVInfoThe valid information in vertial dirtection
TBool & aHInfoThe valid information in horizontal dirtection

Move(const TPoint &)

IMPORT_C voidMove(const TPoint &aOffset)[virtual]

From CFepUiBaseCtrl Update control and it's components rect

Since
S60 V4.0

Parameters

const TPoint & aOffsetThe offset to be moved

NewL(const TRect &, CFepUiLayout *, TInt)

IMPORT_C CDragBar *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

OnDeActivate()

IMPORT_C voidOnDeActivate()[virtual]

From CFepUiBaseCtrl OnDeActivate. Called when the layout is going to be hidden

Since
S60 v4.0

PrepareDragging()

voidPrepareDragging()[private]

Do preparation before dragging

Since
S60 V4.0

ReCalculateDragArea()

voidReCalculateDragArea()

Recalculate moving area. It's called when it's observer changes size.

Since
S60 v4.0

RemovePositionObserver(MPositionObserver *)

IMPORT_C voidRemovePositionObserver(MPositionObserver *aObserver)

Remove position observer.

Since
S60 V4.0

Parameters

MPositionObserver * aObserverThe event observer to be removed

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 dragbar
TButtonBmpType aType

SetLongpressTimer(TTimeIntervalMicroSeconds32)

IMPORT_C voidSetLongpressTimer(TTimeIntervalMicroSeconds32aTime)

Set the long press time out.

Since
S60 V4.0

Parameters

TTimeIntervalMicroSeconds32 aTimeThe long press event time out interval

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 dragbar aType The type of bitmap
TButtonBmpType aType

SetRedrawInterval(TTimeIntervalMicroSeconds32)

voidSetRedrawInterval(TTimeIntervalMicroSeconds32aTime)[inline]

Set the moving draw interval.

Since
S60 V4.0

Parameters

TTimeIntervalMicroSeconds32 aTimeThe drawing interval while moving

ShowMovingIndicator(TBool)

voidShowMovingIndicator(TBoolaDrawFlag = ETrue)[private]

Show or hide the moving indicator

Since
S60 V4.0

Parameters

TBool aDrawFlag = ETrueETrue if show the moving indicator. Default value ETrue

Member Data Documentation

TPoint iCurrentPointerPos

TPoint iCurrentPointerPos[private]

Currnt pointer position. Need to kept since we use timely drawing.

TRect iDragFrameRect

TRect iDragFrameRect[private]

The rect to be drawn when dragging. It's the rect of whole dragging area

RPointerArray< CFepUiBaseCtrl > iDraggingCtrlList

RPointerArray< CFepUiBaseCtrl >iDraggingCtrlList[private]

A list keeps all the control belongs to the dragging area

TBool iDraggingEnabled

TBool iDraggingEnabled[private]

Draing enabler flag. Only this flag set can dragbar movable. Default value is ETrue

TPoint iDraggingStartPt

TPoint iDraggingStartPt[private]

dragging start position

TTimeIntervalMicroSeconds32 iDrawInterval

TTimeIntervalMicroSeconds32 iDrawInterval[private]

Redraw timer interval. While moving, it's not drawn if another redraw event comes

TBool iIsDragging

TBool iIsDragging[private]

dragging flag

TBool iLayoutBeingDraged

TBool iLayoutBeingDraged[private]

Flag tells whether whole layout is being draged

CLayoutTimer * iLongPressTimer

CLayoutTimer *iLongPressTimer[private]

long press timer Own.

TBool iLongPressed

TBool iLongPressed[private]

Flag tells whether long pressing happend

TTimeIntervalMicroSeconds32 iLongtimePressTimeout

TTimeIntervalMicroSeconds32 iLongtimePressTimeout[private]

Long time press timer interval

TPoint iMoveOffset

TPoint iMoveOffset[private]

Moving offset when drag bar is moving.

CLayoutTimer * iMoveTimer

CLayoutTimer *iMoveTimer[private]

Redraw timer for moving Own

TBool iMoved

TBool iMoved[private]

Moving flag, is it moving.

CFbsBitmap * iMovingIndicatorBmp

CFbsBitmap *iMovingIndicatorBmp[private]

Moving indicator bitmap Own.

CFbsBitmap * iMovingIndicatorMaskBmp

CFbsBitmap *iMovingIndicatorMaskBmp[private]

Moving indicator mask bitmap Own

TPoint iMovingIndicatorPos

TPoint iMovingIndicatorPos[private]

The position where moving indidator is displayed

TBool iNeedLongtimePress

TBool iNeedLongtimePress[private]

Long time press event flag. When this is enabled, dragbar starts move only after long press time out

RPointerArray< MPositionObserver > iPosObserverList

RPointerArray< MPositionObserver >iPosObserverList[private]

Position change observer list

TInt iReserved1

TInt iReserved1[private]

Reserved item1

TInt iReserved2

TInt iReserved2[private]

Reserved item2