13#include "AUI/Common/AVector.h"
14#include "AUI/View/AView.h"
15#include "AUI/Layout/AGridLayout.h"
17#include "AUI/View/AViewContainer.h"
18#include "AUI/View/ALabel.h"
19#include <AUI/Common/SharedPtr.h>
20#include <AUI/Util/kAUI.h>
21#include <AUI/Util/AMetric.h>
22#include <AUI/View/ASpacerExpanding.h>
23#include <AUI/View/AForEachUI.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"
38template<
typename Layout,
typename... Args>
41 auto c = _new<AViewContainer>();
42 c->setLayout(std::make_unique<Layout>(std::forward<Args>(
args)...));
44 c->setViews(std::move(views));
51 auto c = _new<AViewContainer>();
52 c->setLayout(std::make_unique<AAdvancedGridLayout>(2, views.size()));
53 c->setExpanding({2, 0});
54 for (
const auto& v : views) {
56 c->addView(_new<ALabel>(std::get<AString>(v.first)));
58 catch (
const std::bad_variant_access&) {
59 c->addView(std::get<
_<AView>>(v.first));
61 v.second->setExpanding({2, 0});
Represents a Unicode character string.
Definition: AString.h:37
A std::vector with AUI extensions.
Definition: AVector.h:38
An std::weak_ptr with AUI extensions.
Definition: SharedPtrTypes.h:177
API_AUI_CORE const ACommandLineArgs & args() noexcept
Definition: OSAndroid.cpp:29
Definition: Declarative.h:173