CEikScrollBar Class Reference

API published in: S60 1st Ed

Link against: eikcoctl.lib

Capability Information

Required Capabilities

None


#include <eikscrlb.h>

Inherits CEikBorderedControl.

Inherited by CAknDoubleSpanScrollBar, and CEikArrowHeadScrollBar.


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.


Public Types

typedef TEikScrollBarFlags  TAknScrollBarFlags
enum   TOrientation { EVertical = SLafScrollBar::EVertical, EHorizontal = SLafScrollBar::EHorizontal }
  Scroll bar orientation. More...
enum   TScrollBarType { ENormalScrollBar = 0x0, EArrowHead = 0x200, EDoubleSpan = 0x400 }
  Type of the scroll bar. More...
enum   TEikScrollBarFlags {
  EEikScrollBarDefaultBehaviour, EEikScrollBarNoNudgeButtons, EEikScrollBarHasPageButtons, EEikScrollBarHasHomeEndButtons,
  EEikScrollBarNoShaftOrThumb, EEikScrollBarShaftButNoThumb, EButtonsAtStartOfShaft, EButtonsAtEndOfShaft,
  EButtonsEitherSideOfShaft, ENoAutoDimming
}
  Scroll bar initialisation flags. More...

Public Member Functions

IMPORT_C  ~CEikScrollBar ()
  Destructor.
IMPORT_C  CEikScrollBar ()
  C++ default constructor.
virtual IMPORT_C void  ConstructL (MEikScrollBarObserver *aScrollBarObserver, const CCoeControl *aParent, TOrientation aOrientation, TInt aLength, TInt aScrollBarFlags=EEikScrollBarDefaultBehaviour)
  Second phase constructor of the scroll bar.
IMPORT_C void  SetLengthL (TInt aLength)
  Not implemented.
IMPORT_C void  SetModelL (const TEikScrollBarModel *aModel)
  Change the scrollbar model.
IMPORT_C void  SetModel (const TEikScrollBarModel *aModel)
  Change the scrollbar model.
IMPORT_C void  SetLengthAndModelL (TInt aLength, const TEikScrollBarModel *aModel)
  Change the model at once to avoid a double update of the scroll bar.
IMPORT_C void  SetModelThumbPosition (TInt aThumbPos)
  Not implemented.
IMPORT_C void  SetFocusPosToThumbPos (TInt aFocusPosition)
  Not implemented.
void  SetScrollBarObserver (MEikScrollBarObserver *aScrollBarObserver)
  Allows scroll bar observer to be changed also after the construction.
const TEikScrollBarModel Model () const
  Gets the scroll bar model used by this scroll bar.
IMPORT_C TInt  ThumbPosition () const
  Gets the position within the scroll bar model.
IMPORT_C TInt  ScrollBarBreadth () const
  Gets the height of a horizontal scrollbar or width of a vertical scrollbar.
IMPORT_C void  SetDecreaseButtonsDimmed (TBool aDimmed)
  Not implemented.
IMPORT_C void  SetIncreaseButtonsDimmed (TBool aDimmed)
  Not implemented.
IMPORT_C void  SetAllButtonsDimmed (TBool aDimmed)
  Not implemented.
CAknScrollButton IncreaseNudgeButton () const
  Gets handle to the controls that draw arrows in the both ends of spanned scrollbar.
CAknScrollButton DecreaseNudgeButton () const
  Gets handle to the controls that draw arrows in the both ends of spanned scrollbar.
IMPORT_C void  SetContainingCba (CEikCba *aCba)
  Sets command button area.
IMPORT_C void  MakeVisible (TBool aVisible)
  From CCoeControl.
IMPORT_C void  HandlePointerEventL (const TPointerEvent &aPointerEvent)
  From CCoeControl.
TScrollBarType  ScrollBarType ()
  Gets the scroll bar type.

Static Public Member Functions

static IMPORT_C TInt  DefaultScrollBarBreadth ()
  Gets the default width of the scroll bar.
static IMPORT_C TInt  MinVisibleLength (const TInt aScrollBarFlags)
  Not implemented.

Data Fields

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

Protected Types

enum   TPrivateScrollBarFlags { ENoComponentsToDisplay = 0x10000, EIncreaseButtonsDimmed = 0x20000, EDecreaseButtonsDimmed = 0x40000 }
  Flags to determine whether there are visible components and whether to dim the increase, or decrease, buttons. More...
enum   TPointerDownOn {
  ENone, EHomeButton, EDecreasePageButton, EDecreaseNudgeButton,
  EDecreaseShaft, EThumb, EIncreaseShaft, EIncreaseNudgeButton,
  EIncreasePageButton, EEndButton
}
  Determines where on a scroll bar a pointer down event occurred. More...
enum   TShaftRedrawRequired { ENoRedrawRequired, ERedrawShaft }
  Determines whether to redraw the scroll bar shaft. More...
enum   TWhichButtons { EIncreaseOnly, EDecreaseOnly, EAll }
  Determines which buttons are displayed. More...

Protected Member Functions

