CEikScrollBar Class Reference

#include <mw/eikscrlb.h>

class CEikScrollBar : public CEikBorderedControl

Inherits from

Nested Classes and Structures

Public Member Type Definitions
typedef TEikScrollBarFlags TAknScrollBarFlags
Public Attributes
TDblQueLink iSBLink
Protected Attributes
SEikScrollBarButtons iButtons
CEikScrollBarExtensionImpl *iExtension
TOrientation iOrientation
Public Member Enumerations
enumTEikScrollBarFlags { EEikScrollBarDefaultBehaviour, EEikScrollBarNoNudgeButtons, EEikScrollBarHasPageButtons, EEikScrollBarHasHomeEndButtons, ..., EDisableExpandedTouchArea }
enumTOrientation { EVertical, EHorizontal }
enumTScrollBarExtensionAreaType { ENormalExpandedTouchArea, EScaleExpandedTouchArea, ENoExpandedTouchArea }
enumTScrollBarType { ENormalScrollBar, EArrowHead, EDoubleSpan }
Protected Member Enumerations
enumTPointerDownOn { ENone, EHomeButton, EDecreasePageButton, EDecreaseNudgeButton, ..., EEndButton }
enumTPrivateScrollBarFlags { ENoComponentsToDisplay, EIncreaseButtonsDimmed, EDecreaseButtonsDimmed }
enumTShaftRedrawRequired { ENoRedrawRequired, ERedrawShaft }
enumTWhichButtons { EIncreaseOnly, EDecreaseOnly, EAll }
Public Member Functions
CEikScrollBar()
~CEikScrollBar()
virtual IMPORT_C voidConstructL(MEikScrollBarObserver *, const CCoeControl *, TOrientation, TInt, TInt)
CAknScrollButton *DecreaseNudgeButton()
IMPORT_C TIntDefaultScrollBarBreadth()
virtual IMPORT_C voidHandlePointerEventL(const TPointerEvent &)
CAknScrollButton *IncreaseNudgeButton()
virtual IMPORT_C voidMakeVisible(TBool)
IMPORT_C TIntMinVisibleLength(const TInt)
const TEikScrollBarModel *Model()
IMPORT_C TIntScrollBarBreadth()
TScrollBarType ScrollBarType()
IMPORT_C voidSetAllButtonsDimmed(TBool)
IMPORT_C voidSetContainingCba(CEikCba *)
IMPORT_C voidSetDecreaseButtonsDimmed(TBool)
IMPORT_C voidSetExtensionAreaType(TScrollBarExtensionAreaType)
IMPORT_C voidSetFocusPosToThumbPos(TInt)
IMPORT_C voidSetIncreaseButtonsDimmed(TBool)
IMPORT_C voidSetLengthAndModelL(TInt, const TEikScrollBarModel *)
IMPORT_C voidSetLengthL(TInt)
IMPORT_C voidSetModel(const TEikScrollBarModel *)
IMPORT_C voidSetModelL(const TEikScrollBarModel *)
IMPORT_C voidSetModelThumbPosition(TInt)
voidSetScrollBarObserver(MEikScrollBarObserver *)
IMPORT_C TIntThumbPosition()
Protected Member Functions
virtual IMPORT_C CCoeControl *ComponentControl(TInt)
virtual IMPORT_C TIntCountComponentControls()
voidCreateRequiredComponentsL()
voidDestroyButton(CAknScrollButton *&)
virtual IMPORT_C voidSetButtonPositionL(CAknScrollButton *)
Inherited Attributes
CCoeControl::iCoeEnv
CCoeControl::iContext
CCoeControl::iPosition
CCoeControl::iSize
CEikBorderedControl::iBorder
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::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::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::MaximumWidth()const
CCoeControl::MinimumSize()
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::SetAllowStrayPointers()
CCoeControl::SetBackground(const MCoeControlBackground *)
CCoeControl::SetBlank()
CCoeControl::SetCanDrawOutsideRect()
CCoeControl::SetComponentsToInheritVisibility(TBool)
CCoeControl::SetContainerWindowL(RBackedUpWindow &)
CCoeControl::SetContainerWindowL(RWindow &)
CCoeControl::SetContainerWindowL(const CCoeControl &)
CCoeControl::SetControlContext(MCoeControlContext *)
CCoeControl::SetCornerAndSize(TGulAlignment,const TSize &)
CCoeControl::SetCustomGc(CWindowGc *)
CCoeControl::SetDimmed(TBool)
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::WriteInternalStateNowL(RWriteStream &)const
CCoeControl::ZoomWithType()const
CCoeControl::operator=(const CCoeControl &)
CCoeControl::~CCoeControl()
CEikBorderedControl::Border()const
CEikBorderedControl::CEikBorderedControl()
CEikBorderedControl::CEikBorderedControl(const TGulBorder &)
CEikBorderedControl::Draw(const TRect &)const
CEikBorderedControl::GetColorUseListL(CArrayFix< TCoeColorUse > &)const
CEikBorderedControl::HandleResourceChange(TInt)
CEikBorderedControl::HasBorder()const
CEikBorderedControl::SetAdjacent(TInt)
CEikBorderedControl::SetBorder(TGulBorder::TBorderType)
CEikBorderedControl::SetBorder(TInt)
CEikBorderedControl::WriteInternalStateL(RWriteStream &)const

