|
TachyonUI 0.1.0
High-performance UI for building tools.
|
Scroll containers' offsets (pixels), kept across frames by ID behind handles. More...
#include <gui_core/state/gui_scroll_management.h>
Public Member Functions | |
| void | BeginFrame () |
| void | EndFrame (IDManager &idManager) |
| ScrollOffsetHandle | GetOrCreateScrollOffsetHandle (ID id) |
| ScrollOffsetHandle | GetScrollOffsetHandle (ID id) |
| bool | IsScrollOffsetHandleValid (ScrollOffsetHandle handle) const |
| int2 | GetScrollOffset (ScrollOffsetHandle handle) |
| void | SetScrollOffset (ScrollOffsetHandle handle, int2 offset) |
| bool | MakeRectVisibleInScroll (ScrollOffsetHandle scrollHandle, int2 rectMin, int2 rectMax, int2 containerSize, ScrollAxis axis=ScrollAxis::Both) |
| Scrolls just enough to show rectMin..rectMax (content space) in a container of containerSize; true when it scrolled. | |
| bool | MakeRectVisibleHierarchically (ElementStorage &elementStorage, int2 targetRectMin, int2 targetRectMax, const ElementRef &elementRef, ScrollAxis axis=ScrollAxis::Both) |
| Scrolls elementRef's scroll ancestors to show the target rect (screen space). | |
| bool | MakeRectVisibleHierarchically (ElementStorage &elementStorage, IntRect targetRect, const ElementRef &elementRef, ScrollAxis axis=ScrollAxis::Both) |
| bool | MakeElementVisibleHierarchically (ElementStorage &elementStorage, const ElementRef &elementRef, ScrollAxis axis=ScrollAxis::Both) |
| bool | MakeTextCursorVisibleInTextBox (ElementStorage &elementStorage, const ElementRef &textEditorRef, int2 cursorPos, int cursorHeight=1) |
| Scrolls a text editor to show its cursor; cursorPos is in the editor's content space. | |
Scroll containers' offsets (pixels), kept across frames by ID behind handles.
EndFrame drops the offsets of static IDs that were released and of other IDs not used this frame.
| void tachyon::ScrollManagement::BeginFrame | ( | ) |
| void tachyon::ScrollManagement::EndFrame | ( | IDManager & | idManager | ) |
| ScrollOffsetHandle tachyon::ScrollManagement::GetOrCreateScrollOffsetHandle | ( | ID | id | ) |
| ScrollOffsetHandle tachyon::ScrollManagement::GetScrollOffsetHandle | ( | ID | id | ) |
| bool tachyon::ScrollManagement::IsScrollOffsetHandleValid | ( | ScrollOffsetHandle | handle | ) | const |
| int2 tachyon::ScrollManagement::GetScrollOffset | ( | ScrollOffsetHandle | handle | ) |
| void tachyon::ScrollManagement::SetScrollOffset | ( | ScrollOffsetHandle | handle, |
| int2 | offset ) |
| bool tachyon::ScrollManagement::MakeRectVisibleInScroll | ( | ScrollOffsetHandle | scrollHandle, |
| int2 | rectMin, | ||
| int2 | rectMax, | ||
| int2 | containerSize, | ||
| ScrollAxis | axis = ScrollAxis::Both ) |
Scrolls just enough to show rectMin..rectMax (content space) in a container of containerSize; true when it scrolled.
Oversized, partly visible rects stay put.
| bool tachyon::ScrollManagement::MakeRectVisibleHierarchically | ( | ElementStorage & | elementStorage, |
| int2 | targetRectMin, | ||
| int2 | targetRectMax, | ||
| const ElementRef & | elementRef, | ||
| ScrollAxis | axis = ScrollAxis::Both ) |
Scrolls elementRef's scroll ancestors to show the target rect (screen space).
|
inline |
| bool tachyon::ScrollManagement::MakeElementVisibleHierarchically | ( | ElementStorage & | elementStorage, |
| const ElementRef & | elementRef, | ||
| ScrollAxis | axis = ScrollAxis::Both ) |
| bool tachyon::ScrollManagement::MakeTextCursorVisibleInTextBox | ( | ElementStorage & | elementStorage, |
| const ElementRef & | textEditorRef, | ||
| int2 | cursorPos, | ||
| int | cursorHeight = 1 ) |
Scrolls a text editor to show its cursor; cursorPos is in the editor's content space.