CDragBar Class Reference

class CDragBar : public CButtonBase

CDragBar

Drag bar

peninputlayoutcontrol.lib
Since
S60 V4.0
Public Member Functions
~CDragBar ()
IMPORT_C void AddPositionObserver ( MPositionObserver *)
IMPORT_C void CancelPointerDownL ()
void EnableDragging ( TBool )
IMPORT_C void HandleControlEvent ( TInt , CFepUiBaseCtrl *, const TDesC &)
IMPORT_C void HandleTimerOut ( TInt )
TBool IsDragging ()
IMPORT_C TBool IsDraggingComponent ( CFepUiBaseCtrl *)
IMPORT_C void Move (const TPoint &)
IMPORT_C CDragBar * NewL (const TRect &, CFepUiLayout *, TInt )
IMPORT_C void OnDeActivate ()
void ReCalculateDragArea ()
IMPORT_C void RemovePositionObserver ( MPositionObserver *)
IMPORT_C void SetBitmapL ( CFbsBitmap *, TButtonBmpType )
IMPORT_C void SetLongpressTimer ( TTimeIntervalMicroSeconds32 )
IMPORT_C void SetMaskBitmapL ( CFbsBitmap *, TButtonBmpType )
void SetRedrawInterval ( TTimeIntervalMicroSeconds32 )
Protected Member Functions
CDragBar (const TRect &, CFepUiLayout *, TInt )
IMPORT_C void ConstructL ()
IMPORT_C CFepUiBaseCtrl * HandlePointerDownEventL (const TPoint &)
IMPORT_C CFepUiBaseCtrl * HandlePointerMoveEventL (const TPoint &)
IMPORT_C CFepUiBaseCtrl * HandlePointerUpEventL (const TPoint &)
IMPORT_C TBool IsValidDestination (const TPoint &, TBool &, TBool &)
Private Member Functions
void AddToDraggingCtrlList ( CFepUiBaseCtrl *)
void AfterDragging ()
TRect DrawFrame (const TRect &, TBool )
void PrepareDragging ()
void ShowMovingIndicator ( 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_C CDragBar ( 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

~CDragBar()

IMPORT_C ~CDragBar ( ) [virtual]

Destructor

Since
S60 V4.0

Member Functions Documentation

AddPositionObserver(MPositionObserver *)

IMPORT_C void AddPositionObserver ( MPositionObserver * aObserver )

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

Since
S60 V4.0

Parameters

MPositionObserver * aObserver The event observer

AddToDraggingCtrlList(CFepUiBaseCtrl *)

void AddToDraggingCtrlList ( CFepUiBaseCtrl * aCtrl ) [private]

Add a control to the dragging list

Since
S60 V4.0

Parameters

CFepUiBaseCtrl * aCtrl The control to be added

AfterDragging()

void AfterDragging ( ) [private]

Restore states after dragging

Since
S60 V4.0

CancelPointerDownL()

IMPORT_C void CancelPointerDownL ( ) [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 void ConstructL ( ) [protected]

Second phrase constructor

Since
S60 V4.0

DrawFrame(const TRect &, TBool)

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

Draw control frame

Since
S60 V4.0

Parameters

const TRect & aFrameRect The rect to be drawn
TBool aDrawFlag = ETrue Draw or erase flag. ETrue if draw

EnableDragging(TBool)

void EnableDragging ( TBool aFlag = ETrue ) [inline]

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

Since
S60 V4.0

Parameters

TBool aFlag = ETrue dragging flag. Default value is ETrue

HandleControlEvent(TInt, CFepUiBaseCtrl *, const TDesC &)

IMPORT_C void HandleControlEvent ( TInt aEventType,
CFepUiBaseCtrl * aCtrl,
const TDesC & aEventData
)

From MEventObserver Handle control event

Since
S60 V4.0

Parameters

TInt aEventType The event type
CFepUiBaseCtrl * aCtrl The control who sends the event
const TDesC & aEventData The 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 & aPoint The 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 & 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

HandleTimerOut(TInt)

IMPORT_C void HandleTimerOut ( TInt aTimeType )

From MTimerHandler HandleTimerOut. Handling time out event

Since
S60 V4.0

Parameters

TInt aTimeType The timer type

IsDragging()

TBool IsDragging ( ) [inline]

Get dragging status.

Since
S60 V4.0

IsDraggingComponent(CFepUiBaseCtrl *)

IMPORT_C TBool IsDraggingComponent ( CFepUiBaseCtrl * aControl )

Check a control is the position observer of the dragbar

Since
S60 V4.0

Parameters

CFepUiBaseCtrl * aControl The control to be checked

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

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

Test whether the moving destination is valid

Since
S60 V4.0

Parameters

const TPoint & aPt The destionation point
TBool & aVInfo The valid information in vertial dirtection
TBool & aHInfo The valid information in horizontal dirtection

Move(const TPoint &)

IMPORT_C void Move ( const TPoint & aOffset ) [virtual]

From CFepUiBaseCtrl Update control and it's components rect

Since
S60 V4.0

Parameters

const TPoint & aOffset The offset to be moved

NewL(const TRect &, CFepUiLayout *, TInt)

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

OnDeActivate()

IMPORT_C void OnDeActivate ( ) [virtual]

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

Since
S60 v4.0

PrepareDragging()

void PrepareDragging ( ) [private]

Do preparation before dragging

Since
S60 V4.0

ReCalculateDragArea()

void ReCalculateDragArea ( )

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

Since
S60 v4.0

RemovePositionObserver(MPositionObserver *)

IMPORT_C void RemovePositionObserver ( MPositionObserver * aObserver )

Remove position observer.

Since
S60 V4.0

Parameters

MPositionObserver * aObserver The event observer to be removed

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

SetLongpressTimer(TTimeIntervalMicroSeconds32)

IMPORT_C void SetLongpressTimer ( TTimeIntervalMicroSeconds32 aTime )

Set the long press time out.

Since
S60 V4.0

Parameters

TTimeIntervalMicroSeconds32 aTime The long press event time out interval

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

SetRedrawInterval(TTimeIntervalMicroSeconds32)

void SetRedrawInterval ( TTimeIntervalMicroSeconds32 aTime ) [inline]

Set the moving draw interval.

Since
S60 V4.0

Parameters

TTimeIntervalMicroSeconds32 aTime The drawing interval while moving

ShowMovingIndicator(TBool)

void ShowMovingIndicator ( TBool aDrawFlag = ETrue ) [private]

Show or hide the moving indicator

Since
S60 V4.0

Parameters

TBool aDrawFlag = ETrue ETrue 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