Skip to content

AHorizontalLayout#

Places views in a row.

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

Detailed Description#

Declarative notation Horizontal { }

Horizontal layout manager places views in a row, fitting their height to the container's height. Has a Horizontal shortcut that allows easy usage in UI building:

setContents(
  Horizontal {
    _new<AButton>("1"),
    _new<AButton>("2"),
    _new<AButton>("3"),
  }
);

Examples#

examples/app/fractal/src/FractalWindow.cpp

Fractal Example - Fractal viewer application demonstrating usage of custom shaders.

using namespace ass;
using namespace declarative;

FractalWindow::FractalWindow() : AWindow("Mandelbrot set") {
    setLayout(std::make_unique<AHorizontalLayout>());

    auto centerPosDisplay = _new<ALabel>("-");
    {
        centerPosDisplay->setCustomStyle({
          BackgroundSolid { 0x80000000_argb },