Skip to content

ASpacerExpanding#

Expanding view which is useful in UI building.

Header:#include <AUI/View/ASpacerExpanding.h>
CMake:aui_link(my_target PUBLIC aui::views)

Detailed Description#

AExpandingSpacer is an expanding blank view which tries acquire space as much as possible.

See expanding in layout managers for more info.

Examples#

examples/app/minesweeper/src/NewGameWindow.cpp

Minesweeper Game — Minesweeper game implementation driven by ass.

        },
      }) AUI_OVERRIDE_STYLE { LayoutSpacing { 4_dp } },
      mDifficultyLabel = _new<ALabel>(),
      Horizontal {
        _new<ASpacerExpanding>(),
        _new<AButton>("Start game") AUI_LET {
                it->setDefault();
                connect(it->clicked, me::begin);
            },
        _new<AButton>("Cancel").connect(&AButton::clicked, me::close),
examples/ui/views/src/ExampleWindow.cpp

Views Example — All-in-one views building example.

                                    if (!state->colors->empty()) {
                                        state->colors.writeScope()->pop_back();
                                    }
                                }),
                            _new<ASpacerExpanding>(),
                          } AUI_OVERRIDE_STYLE { LayoutSpacing { 4_dp } },
                          AUI_DECLARATIVE_FOR(i, *state->colors, AWordWrappingLayout) {
                              return Horizontal {
                                  _new<ALabel>(i.toString()) AUI_OVERRIDE_STYLE {
                                      TextColor { i.readableBlackOrWhite() },