AStackedLayout#
Places views in a stack (along z axis).
Header: | #include <AUI/Layout/AStackedLayout.h> |
CMake: | aui_link(my_target PUBLIC aui::views) |
Detailed Description#
Declarative notation | Stacked { } Centered { } |
Stacked layout manager places views stacking them onto each other. If the view is expanding, then it uses all space available. Otherwise, the view is centered.
AStackedLayout has two declarative notations - Stacked
and Centered
. They are equivalent, so you can express
your intentions more clearly by specifying Stacked
to stack views and Centered
to center them.
First view appears below the second one, and so on. The last view is above all other views within this Stacked layout.
Examples#
examples/app/minesweeper/src/MinesweeperWindow.cpp
Minesweeper Game - Minesweeper game implementation driven by ass.
Centered::Expanding {
_new<AButton>("New game...").connect(&AButton::clicked, me::newGame),
},
},
_container<AStackedLayout>(
{ // also assign ".frame" ASS class in place
mGrid = _new<AViewContainer>() << ".frame" }) });
beginGame(10, 10, 20);
}