Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: eikscrlb.h
Link against: eikcoctl.lib

Class TEikScrollBarModel

TEikScrollBarModel

Support

Supported from 6.0

Description

The model for a CEikScrollBar. 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.

Defined in TEikScrollBarModel:
CheckBounds(), MaxThumbPos(), ScrollBarUseful(), TEikScrollBarModel(), iScrollSpan, iThumbPosition, iThumbSpan, operator!=(), operator==()


Construction


TEikScrollBarModel()

TEikScrollBarModel();

Description

Constructor.

Creates, allocates and initialises a new TEikScrollBarModel.


TEikScrollBarModel()

TEikScrollBarModel (TInt aScrollSpan, TInt aThumbSpan=0, TInt aThumbPosition=0);

Description

Constructor.

Creates, allocates and initialises a new TEikScrollBarModel.

Parameters

TInt aScrollSpan

The span of this model, numbered from zero.

TInt aThumbSpan=0

Number of positions spanned by the thumb.

TInt aThumbPosition=0

Position of the thumb within the model span.

[Top]


Member functions


ScrollBarUseful()

TBool ScrollBarUseful() const;

Description

Tests whether the scroll bar model is useful. Scroll bar models are only useful if their thumb span is smaller than their entire span.

Return value

TBool

Whether this scroll bar can be used.


MaxThumbPos()

TInt MaxThumbPos() const;

Description

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

Return value

TInt

Maximum value possible for iThumbPosition.


CheckBounds()

void CheckBounds();

Description

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


operator!=()

TBool operator!=(const TEikScrollBarModel aModel) const;

Description

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

Parameters

const TEikScrollBarModel aModel

The model against which the current model is tested.

Return value

TBool

ETrue if the two models are not equal.


operator==()

TBool operator==(const TEikScrollBarModel aModel) const;

Description

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

Parameters

const TEikScrollBarModel aModel

The model against which the current model is tested.

Return value

TBool

ETrue if the two models are equal.

[Top]


Public data members


iScrollSpan

iScrollSpan

Description

Entire range of integers for this model.


iThumbSpan

iThumbSpan

Description

Range spanned by the thumb.


iThumbPosition

iThumbPosition

Description

Position of the low edge of the thumb within 0...iScrollSpan.