AUI Framework  develop
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
AScrollbar Class Reference

A single scrollbar. More...

#include <AUI/View/AScrollbar.h>

Detailed Description

Member Function Documentation

> All members, including inherited

◆ getMaxScroll()

std::size_t AScrollbar::getMaxScroll ( ) const
inlinenoexcept
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.

◆ onPointerPressed()

void AScrollbar::onPointerPressed ( const APointerPressedEvent & event)
overridevirtual
Parameters
eventevent

Reimplemented from AView.

◆ onScroll()

void AScrollbar::onScroll ( const AScrollEvent & event)
overridevirtual

Handles mouse wheel events.

Parameters
eventevent info.

Reimplemented from AView.

◆ setSize()

void AScrollbar::setSize ( glm::ivec2 size)
overridevirtual

Reimplemented from AView.

◆ setStickToEnd()

void AScrollbar::setStickToEnd ( bool stickToEnd)
inline
Parameters
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.