Detailed Description

The CEikScrollBar class implements a scroll bar. Scroll bars are used when the contents of a view require a greater area than can be physically displayed. Scroll bars allow a user to move different parts of the content into the view and to indicate what proportion of the total contents are visible at any one time.

Member Type Definition Documentation

Typedef TAknScrollBarFlags

typedef TEikScrollBarFlags TAknScrollBarFlags

Member Attribute Documentation

iButtons

SEikScrollBarButtons iButtons[protected]

Scroll bar buttons struct.

iExtension

CEikScrollBarExtensionImpl *iExtension[protected]

A pointer to CEikScrollBarExtensionImpl class.

iOrientation

TOrientation iOrientation[protected]

Scroll bar orientation.

iSBLink

TDblQueLink iSBLink

Not used, but cannot be removed due binary compatibility issues.

Member Enumeration Documentation

Enum TEikScrollBarFlags

Scroll bar initialisation flags. The default is for the scroll bar to have both a shaft and a thumb.

EnumeratorValueDescription
EEikScrollBarDefaultBehaviourSLafScrollBar::EEikScrollBarDefaultBehaviour
EEikScrollBarNoNudgeButtonsSLafScrollBar::EEikScrollBarNoNudgeButtons

Does not display nudge buttons.

EEikScrollBarHasPageButtonsSLafScrollBar::EEikScrollBarHasPageButtons

Has buttons which move it a page at a time.

EEikScrollBarHasHomeEndButtonsSLafScrollBar::EEikScrollBarHasHomeEndButtons

Has buttons which move it its entire extent.

EEikScrollBarNoShaftOrThumbSLafScrollBar::EEikScrollBarNoShaftOrThumb

Central area is empty.

EEikScrollBarShaftButNoThumbSLafScrollBar::EEikScrollBarShaftButNoThumb

Central area has no scroll thumb.

EButtonsAtStartOfShaftSLafScrollBar::EButtonsAtStartOfShaft

Buttons are placed at the start of the bar.

EButtonsAtEndOfShaftSLafScrollBar::EButtonsAtEndOfShaft

Buttons are placed at the end of the bar.

EButtonsEitherSideOfShaftSLafScrollBar::EButtonsEitherSideOfShaft

Buttons are placed at either end of the bar (EButtonsAtStartOfShaft | EButtonsAtEndOfShaft).

ENoAutoDimmingSLafScrollBar::ENoAutoDimming

Buttons do not automatically dim when scroll bar is at its maximum extent.

EEnableNudgeButtons0x0200

Enable the nudge buttons.

EDisableExpandedTouchArea0x0400

Disable the expanded touch area.

Enum TOrientation

Scroll bar orientation.

EnumeratorValueDescription
EVerticalSLafScrollBar::EVertical

Scroll bar is oriented vertically.

EHorizontalSLafScrollBar::EHorizontal

Scroll bar is oriented horizontally.

Enum TPointerDownOn

Determines where on a scroll bar a pointer down event occurred.

EnumeratorValueDescription
ENone

No pointer down event occurred on the scroll bar.

EHomeButton

A pointer down event occurred on the home button.

EDecreasePageButton

A pointer down event occurred on the decrease page button.

EDecreaseNudgeButton

A pointer down event occurred on the decrease nudge button.

EDecreaseShaft

A pointer down event occurred on the decrease shaft button.

EThumb

A pointer down event occurred on the scroll bar thumb.

EIncreaseShaft

A pointer down event occurred on the increase shaft button.

EIncreaseNudgeButton

A pointer down event occurred on the increase nudge button.

EIncreasePageButton

A pointer down event occurred on the increase page button.

EEndButton

A pointer down event occurred on the end button.

