TEikScrollBarModel Class Reference

API published in: S60 1st Ed

Link against: eikcoctl.lib

Capability Information

Required Capabilities

None


#include <
eikscrlb.h>

Inherited by TAknDoubleSpanScrollBarModel.


Detailed Description

Scroll bar models encapsulate the range of integers which a scroll bar can represent, from zero to n, and the current position of the scroll bar thumb within that range.

Supported from Symbian 5.0.


Public Types

enum  TEikScrollBarModelType { EEikScrollBarModel = 0x00000000, EAknDoubleSpanScrollBarModel = 0x80000000 }
 Type of scroll bar model. More...

Public Member Functions

 TEikScrollBarModel ()
 C++ default constructor.
IMPORT_C TEikScrollBarModel (TInt aScrollSpan, TInt aThumbSpan=0, TInt aThumbPosition=0)
 Constructor.
IMPORT_C TBool operator== (const TEikScrollBarModel aModel) const
 Tests two models for equality.
TBool operator!= (const TEikScrollBarModel aModel) const
 Tests two models for inequality.
IMPORT_C TBool ScrollBarUseful () const
 Tests whether the scroll bar model is useful.
IMPORT_C TInt MaxThumbPos () const
 Gets the maximum position possible for the low edge of the thumb within the total span.
IMPORT_C void CheckBounds ()
 Ensures that the thumb position remains within its valid range by altering it if necessary.
TEikScrollBarModel::TEikScrollBarModelType ScrollBarModelType () const
 Gets type of scroll bar model which is one of the enum values from TEikScrollBarModelType enum.

Data Fields

TInt iScrollSpan
 Entire range of integers for this model.
TInt iThumbSpan
 Range spanned by the thumb.
TInt iThumbPosition
 Position of the low edge of the thumb within 0.

Member Enumeration Documentation

enum TEikScrollBarModel::TEikScrollBarModelType
 

Type of scroll bar model.

The different models store the scrolling information in different way, so correct model must be used with correct scrollbar type.

Enumerator:
EEikScrollBarModel  This model type is for storing data for the arrowhead scrollbar.
EAknDoubleSpanScrollBarModel  This model type is for storing data for the spanned scrollbar.

Constructor & Destructor Documentation

TEikScrollBarModel::TEikScrollBarModel  )  [inline]
 

C++ default constructor.

Creates, allocates and initialises a new TEikScrollBarModel.

IMPORT_C TEikScrollBarModel::TEikScrollBarModel TInt  aScrollSpan,
TInt  aThumbSpan = 0,
TInt  aThumbPosition = 0
 

Constructor.

Creates, allocates and initialises a new TEikScrollBarModel.

Parameters:
aScrollSpan The span of this model, numbered from zero.
aThumbSpan Number of positions spanned by the thumb.In default this is zero.
aThumbPosition Position of the thumb within the model span. In default this is zero.

Member Function Documentation

IMPORT_C void TEikScrollBarModel::CheckBounds  ) 
 

Ensures that the thumb position remains within its valid range by altering it if necessary.

IMPORT_C TInt TEikScrollBarModel::MaxThumbPos  )  const
 

Gets the maximum position possible for the low edge of the thumb within the total span.

Returns:
Maximum value possible for iThumbPosition.
TBool TEikScrollBarModel::operator!= const TEikScrollBarModel  aModel  )  const [inline]
 

Tests two models for inequality.

The two models are the current model and the model specified by aModel.

Parameters:
The model against which the current model is tested.
Returns:
ETrue if the two models are not equal.
IMPORT_C TBool TEikScrollBarModel::operator== const TEikScrollBarModel  aModel  )  const
 

Tests two models for equality.

The two models are the current model and the model specified by aModel.

Parameters:
The model against which the current model is tested.
Returns:
ETrue if the two models are equal.
TEikScrollBarModel::TEikScrollBarModelType TEikScrollBarModel::ScrollBarModelType  )  const
 

Gets type of scroll bar model which is one of the enum values from TEikScrollBarModelType enum.

IMPORT_C TBool TEikScrollBarModel::ScrollBarUseful  )  const
 

Tests whether the scroll bar model is useful.

Scroll bar models are only useful if their thumb span is smaller than their entire span.

Returns:
Whether this scroll bar can be used.

Field Documentation

TInt TEikScrollBarModel::iScrollSpan
 

Entire range of integers for this model.

TInt TEikScrollBarModel::iThumbPosition
 

Position of the low edge of the thumb within 0.

..iScrollSpan.

TInt TEikScrollBarModel::iThumbSpan
 

Range spanned by the thumb.


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

Copyright © Nokia Corporation 2001-2008
Back to top