GuiScrollCtrl
A container that allows to view one or more possibly larger controls inside its area by providing horizontal and/or vertical scroll bars.
Scolling
bool
When to display the horizontal scrollbar.
When to display the vertical scrollbar.
bool
Horizontal scrolling not allowed if set.
bool
Vertical scrolling not allowed if set.
bool
Point2I
Padding region to put around child contents.
int
Pixels/Tick - if not positive then mousewheel scrolling occurs instantly (like other scrolling).
Callbacks
void
onScroll()
Called each time the child controls are scrolled by some amount.
Public Functions
void
Refresh sizing and positioning of child controls.
Point2I
Get the current coordinates of the scrolled content.
int
Get the current X coordinate of the scrolled content.
int
Get the current Y coordinate of the scrolled content.
void
Scroll all the way to the bottom of the vertical scrollbar and the left of the horizontal bar.
void
scrollToObject(GuiControl control)
Scroll the control so that the given child control is visible.
void
Scroll all the way to the top of the vertical and left of the horizontal scrollbar.
void
setScrollPosition(int x, int y)
Set the position of the scrolled content.
Detailed Description
A container that allows to view one or more possibly larger controls inside its area by providing horizontal and/or vertical scroll bars.
Scolling
bool willFirstRespond
GuiScrollBarBehavior hScrollBar
When to display the horizontal scrollbar.
GuiScrollBarBehavior vScrollBar
When to display the vertical scrollbar.
bool lockHorizScroll
Horizontal scrolling not allowed if set.
bool lockVertScroll
Vertical scrolling not allowed if set.
bool constantThumbHeight
Point2I childMargin
Padding region to put around child contents.
int mouseWheelScrollSpeed
Pixels/Tick - if not positive then mousewheel scrolling occurs instantly (like other scrolling).
Callbacks
onScroll()
Called each time the child controls are scrolled by some amount.
Public Functions
computeSizes()
Refresh sizing and positioning of child controls.
getScrollPosition()
Get the current coordinates of the scrolled content.
The current position of the scrolled content.
getScrollPositionX()
Get the current X coordinate of the scrolled content.
The current X coordinate of the scrolled content.
getScrollPositionY()
Get the current Y coordinate of the scrolled content.
The current Y coordinate of the scrolled content.
scrollToBottom()
Scroll all the way to the bottom of the vertical scrollbar and the left of the horizontal bar.
scrollToObject(GuiControl control)
Scroll the control so that the given child control is visible.
Parameters:
control | A child control. |
scrollToTop()
Scroll all the way to the top of the vertical and left of the horizontal scrollbar.
setScrollPosition(int x, int y)
Set the position of the scrolled content.
Parameters:
x | Position on X axis. |
y | Position on y axis. |