14#include <AUI/Common/AObject.h>
16#include <AUI/Traits/concepts.h>
20namespace aui::detail {
21 template<aui::convertible_to<_<AView>> Storage = _<AView>>
25 if constexpr (std::is_same_v<Storage, _<AView>>) {
28 mViews.removeAt(index);
32 return { mViews.begin(), mViews.end() };
37 auto at = mViews.end();
39 at = mViews.begin() + *index;
41 mViews.insert(at, std::move(view));
58template<aui::convertible_to<_<AView>> Storage = _<AView>>
65 addViewBasicImpl(view, index);
Base class for all layout managers.
Definition: ALayout.h:207
void addView(const _< AView > &view, AOptional< size_t > index) override
Attaches view to the layout.
Definition: ALinearLayout.h:64
Implements addView/removeView/getAllViews and protected mViews field for Vertical,...
Definition: ALinearLayout.h:59
Utility wrapper implementing the stack-allocated (fast) optional idiom.
Definition: AOptional.h:32
A std::vector with AUI extensions.
Definition: AVector.h:38
Base class of all UI objects.
Definition: AView.h:77
An std::weak_ptr with AUI extensions.
Definition: SharedPtrTypes.h:177
Definition: ALinearLayout.h:22
void removeView(aui::no_escape< AView > view, size_t index) override
Detaches view from the layout.
Definition: ALinearLayout.h:24
AVector< _< AView > > getAllViews() override
Visits all views in the layout.
Definition: ALinearLayout.h:31
#define AUI_ASSERT(condition)
Asserts that the passed condition evaluates to true.
Definition: Assert.h:55
Does not allow escaping, allowing to accept lvalue ref, rvalue ref, shared_ptr and etc without overhe...
Definition: values.h:127