Enum TPrivateScrollBarFlags

Flags to determine whether there are visible components and whether to dim the increase, or decrease, buttons.

EnumeratorValueDescription
ENoComponentsToDisplay0x10000

There are no visible components in the scroll bar.

EIncreaseButtonsDimmed0x20000

Dim the increase buttons.

EDecreaseButtonsDimmed0x40000

Dim the decrease buttons.

Enum TScrollBarExtensionAreaType

Type of the scroll extension area.

EnumeratorValueDescription
ENormalExpandedTouchArea

Normal scrollbar extension area.

EScaleExpandedTouchArea

Scale scrollbar extension area.

ENoExpandedTouchArea

none scrollbar extension area.

Enum TScrollBarType

Type of the scroll bar.

EnumeratorValueDescription
ENormalScrollBar0x0

Normal scrollbar.

EArrowHead0x200

Used scrollbar type is an old one. (arrows in the CBA-area)

EDoubleSpan0x400

The created scrollbar is the current and commonly used in Series 60 platform, spanned scrollbar. (scrollable bar on the right side of the control, like in windows etc.).

Enum TShaftRedrawRequired

Determines whether to redraw the scroll bar shaft.

EnumeratorValueDescription
ENoRedrawRequired

Do not redraw the scroll bar shaft.

ERedrawShaft

Redraw the scroll bar shaft.

Enum TWhichButtons

Determines which buttons are displayed.

EnumeratorValueDescription
EIncreaseOnly

Display the increase buttons only.

EDecreaseOnly

Display the decrease buttons only.

EAll

Display all buttons.

Constructor & Destructor Documentation

CEikScrollBar ( )

IMPORT_CCEikScrollBar()

C++ default constructor.

~CEikScrollBar ( )

IMPORT_C~CEikScrollBar()

Destructor.

Member Function Documentation

ComponentControl ( TInt )

IMPORT_C CCoeControl *ComponentControl(TIntaIndex)const [protected, virtual]

From CCoeControl

Gets the specified scrollbar component. Each component control is identified by an index, where the index depends on the order the controls were added: the first is given an index of 0, the next an index of 1.

ParameterDescription
aIndexThe index of the control to get.

Returns: The component control with an index of aIndex.

ConstructL ( MEikScrollBarObserver *, const CCoeControl *, TOrientation, TInt, TInt )

IMPORT_C voidConstructL(MEikScrollBarObserver *aScrollBarObserver,
const CCoeControl *aParent,
TOrientationaOrientation,
TIntaLength,
TIntaScrollBarFlags = EEikScrollBarDefaultBehaviour
)[virtual]

Second phase constructor of the scroll bar.

ParameterDescription
aScrollBarObserverThe scroll bar observer which is to be informed of scroll events by this scroll bar.
aParentParent control for this new scroll bar.
aOrientationOrientation of the new scroll bar.
aLengthNot used.
aScrollBarFlagsNot used.

CountComponentControls ( )

IMPORT_C TIntCountComponentControls()const [protected, virtual]

From .

Gets the number of controls contained in this scrollbar.

Returns: The number of component controls contained by this scrollbar.

CreateRequiredComponentsL ( )

voidCreateRequiredComponentsL()[protected]

Allocates and constructs all the required components of the scrollbar.

DecreaseNudgeButton ( )

CAknScrollButton *DecreaseNudgeButton()const [inline]

Gets handle to the controls that draw arrows in the both ends of spanned scrollbar. These arrows are for pen support to enable exact moving of the scrollbar with pen. The arrow is tapped with the pen to move the scrollbar with one step.

Returns: Pointer to the decreace button.

DefaultScrollBarBreadth ( )

IMPORT_C TIntDefaultScrollBarBreadth()[static]

Gets the default width of the scroll bar.

Returns: Default scroll bar breadth.

DestroyButton ( CAknScrollButton *& )

voidDestroyButton(CAknScrollButton *&aButton)[protected]

Destroys a button.

ParameterDescription
aButtonA button that will be destroyed.

HandlePointerEventL ( const TPointerEvent & )

IMPORT_C voidHandlePointerEventL(const TPointerEvent &aPointerEvent)[virtual]

From CCoeControl

Called by the framework to handle pointer events.

ParameterDescription
aPointerEventA pointer event.

IncreaseNudgeButton ( )

CAknScrollButton *IncreaseNudgeButton()const [inline]

Gets handle to the controls that draw arrows in the both ends of spanned scrollbar. These arrows are for pen support to enable exact moving of the scrollbar with pen. The arrow is tapped with the pen to move the scrollbar with one step.

