Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ONE::gui::Scrollable Class Reference

Inheritance diagram for ONE::gui::Scrollable:

Inheritance graph
[legend]
List of all members.

Detailed Description

abstract base for Component s that may be added to a Viewport.

Author:
Daniel Seibert


Public Member Functions

virtual int getScrollStep (const Bounds &visRect, Orientation o, bool dir) const =0
 calculates the size of the next scrolling step
ViewportgetViewport () const
 accesses the surrounding Viewport
 Scrollable ()
virtual ~Scrollable ()


Constructor & Destructor Documentation

ONE::gui::Scrollable::Scrollable  ) 
 

virtual ONE::gui::Scrollable::~Scrollable  )  [virtual]
 


Member Function Documentation

virtual int ONE::gui::Scrollable::getScrollStep const Bounds visRect,
Orientation  o,
bool  dir
const [pure virtual]
 

calculates the size of the next scrolling step

Scrollable s that have logical sections such as rows and/or columns should return the distance needed to fully expose the next section. Other components should return a sensible value. The return value's sign must match the dir parameter, i.e. it must be negative for left or upward and positive for right or downward scrolling.

the rectangle displayed by the Viewport o the scroll orientation, HORIZONTAL or VERTICAL dir the scroll direction, true for positive (right/down) or false for negative (left/up) scroll direction

Returns:
the scrolling step size as specified above

Implemented in ONE::gui::List.

Viewport* ONE::gui::Scrollable::getViewport  )  const
 

accesses the surrounding Viewport

Returns:
the surrounding viewport or 0 if this object is not contained in a viewport


Generated on Wed Sep 7 19:03:19 2005 for ONEngine by  doxygen 1.4.3