Skip to content

ATabView#

Tab host

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

Detailed Description#

Used for screen space saving by grouping views.

Unlike APageView, has a row with buttons to switch tabs (pages).

auto tabs = _new<ATabView>();
tabs->addTab(Centered { Label { "General settings" } }, "General");
tabs->addTab(Centered { Label { "About the app" } }, "About");
tabs->setTabId(1);   // switch programmatically

Put tab contents in an AScrollArea if they may not fit.

Examples#

examples/ui/views/src/ExampleWindow.cpp

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

    } AUI_OVERRIDE_STYLE {
        Expanding(1, 0),
    });

    _<ATabView> tabView;
    auto progressBarState = _new<AProperty<aui::float_within_0_1>>(0);

    addView(tabView = _new<ATabView>() AUI_LET {
        it->addTab(
            AScrollArea::Builder().withContents(std::conditional_t<