Location:
eikscrlb.h
Link against:
eikcoctl.lib
CEikScrollBar
Supported from 6.0
A scroll bar. Scroll bars are used when all the content of another control cannot be seen at the same time. They may be oriented horizontally or vertically, and may be displayed in several ways.
Scroll bars represent integers, and have a maximum, a minimum, and a current position encapsulated within their model. The on-screen image of a scroll bar is calculated and displayed by the CEikScrollBar
object, and user changes to the scroll bar (and hence its model) are reported to an interested class through the MEikScrollBarObserver
interface.
|
Defined in CEikScrollBar
:
ActivateL()
, CEikScrollBar()
, ComponentControl()
, ConstructL()
, CountComponentControls()
, DefaultScrollBarBreadth()
, DoSetLengthL()
, Draw()
, EAll
, EButtonsAtEndOfShaft
, EButtonsAtStartOfShaft
, EButtonsEitherSideOfShaft
, EDecreaseButtonsDimmed
, EDecreaseNudgeButton
, EDecreaseOnly
, EDecreasePageButton
, EDecreaseShaft
, EEikScrollBarHasHomeEndButtons
, EEikScrollBarHasPageButtons
, EEikScrollBarNoNudgeButtons
, EEikScrollBarNoShaftOrThumb
, EEikScrollBarShaftButNoThumb
, EEndButton
, EHomeButton
, EHorizontal
, EIncreaseButtonsDimmed
, EIncreaseNudgeButton
, EIncreaseOnly
, EIncreasePageButton
, EIncreaseShaft
, ENoAutoDimming
, ENoComponentsToDisplay
, ENoRedrawRequired
, ENone
, ERedrawShaft
, EThumb
, EVertical
, GetColorUseListL()
, HandlePointerEventL()
, HandleResourceChange()
, MinVisibleLength()
, Model()
, NumberOfButtonPairs()
, SEikScrollBarButtons
, ScrollBarBreadth()
, SetAllButtonsDimmed()
, SetButtonPositionL()
, SetDecreaseButtonsDimmed()
, SetDimmed()
, SetIncreaseButtonsDimmed()
, SetLayoutL()
, SetLengthAndModelL()
, SetLengthL()
, SetModelL()
, SetModelThumbPosition()
, SetScrollBarObserver()
, TEikScrollBarFlags
, TOrientation
, TPointerDownOn
, TPrivateScrollBarFlags
, TShaftRedrawRequired
, TWhichButtons
, ThumbPosition()
, iButtons
, iDecreaseButtonsEnd
, iDecreaseButtonsStart
, iIncreaseButtonsEnd
, iIncreaseButtonsStart
, iLength
, iOrientation
, iPointerDownOn
, iScrollBarDisplayFlags
, iScrollBarFlags
, iScrollBarObserver
, ~CEikScrollBar()
Inherited from CBase
:
operator new()
Inherited from CCoeControl
:
ActivateGc()
,
BackedUpWindow()
,
CapturesPointer()
,
ClaimPointerGrab()
,
CloseWindow()
,
ConstructFromResourceL()
,
ControlContext()
,
ControlEnv()
,
CopyControlContextFrom()
,
CreateBackedUpWindowL()
,
CreateWindowL()
,
DeactivateGc()
,
DrawDeferred()
,
DrawNow()
,
DrawableWindow()
,
EnableDragEvents()
,
FocusChanged()
,
GetColor()
,
GetHelpContext()
,
GrabbingComponent()
,
HandleComponentControlsResourceChange()
,
HandlePointerBufferReadyL()
,
HandleRedrawEvent()
,
IgnoreEventsUntilNextPointerUp()
,
Index()
,
InputCapabilities()
,
IsActivated()
,
IsBackedUp()
,
IsBeingDestroyed()
,
IsBlank()
,
IsDimmed()
,
IsFocused()
,
IsNonFocusing()
,
IsReadyToDraw()
,
IsVisible()
,
MakeVisible()
,
MinimumSize()
,
Observer()
,
OfferKeyEventL()
,
OverrideColorL()
,
OwnsWindow()
,
Position()
,
PositionChanged()
,
PositionRelativeToScreen()
,
PrepareForFocusGainL()
,
PrepareForFocusLossL()
,
Rect()
,
RecursivelyMergedInputCapabilities()
,
ReportEventL()
,
ResetGc()
,
SetAllowStrayPointers()
,
SetBlank()
,
SetCanDrawOutsideRect()
,
SetComponentsToInheritVisibility()
,
SetContainerWindow()
,
SetContainerWindowL()
,
SetControlContext()
,
SetCornerAndSize()
,
SetCornerAndSizeL()
,
SetExtent()
,
SetExtentL()
,
SetExtentToWholeScreen()
,
SetExtentToWholeScreenL()
,
SetFocus()
,
SetFocusing()
,
SetGloballyCapturing()
,
SetNeighbor()
,
SetNonFocusing()
,
SetObserver()
,
SetPointerCapture()
,
SetPosition()
,
SetRect()
,
SetRectL()
,
SetSize()
,
SetSizeL()
,
SetSizeWithoutNotification()
,
SetSizeWithoutNotificationL()
,
Size()
,
SizeChanged()
,
SizeChangedL()
,
SystemGc()
,
Window()
Inherited from CEikBorderedControl
:
Border()
,
HasBorder()
,
SetAdjacent()
,
SetBorder()
,
iBorder
Inherited from MCoeControlObserver
:
EEventInteractionRefused
,
EEventPrepareFocusTransition
,
EEventRequestCancel
,
EEventRequestExit
,
EEventRequestFocus
,
EEventStateChanged
,
HandleControlEventL()
,
TCoeEvent
CEikScrollBar();
Allocates memory for a CEikScrollBar
, but does not initialise its fields.
void ConstructL(MEikScrollBarObserver* aScrollBarObserver,const CCoeControl* aParent,TOrientation aOrientation,TInt aLength,TInt aScrollBarFlags);
Completes the construction of the scroll bar.
|
~CEikScrollBar();
Frees memory allocated during this object’s construction, and any resources it owns.
static TInt MinVisibleLength(const TInt aScrollBarFlags);
Calculates the minimum length in which scrollbar can be drawn. Note that this does not mean that all scroll bar components will be drawn.
|
|
void SetLengthL(TInt aLength);
Changes the scroll bar’s on-screen length and redraws it.
|
void SetModelThumbPosition(TInt aThumbPos);
Changes the position within the model, and updates the on-screen image of the thumb within the scroll bar.
|
void SetLengthAndModelL(TInt aLength, const TEikScrollBarModel* aModel);
Change the length and model at once to avoid a double update of the scroll bar.
|
void SetModelL(const TEikScrollBarModel* aModel);
Changes the model used by this scroll bar. The thumb will be updated.
|
void SetScrollBarObserver(MEikScrollBarObserver* aScrollBarObserver);
Sets the scroll bar observer.
|
TInt ThumbPosition() 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.
|
TInt ScrollBarBreadth() const;
Gets the height of a horizontal scrollbar or width of a vertical scrollbar.
|
const TEikScrollBarModel* Model() const;
Gets the scroll bar model used by this scroll bar.
|
TInt DefaultScrollBarBreadth();
Gets the default breadth of the scroll bar, which is the height of horizontal scroll bar or the width of a vertical scroll bar.
|
virtual void GetColorUseListL(CArrayFix<TCoeColorUse>& aColorUseList) const;
Gets the list of logical colors employed in the drawing of the control, paired with an explanation of how they are used. Appends the list to aColorUseList
.
|
void SetDecreaseButtonsDimmed(TBool aDimmed);
Sets the decrease buttons’ dim state. Dimming, or greying out, indicates user input is not accepted.
|
void SetIncreaseButtonsDimmed(TBool aDimmed);
Sets the increase buttons’ dim state. Dimming, or greying out, indicates user input is not accepted.
|
void SetAllButtonsDimmed(TBool aDimmed);
Sets all buttons’ dim state. Dimming, or greying out, indicates user input is not accepted.
|
The following member functions provide appropriate implementations of functions declared virtual
in CCoeControl
.
virtual void HandlePointerEventL(const TPointerEvent& aPointerEvent);
Called by the framework to handle pointer events.
|
virtual void Draw(const TRect& aRect) const;
Draws the entire scroll bar.
|
virtual void SetDimmed(TBool aDimmed);
Sets the dimmed state of the scroll bar, but does not redraw it.
|
virtual void HandleResourceChange(TInt aType);
Handles a change to the control's resources which are shared across the environment. Colours or fonts for example.
|
TInt CountComponentControls() const;
Gets the number of controls contained in this scrollbar.
|
CCoeControl* ComponentControl(TInt aIndex) const;
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.
|
|
void DoSetLengthL(TInt aLength);
Sets the scrollbar’s length and re-calculates required components and their layout.
|
TInt NumberOfButtonPairs(TBool aUseDisplayFlags) const;
Gets either the number of pairs of buttons requested or the number of pairs of buttons displayed.
|
|
void SetButtonPositionL(CEikScrollButton* aButton);
Calculates and sets a button’s position, making necessary adjustments for densely packed buttons
|
void SetLayoutL();
Sets the position of various components according to the scroll bar’s flags.
TEikScrollBarFlags
Scroll bar initialisation flags. The default is for the scroll bar to have both a shaft and a thumb.
|
TOrientation
Scroll bar orientation.
|
TWhichButtons
Determines which buttons are displayed.
|
TShaftRedrawRequired
Determines whether to redraw the scroll bar shaft.
|
TPrivateScrollBarFlags
Flags to determine whether there are visible components and whether to dim the increase, or decrease, buttons.
|
TPointerDownOn
Determines where on a scroll bar a pointer down event occurred.
|
SEikScrollBarButtons
Encapsulates pointers to the scroll bar buttons. A maximum of three pairs of buttons are available, you may choose to use only one pair or two pairs.
Defined in CEikScrollBar::SEikScrollBarButtons
:
iDecreaseNudge
, iDecreasePage
, iEnd
, iHome
, iIncreaseNudge
, iIncreasePage
iDecreaseNudge
CEikScrollButton* iDecreaseNudge
Pointer to the decrease nudge button.
iDecreasePage
CEikScrollButton* iDecreasePage
Pointer to the decrease page button.
iEnd
CEikScrollButton* iEnd
Pointer to the end button.
iHome
CEikScrollButton* iHome
Pointer to the home button.
iIncreaseNudge
CEikScrollButton* iIncreaseNudge
Pointer to the increase nudge button.
iIncreasePage
CEikScrollButton* iIncreasePage
Pointer to the increase page button.
TPointerDownOn iPointerDownOn
The scroll bar location on which a pointer down event occurred.
TInt iScrollBarDisplayFlags
Flags to determine which scroll bar components are displayed.
TInt iScrollBarFlags
Flags to determine the scroll bar’s components, layout and dim state.
MEikScrollBarObserver* iScrollBarObserver
Observer to which scroll bar events are reported.