GuiScrollCtrl

A container that allows to view one or more possibly larger controls inside its area by providing horizontal and/or vertical scroll bars.

Inherit:
GuiContainer

Description

A container that allows to view one or more possibly larger controls inside its area by providing horizontal and/or vertical scroll bars.

Methods

void GuiScrollCtrl::computeSizes()

Refresh sizing and positioning of child controls.

Point2I GuiScrollCtrl::getScrollPosition()

Get the current coordinates of the scrolled content.

Returns:The current position of the scrolled content.
int GuiScrollCtrl::getScrollPositionX()

Get the current X coordinate of the scrolled content.

Returns:The current X coordinate of the scrolled content.
int GuiScrollCtrl::getScrollPositionY()

Get the current Y coordinate of the scrolled content.

Returns:The current Y coordinate of the scrolled content.
void GuiScrollCtrl::onScroll()

Called each time the child controls are scrolled by some amount.

void GuiScrollCtrl::scrollToBottom()

Scroll all the way to the bottom of the vertical scrollbar and the left of the horizontal bar.

void GuiScrollCtrl::scrollToObject(GuiControl control)

Scroll the control so that the given child control is visible.

Parameters:control – A child control.
void GuiScrollCtrl::scrollToTop()

Scroll all the way to the top of the vertical and left of the horizontal scrollbar.

void GuiScrollCtrl::setScrollPosition(int x, int y)

Set the position of the scrolled content.

Parameters:
  • x – Position on X axis.
  • y – Position on y axis.

Fields

Point2I GuiScrollCtrl::childMargin

Padding region to put around child contents.

bool GuiScrollCtrl::constantThumbHeight
GuiScrollBarBehavior GuiScrollCtrl::hScrollBar

When to display the horizontal scrollbar.

bool GuiScrollCtrl::lockHorizScroll

Horizontal scrolling not allowed if set.

bool GuiScrollCtrl::lockVertScroll

Vertical scrolling not allowed if set.

int GuiScrollCtrl::mouseWheelScrollSpeed

Pixels/Tick - if not positive then mousewheel scrolling occurs instantly (like other scrolling).

GuiScrollBarBehavior GuiScrollCtrl::vScrollBar

When to display the vertical scrollbar.

bool GuiScrollCtrl::willFirstRespond