Returns: Pointer to the increace button.

MakeVisible ( TBool )

IMPORT_C voidMakeVisible(TBoolaVisible)[virtual]

From CCoeControl.

Sets this control as visible or invisible.

If MakeVisible() is used to make a component visible, and the control captures the pointer (see CapturesPointer()), MakeVisible() throws away any pending pointer events for that control.

ParameterDescription
aVisibleETrue to make the control visible, EFalse to make it invisible.

MinVisibleLength ( const TInt )

IMPORT_C TIntMinVisibleLength(const TIntaScrollBarFlags)[static]

Not implemented.

ParameterDescription
aScrollBarFlagsNot used.

Returns: Zero.

Model ( )

const TEikScrollBarModel *Model()const [inline]

Gets the scroll bar model used by this scroll bar.

ScrollBarBreadth ( )

IMPORT_C TIntScrollBarBreadth()const

Gets the height of a horizontal scrollbar or width of a vertical scrollbar.

Returns: Scroll bar breadth.

ScrollBarType ( )

TScrollBarType ScrollBarType()

Gets the scroll bar type.

Returns: Value of the enum TScrollBarType.

SetAllButtonsDimmed ( TBool )

IMPORT_C voidSetAllButtonsDimmed(TBoolaDimmed)

Not implemented.

ParameterDescription
aDimmedNot used.

SetButtonPositionL ( CAknScrollButton * )

IMPORT_C voidSetButtonPositionL(CAknScrollButton *aButton)[protected, virtual]

Not implemented

ParameterDescription
aButtonNot used.

SetContainingCba ( CEikCba * )

IMPORT_C voidSetContainingCba(CEikCba *aCba)

Sets command button area. This function should only be used by CEikCba.

panic
EEikPanicScrollBarExtensionNotCreated Extension of the scroll bar not created.
ParameterDescription
aCbaCommand button area.

SetDecreaseButtonsDimmed ( TBool )

IMPORT_C voidSetDecreaseButtonsDimmed(TBoolaDimmed)

Not implemented.

ParameterDescription
aDimmedNot used.

SetExtensionAreaType ( TScrollBarExtensionAreaType )

IMPORT_C voidSetExtensionAreaType(TScrollBarExtensionAreaTypeaType)

Not implemented.

ParameterDescription
aTypeThe extension area to use.

SetFocusPosToThumbPos ( TInt )

IMPORT_C voidSetFocusPosToThumbPos(TIntaFocusPosition)

Not implemented.

ParameterDescription
aFocusPositionNot used.

SetIncreaseButtonsDimmed ( TBool )

IMPORT_C voidSetIncreaseButtonsDimmed(TBoolaDimmed)

Not implemented.

ParameterDescription
aDimmedNot used.

SetLengthAndModelL ( TInt, const TEikScrollBarModel * )

IMPORT_C voidSetLengthAndModelL(TIntaLength,
const TEikScrollBarModel *aModel
)

Change the model at once to avoid a double update of the scroll bar.

ParameterDescription
aLengthNot used.
aModelNew scroll bar model.

SetLengthL ( TInt )

IMPORT_C voidSetLengthL(TIntaLength)

Not implemented.

ParameterDescription
aLengthNot used.

SetModel ( const TEikScrollBarModel * )

IMPORT_C voidSetModel(const TEikScrollBarModel *aModel)

Change the scrollbar model.

ParameterDescription
aModelThe new model to use.

SetModelL ( const TEikScrollBarModel * )

IMPORT_C voidSetModelL(const TEikScrollBarModel *aModel)

Change the scrollbar model.

ParameterDescription
aModelThe new model to use.

SetModelThumbPosition ( TInt )

IMPORT_C voidSetModelThumbPosition(TIntaThumbPos)

Not implemented.

ParameterDescription
aThumbPosNot used.

SetScrollBarObserver ( MEikScrollBarObserver * )

voidSetScrollBarObserver(MEikScrollBarObserver *aScrollBarObserver)

Allows scroll bar observer to be changed also after the construction. This function is not exported, but the applications can use it via CEikScrollBarFrame::SetScrollBarFrameObserver function.

ParameterDescription
aScrollBarObserverNew observer replacing the previous (if any).

ThumbPosition ( )

IMPORT_C TIntThumbPosition()const

Gets the position within the scroll bar model. This function would normally be called by an MEikScrollBarObserver implementation in response to a scroll bar event.

Returns: Current position within the scroll bar model s range.