Skip to content

AScrollbar#

A single scrollbar

Header:#include <AUI/View/AScrollbar.h>
CMake:aui_link(my_target PUBLIC aui::views)

Public Methods#

getMaxScroll#


std::size_t AScrollbar::getMaxScroll()
Returns
max scroll of this scrollbar.

If viewport size is larger than content size (in the case when contents are smaller than AScrollArea), 0 is returned.

setStickToEnd#


void AScrollbar::setStickToEnd(bool stickToEnd)

Set stick to end.

Arguments
stickToEnd

When scroll area dimensions is updated (an element added to scroll area) if the scrollbar was scrolled to the end (bottom) the scrollbar automatically scrolls to the ends, keeping the scroll position in place.