IMPORT_C CCoeControl *  ComponentControl (TInt aIndex) const
  From CCoeControl.
IMPORT_C TInt  CountComponentControls () const
  From .
void  CreateRequiredComponentsL ()
  Allocates and constructs all the required components of the scrollbar.
void  DestroyButton (CAknScrollButton *&aButton)
  Destroys a button.
virtual IMPORT_C void  SetButtonPositionL (CAknScrollButton *aButton)
  Not implemented.

Protected Attributes

SEikScrollBarButtons  iButtons
  Scroll bar buttons struct.
TOrientation  iOrientation
  Scroll bar orientation.
CEikScrollBarExtensionImpl *  iExtension
  A pointer to CEikScrollBarExtensionImpl class.

Friends

class  CEikScrollBarExtension
class  CAknDoubleSpanScrollBarExtension
class  CEikScrollBarFrame
  The scroll bar frame is a control assemblage manager that relates a control, or control body, to two scroll bars and a corner window.

Data Structures

struct   SEikScrollBarButtons
  Encapsulates pointers to the scroll bar buttons. More...

Member Typedef Documentation

typedef TEikScrollBarFlags CEikScrollBar::TAknScrollBarFlags
 

Member Enumeration Documentation

enum CEikScrollBar::TEikScrollBarFlags
 

Scroll bar initialisation flags.

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

Enumerator:
EEikScrollBarDefaultBehaviour 
EEikScrollBarNoNudgeButtons  Does not display nudge buttons.
EEikScrollBarHasPageButtons  Has buttons which move it a page at a time.
EEikScrollBarHasHomeEndButtons  Has buttons which move it its entire extent.
EEikScrollBarNoShaftOrThumb  Central area is empty.
EEikScrollBarShaftButNoThumb  Central area has no scroll thumb.
EButtonsAtStartOfShaft  Buttons are placed at the start of the bar.
EButtonsAtEndOfShaft  Buttons are placed at the end of the bar.
EButtonsEitherSideOfShaft  Buttons are placed at either end of the bar (EButtonsAtStartOfShaft | EButtonsAtEndOfShaft).
ENoAutoDimming  Buttons do not automatically dim when scroll bar is at its maximum extent.
enum CEikScrollBar::TOrientation
 

Scroll bar orientation.

Enumerator:
EVertical  Scroll bar is oriented vertically.
EHorizontal  Scroll bar is oriented horizontally.
enum CEikScrollBar::TPointerDownOn [protected]
 

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

Enumerator:
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 CEikScrollBar::TPrivateScrollBarFlags [protected]
 

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

Enumerator:
ENoComponentsToDisplay  There are no visible components in the scroll bar.
EIncreaseButtonsDimmed  Dim the increase buttons.
EDecreaseButtonsDimmed  Dim the decrease buttons.
enum CEikScrollBar::TScrollBarType
 

Type of the scroll bar.

Enumerator:
ENormalScrollBar  Normal scrollbar.
EArrowHead  Used scrollbar type is an old one.

(arrows in the CBA-area)

EDoubleSpan  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 CEikScrollBar::TShaftRedrawRequired [protected]
 

Determines whether to redraw the scroll bar shaft.

Enumerator:
ENoRedrawRequired  Do not redraw the scroll bar shaft.
ERedrawShaft  Redraw the scroll bar shaft.
enum CEikScrollBar::TWhichButtons [protected]
 

Determines which buttons are displayed.

Enumerator:
EIncreaseOnly  Display the increase buttons only.
EDecreaseOnly  Display the decrease buttons only.
EAll  Display all buttons.

Constructor & Destructor Documentation

IMPORT_C CEikScrollBar::~CEikScrollBar  ) 
 

Destructor.

IMPORT_C CEikScrollBar::CEikScrollBar  ) 
 

C++ default constructor.


Member Function Documentation

IMPORT_C CCoeControl* CEikScrollBar::ComponentControl TInt  aIndex  )  const [protected]
 

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.

Parameters:
aIndex  The index of the control to get.
Returns:
The component control with an index of aIndex.

Reimplemented in CAknDoubleSpanScrollBar.

virtual IMPORT_C void CEikScrollBar::ConstructL MEikScrollBarObserver aScrollBarObserver,
const CCoeControl *  aParent,
TOrientation  aOrientation,
TInt  aLength,
TInt  aScrollBarFlags = EEikScrollBarDefaultBehaviour
[virtual]
 

Second phase constructor of the scroll bar.

Parameters:
aScrollBarObserver  The scroll bar observer which is to be informed of scroll events by this scroll bar.
aParent  Parent control for this new scroll bar.
aOrientation  Orientation of the new scroll bar.
aLength  Not used.
aScrollBarFlags  Not used.
IMPORT_C TInt CEikScrollBar::CountComponentControls  )  const [protected]
 

From .

Gets the number of controls contained in this scrollbar.

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

Reimplemented in CAknDoubleSpanScrollBar.

void CEikScrollBar::CreateRequiredComponentsL  )  [protected]
 

Allocates and constructs all the required components of the scrollbar.

