14#include "AUI/Common/AVector.h"
15#include "AUI/View/AView.h"
16#include "AUI/Layout/AGridLayout.h"
18#include "AUI/View/AViewContainer.h"
19#include "AUI/View/ALabel.h"
20#include <AUI/Common/SharedPtr.h>
21#include <AUI/Util/kAUI.h>
22#include <AUI/Util/AMetric.h>
23#include <AUI/View/ASpacerExpanding.h>
24#include <AUI/Layout/AWordWrappingLayout.h>
25#include <AUI/Layout/AHorizontalLayout.h>
26#include <AUI/Layout/AVerticalLayout.h>
27#include <AUI/Layout/AStackedLayout.h>
28#include <AUI/Layout/AGridLayout.h>
29#include <AUI/Layout/AAdvancedGridLayout.h>
30#include <AUI/Layout/AAbsoluteLayout.h>
31#include <AUI/Image/AImageLoaderRegistry.h>
32#include <AUI/i18n/AI18n.h>
33#include <AUI/ASS/ASS.h>
34#include <AUI/Traits/strings.h>
35#include "Declarative.h"
37template <
typename Layout,
typename... Args>
39 auto c = _new<AViewContainer>();
40 c->setLayout(std::make_unique<Layout>(std::forward<Args>(args)...));
42 c->setViews(std::move(views));
48 auto c = _new<AViewContainer>();
49 c->setLayout(std::make_unique<AAdvancedGridLayout>(2,
int(views.size())));
50 c->setExpanding({ 2, 0 });
51 for (
const auto& v : views) {
53 c->addView(_new<ALabel>(std::get<AString>(v.first)));
54 }
catch (
const std::bad_variant_access&) {
57 v.second->setExpanding({ 2, 0 });
75using Vertical = aui::ui_building::view_container_layout<AVerticalLayout>;
88using Horizontal = aui::ui_building::view_container_layout<AHorizontalLayout>;
101using Stacked = aui::ui_building::view_container_layout<AStackedLayout>;
112using Absolute = aui::ui_building::view_container_layout<AAbsoluteLayout>;
124using CustomLayout = aui::ui_building::view_container_layout<std::nullopt_t>;
132using Centered = Stacked;
Represents a Unicode character string.
Definition AString.h:38
A std::vector with AUI extensions.
Definition AVector.h:39
An std::weak_ptr with AUI extensions.
Definition SharedPtrTypes.h:179
class_of c
Selects views that are of the specified classes.
Definition class_of.h:84