15#include <AUI/Util/ALayoutDirection.h>
16#include <AUI/View/AView.h>
29 void setDirection(ALayoutDirection direction) {
30 mDirection = direction;
33 void beginDrag(
const glm::ivec2& mousePos);
34 bool mouseDrag(
const glm::ivec2& mousePos);
36 mDraggingDividerIndex = -1;
43 mItems = std::move(items);
47 mItems = items.map([](
const _<AView>& view) {
return Item { .view = view }; });
51 bool isDragging()
const {
52 return mDraggingDividerIndex != -1;
55 bool isDraggingArea(glm::ivec2 position);
81 ALayoutDirection mDirection;
82 size_t mDraggingDividerIndex = -1;
86 float getTotalOccupiedSizeOf(
const _<AView>& view) {
87 return mDirection == ALayoutDirection::VERTICAL ? view->getTotalOccupiedHeight() : view->getTotalOccupiedWidth();
92 T& getAxisValue(glm::tvec2<T>& v) {
93 return aui::layout_direction::getAxisValue(mDirection, v);
98 T getAxisValue(
const glm::tvec2<T>& v) {
99 return aui::layout_direction::getAxisValue(mDirection, v);
Utility wrapper implementing the stack-allocated (fast) optional idiom.
Definition: AOptional.h:32
Definition: ASplitterHelper.h:18
int reclaimSpace(int space)
Reclaims space via the last divider.
Definition: ASplitterHelper.h:76
int reclaimSpace(int space, size_t dividerIndex)
Reclaims space via specified divider index.
Definition: ASplitterHelper.cpp:135
A resizeable horizontal or vertical layout.
Definition: ASplitter.h:46
A std::vector with AUI extensions.
Definition: AVector.h:38
An std::weak_ptr with AUI extensions.
Definition: SharedPtrTypes.h:177
Definition: ASplitterHelper.h:21