15#include "AViewContainer.h"
16#include "AScrollAreaViewport.h"
17#include "AScrollbar.h"
44 void setSize(glm::ivec2 size)
override;
46 mInner->setContents(std::move(content));
55 void setScroll(glm::uvec2
scroll) {
60 void setScrollX(
unsigned scroll) {
61 AUI_NULLSAFE(mHorizontalScrollbar)->setScroll(
int(
scroll));
62 else mInner->setScrollX(
scroll);
65 void setScrollY(
unsigned scroll) {
66 AUI_NULLSAFE(mVerticalScrollbar)->setScroll(
int(
scroll));
67 else mInner->setScrollY(
scroll);
75 AUI_NULLSAFE(mHorizontalScrollbar)->setStickToEnd(stickToEnd);
76 AUI_NULLSAFE(mVerticalScrollbar)->setStickToEnd(stickToEnd);
79 void scroll(glm::ivec2 by)
noexcept {
83 void scroll(
int deltaByX,
int deltaByY)
noexcept {
84 AUI_NULLSAFE(mHorizontalScrollbar)->scroll(deltaByX);
85 else mInner->setScrollX(mInner->scroll().x + deltaByX);
86 AUI_NULLSAFE(mVerticalScrollbar)->scroll(deltaByY);
87 else mInner->setScrollY(mInner->scroll().y + deltaByY);
90 bool onGesture(
const glm::ivec2 &origin,
const AGestureEvent &event)
override;
95 AUI_NULLSAFE(mHorizontalScrollbar)->setAppearance(scrollbarAppearance.getHorizontal());
96 AUI_NULLSAFE(mVerticalScrollbar)->setAppearance(scrollbarAppearance.getVertical());
121 void scrollTo(
ARect<int> target,
bool nearestBorder =
true);
127 mIsWheelScrollable = value;
142 mExternalVerticalScrollbar = std::move(externalVerticalScrollbar);
147 mExternalHorizontalScrollbar = std::move(externalHorizontalScrollbar);
152 mContents = std::move(contents);
174 const _<AView>& contents() const noexcept {
175 return mInner->contents();
180 return mVerticalScrollbar;
185 return mHorizontalScrollbar;
189 glm::uvec2
scroll() const noexcept {
190 return mInner->scroll();
203 bool mIsWheelScrollable =
true;
A view that represents a set of views.
Definition: AViewContainerBase.h:68
void onPointerPressed(const APointerPressedEvent &event) override
Called on pointer (mouse) released event.
Definition: AViewContainerBase.cpp:287
bool onGesture(const glm::ivec2 &origin, const AGestureEvent &event) override
Definition: AViewContainerBase.cpp:547
int getContentMinimumWidth() override
Definition: AViewContainerBase.cpp:273
void onPointerReleased(const APointerReleasedEvent &event) override
Called on pointer (mouse) released event.
Definition: AViewContainerBase.cpp:327
void onScroll(const AScrollEvent &event) override
Definition: AViewContainerBase.cpp:359
void setContents(const _< AViewContainer > &container)
Moves (like via std::move) all children and layout of the specified container to this container.
Definition: AViewContainerBase.cpp:513
int getContentMinimumHeight() override
Definition: AViewContainerBase.cpp:280
glm::ivec2 mExpanding
Expansion coefficient. Hints layout manager how much this AView should be extended relative to other ...
Definition: AView.h:205
An std::weak_ptr with AUI extensions.
Definition: SharedPtrTypes.h:177
Pointing method press event.
Definition: APointerPressedEvent.h:21
Pointing method press event.
Definition: APointerReleasedEvent.h:19
Axis aligned 2D rectangle.
Definition: ARect.h:24
static _< T > manage(T *raw)
Definition: SharedPtrTypes.h:371