Class hierarchy Compound list Compound Members

# Scrollable Class Reference

This is an abstract type from which are derived implementaions of scrollable types. More...

Inherits Integral.

Inherited by Scrollable1D.

List of all members.

## Public Members

- Scrollable ()
    Default Constructor.

- virtual int getVirtualSize () = 0
    Returns the total size of the scrollable object.

- virtual int getActualSize () = 0
    Returns the size of the visible area of the scrollable object.

- virtual long getMaxPosition ()
    Returns the maximum scroll position.

- virtual long isScrollable ()
    A predicate that returns non-zero if the Scrollable may actually be scrolled.

- virtual int getScrollPosition ()
    Returns the current scroll position.

- virtual void setScrollPosition (int Position)
    Set the scroll posiiton.

- virtual void increment (int amount=1)
    Increment the scroll position.

- virtual void decrement (int amount=1)
    Decrement the scroll position.

## Detailed Description

This is an abstract type from which are derived implementaions of scrollable types.

getVirtualSize() and getActualSize() are pure and must be defined in these derivations.

## Member Function Documentation

### Scrollable::Scrollable()

Default Constructor.

Initializes the scroll position to 0.

### virtual int Scrollable::getVirtualSize() = 0`[pure virtual]`

Returns the total size of the scrollable object.

For example, for a vertical Scrollable containing text, this would be the number of text lines.

Reimplemented in Scrollable1D.

### virtual int Scrollable::getActualSize() = 0`[pure virtual]`

Returns the size of the visible area of the scrollable object.

For the example of a vertical text scrollable, this would be the number of lines that are viewable at one time.

Reimplemented in Scrollable1D.

### virtual long Scrollable::getMaxPosition()`[virtual]`

Returns the maximum scroll position.

### virtual long Scrollable::isScrollable()`[virtual]`

A predicate that returns non-zero if the Scrollable may actually be scrolled.

i.e. if there is more than one scroll position.

### virtual int Scrollable::getScrollPosition()`[virtual]`

Returns the current scroll position.

### virtual void Scrollable::setScrollPosition(int Position)`[virtual]`

Set the scroll posiiton.

If Position < 0, it is set to 0; if Position > getMaxPosition(), it is set to this maximum; otherwise, the Position is accepted as is.

If the Scrollable is also a Component, the component is invalidated.

Reimplemented in Scrollable1D.

### virtual void Scrollable::increment(int amount=1)`[virtual]`

Increment the scroll position.

Reimplemented from Integral.

### virtual void Scrollable::decrement(int amount=1)`[virtual]`

Decrement the scroll position.

Reimplemented from Integral.

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

- GUI_3D.h