Inheritance diagram for CEGUI::Scrollbar:
Public Member Functions | |
float | getDocumentSize (void) const |
Return the size of the document or data. | |
float | getPageSize (void) const |
Return the page size for this scroll bar. | |
float | getStepSize (void) const |
Return the step size for this scroll bar. | |
float | getOverlapSize (void) const |
Return the overlap size for this scroll bar. | |
float | getScrollPosition (void) const |
Return the current position of scroll bar within the document. | |
virtual void | initialise (void) |
Initialises the Scrollbar object ready for use. | |
void | setDocumentSize (float document_size) |
Set the size of the document or data. | |
void | setPageSize (float page_size) |
Set the page size for this scroll bar. | |
void | setStepSize (float step_size) |
Set the step size for this scroll bar. | |
void | setOverlapSize (float overlap_size) |
Set the overlap size for this scroll bar. | |
void | setScrollPosition (float position) |
Set the current position of scroll bar within the document. | |
Scrollbar (const String &type, const String &name) | |
Constructor for Scrollbar objects. | |
virtual | ~Scrollbar (void) |
Destructor for Scrollbar objects. | |
Static Public Attributes | |
static const String | EventNamespace |
Namespace for global events. | |
static const String | EventScrollPositionChanged |
Name of the event fired when the scroll bar position value changes. | |
static const String | EventThumbTrackStarted |
Name of the event fired when the user begins dragging the thumb. | |
static const String | EventThumbTrackEnded |
Name of the event fired when the user releases the thumb. | |
static const String | EventScrollConfigChanged |
Name of the event fired when the scroll bar configuration data changes. | |
Protected Member Functions | |
void | addScrollbarEvents (void) |
Add scroll bar specific events. | |
virtual PushButton * | createIncreaseButton (const String &name) const =0 |
create a PushButton based widget to use as the increase button for this scroll bar. | |
virtual PushButton * | createDecreaseButton (const String &name) const =0 |
create a PushButton based widget to use as the decrease button for this scroll bar. | |
virtual Thumb * | createThumb (const String &name) const =0 |
create a Thumb based widget to use as the thumb for this scroll bar. | |
virtual void | updateThumb (void)=0 |
update the size and location of the thumb to properly represent the current state of the scroll bar | |
virtual float | getValueFromThumb (void) const =0 |
return value that best represents current scroll bar position given the current location of the thumb. | |
virtual float | getAdjustDirectionFromPoint (const Point &pt) const =0 |
Given window location pt, return a value indicating what change should be made to the scroll bar. | |
bool | handleThumbMoved (const EventArgs &e) |
handler function for when thumb moves. | |
bool | handleIncreaseClicked (const EventArgs &e) |
handler function for when the increase button is clicked. | |
bool | handleDecreaseClicked (const EventArgs &e) |
handler function for when the decrease button is clicked. | |
bool | handleThumbTrackStarted (const EventArgs &e) |
handler function for when thumb tracking begins | |
bool | handleThumbTrackEnded (const EventArgs &e) |
handler function for when thumb tracking begins | |
virtual bool | testClassName_impl (const String &class_name) const |
Return whether this window was inherited from the given class name at some point in the inheritance heirarchy. | |
virtual void | onScrollPositionChanged (WindowEventArgs &e) |
Handler triggered when the scroll position changes. | |
virtual void | onThumbTrackStarted (WindowEventArgs &e) |
Handler triggered when the user begins to drag the scroll bar thumb. | |
virtual void | onThumbTrackEnded (WindowEventArgs &e) |
Handler triggered when the scroll bar thumb is released. | |
virtual void | onScrollConfigChanged (WindowEventArgs &e) |
Handler triggered when the scroll bar data configuration changes. | |
virtual void | onMouseButtonDown (MouseEventArgs &e) |
Handler called when a mouse button has been depressed within this window's area. | |
virtual void | onMouseWheel (MouseEventArgs &e) |
Handler called when the mouse wheel (z-axis) position changes within this window's area. | |
Protected Attributes | |
float | d_documentSize |
The size of the document / data being scrolled thorugh. | |
float | d_pageSize |
The size of a single 'page' of data. | |
float | d_stepSize |
Step size used for increase / decrease button clicks. | |
float | d_overlapSize |
Amount of overlap when jumping by a page. | |
float | d_position |
Current scroll position. | |
Thumb * | d_thumb |
widget used to represent the 'thumb' of the scroll bar. | |
PushButton * | d_increase |
Widget used for the increase button of the scroll bar. | |
PushButton * | d_decrease |
Widget used for the decrease button of the scroll bar. |
This base class for scroll bars does not have any idea of direction - a derived class would add whatever meaning is appropriate according to what that derived class represents to the user.
|
create a PushButton based widget to use as the decrease button for this scroll bar.
|
|
create a PushButton based widget to use as the increase button for this scroll bar.
|
|
create a Thumb based widget to use as the thumb for this scroll bar.
|
|
Given window location pt, return a value indicating what change should be made to the scroll bar.
|
|
Return the size of the document or data. The document size should be thought of as the total size of the data that is being scrolled through (the number of lines in a text file for example).
|
|
Return the overlap size for this scroll bar. The overlap size is the amount of data from the end of a 'page' that will remain visible when the position is moved by a page. This is usually used so that the user keeps some context of where they were within the document's data when jumping a page at a time.
|
|
Return the page size for this scroll bar. The page size is typically the amount of data that can be displayed at one time. This value is also used when calculating the amount the position will change when you click either side of the scroll bar thumb - the amount the position changes will is (pageSize - overlapSize).
|
|
Return the current position of scroll bar within the document. The range of the scroll bar is from 0 to the size of the document minus the size of a page (0 <= position <= (documentSize - pageSize)).
|
|
Return the step size for this scroll bar. The step size is typically a single unit of data that can be displayed, this is the amount the position will change when you click either of the arrow buttons on the scroll bar. (this could be 1 for a single line of text, for example).
|
|
return value that best represents current scroll bar position given the current location of the thumb.
|
|
Initialises the Scrollbar object ready for use.
Reimplemented from CEGUI::Window. |
|
Handler called when a mouse button has been depressed within this window's area.
Reimplemented from CEGUI::Window. |
|
Handler called when the mouse wheel (z-axis) position changes within this window's area.
Reimplemented from CEGUI::Window. |
|
Set the size of the document or data. The document size should be thought of as the total size of the data that is being scrolled through (the number of lines in a text file for example).
|
|
Set the overlap size for this scroll bar. The overlap size is the amount of data from the end of a 'page' that will remain visible when the position is moved by a page. This is usually used so that the user keeps some context of where they were within the document's data when jumping a page at a time.
|
|
Set the page size for this scroll bar. The page size is typically the amount of data that can be displayed at one time. This value is also used when calculating the amount the position will change when you click either side of the scroll bar thumb - the amount the position changes will is (pageSize - overlapSize).
|
|
Set the current position of scroll bar within the document. The range of the scroll bar is from 0 to the size of the document minus the size of a page (0 <= position <= (documentSize - pageSize)), any attempt to set the position outside this range will be adjusted so that it falls within the legal range.
|
|
Set the step size for this scroll bar. The step size is typically a single unit of data that can be displayed, this is the amount the position will change when you click either of the arrow buttons on the scroll bar. (this could be 1 for a single line of text, for example).
|
|
Return whether this window was inherited from the given class name at some point in the inheritance heirarchy.
Reimplemented from CEGUI::Window. |