CAknScrollButton * CEikScrollBar::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.
static IMPORT_C TInt CEikScrollBar::DefaultScrollBarBreadth  )  [static]
 

Gets the default width of the scroll bar.

Returns:
Default scroll bar breadth.
void CEikScrollBar::DestroyButton CAknScrollButton *&  aButton  )  [protected]
 

Destroys a button.

Parameters:
aButton  A button that will be destroyed.
IMPORT_C void CEikScrollBar::HandlePointerEventL const TPointerEvent &  aPointerEvent  ) 
 

From CCoeControl.

Called by the framework to handle pointer events.

Parameters:
aPointerEvent  A pointer event.

Reimplemented from CEikBorderedControl.

Reimplemented in CEikArrowHeadScrollBar, and CAknDoubleSpanScrollBar.

CAknScrollButton * CEikScrollBar::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.
IMPORT_C void CEikScrollBar::MakeVisible TBool  aVisible  ) 
 

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.

Parameters:
aVisible  ETrue to make the control visible, EFalse to make it invisible.

Reimplemented in CAknDoubleSpanScrollBar.

static IMPORT_C TInt CEikScrollBar::MinVisibleLength const TInt  aScrollBarFlags  )  [static]
 

Not implemented.

Parameters:
aScrollBarFlags  Not used.
Returns:
Zero.
const TEikScrollBarModel * CEikScrollBar::Model  )  const [inline]
 

Gets the scroll bar model used by this scroll bar.

IMPORT_C TInt CEikScrollBar::ScrollBarBreadth  )  const
 

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

Returns:
Scroll bar breadth.
TScrollBarType CEikScrollBar::ScrollBarType  ) 
 

Gets the scroll bar type.

Returns:
Value of the enum TScrollBarType.
IMPORT_C void CEikScrollBar::SetAllButtonsDimmed TBool  aDimmed  ) 
 

Not implemented.

Parameters:
aDimmed  Not used.
virtual IMPORT_C void CEikScrollBar::SetButtonPositionL CAknScrollButton aButton  )  [protected, virtual]
 

Not implemented.

Parameters:
aButton  Not used.
IMPORT_C void CEikScrollBar::SetContainingCba CEikCba aCba  ) 
 

Sets command button area.

This function should only be used by CEikCba.

Parameters:
aCba  Command button area.
Panic:
EEikPanicScrollBarExtensionNotCreated Extension of the scroll bar not created.
IMPORT_C void CEikScrollBar::SetDecreaseButtonsDimmed TBool  aDimmed  ) 
 

Not implemented.

Parameters:
aDimmed  Not used.
IMPORT_C void CEikScrollBar::SetFocusPosToThumbPos TInt  aFocusPosition  ) 
 

Not implemented.

Parameters:
aFocusPosition  Not used.
IMPORT_C void CEikScrollBar::SetIncreaseButtonsDimmed TBool  aDimmed  ) 
 

Not implemented.

Parameters:
aDimmed  Not used.
IMPORT_C void CEikScrollBar::SetLengthAndModelL TInt  aLength,
const TEikScrollBarModel aModel
 

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

Parameters:
aLength  Not used.
aModel  New scroll bar model.
IMPORT_C void CEikScrollBar::SetLengthL TInt  aLength  ) 
 

Not implemented.

Parameters:
aLength  Not used.
IMPORT_C void CEikScrollBar::SetModel const TEikScrollBarModel aModel  ) 
 

Change the scrollbar model.

Parameters:
aModel  The new model to use.
IMPORT_C void CEikScrollBar::SetModelL const TEikScrollBarModel aModel  ) 
 

Change the scrollbar model.

Parameters:
aModel  The new model to use.
IMPORT_C void CEikScrollBar::SetModelThumbPosition TInt  aThumbPos  ) 
 

Not implemented.

Parameters:
aThumbPos  Not used.
void CEikScrollBar::SetScrollBarObserver 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.

Parameters:
aScrollBarObserver  New observer replacing the previous (if any).
IMPORT_C TInt CEikScrollBar::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.

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

Friends And Related Function Documentation

friend class CAknDoubleSpanScrollBarExtension [friend]
 
friend class CEikScrollBarExtension [friend]
 
friend class CEikScrollBarFrame [friend]
 

The scroll bar frame is a control assemblage manager that relates a control, or control body, to two scroll bars and a corner window.

A corner window is that part of the screen that is common to both the horizontal, and the vertical elements of a scroll bar.

This class helps with access to, and set up of, scroll bars and also with the layout of the scrolled control or control body. A scroll bar frame is not a control, but it does implement the standard control composite pattern to manage the assemblage.


Field Documentation

SEikScrollBarButtons CEikScrollBar::iButtons [protected]
 

Scroll bar buttons struct.

CEikScrollBarExtensionImpl* CEikScrollBar::iExtension [protected]
 

A pointer to CEikScrollBarExtensionImpl class.

TOrientation CEikScrollBar::iOrientation [protected]
 

Scroll bar orientation.

TDblQueLink CEikScrollBar::iSBLink
 

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


The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top