Skip to content

AGridSplitter#

A resizable grid layout.

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

Detailed Description#

AGridSplitter represents a grid layout which can be resized by user. Unlike ASplitter, works in both directions. AGridSplitter can be constructed with AGridSplitter::Builder.

Examples#

examples/7guis/cells/src/main.cpp

7GUIs Cells - Spreadsheet processor (Excel).

public:
    CellsView(_<State> state) : mState(std::move(state)) {
        ALayoutInflater::inflate(
            this,
            AGridSplitter::Builder()
                    .noDefaultSpacers()
                    .withItems([&] {
                        AVector<AVector<_<AView>>> views;
                        views.resize(mState->spreadsheet.size().y + 1);
                        for (auto& c : views) {

Public Types#

Builder#


class AGridSplitter::Builder

Examples#

examples/app/notes/src/main.cpp

Notes App - Note taking app that demonstrates usage of AListModel, AProperty, user data saving and loading.

                      },
                      /// [scrollarea]
                      AScrollArea::Builder()
                          .withContents(
                          AUI_DECLARATIVE_FOR(note, *mNotes, AVerticalLayout) {
                              observeChangesForDirty(note);
                              return notePreview(note) AUI_LET {
                                  connect(it->clicked, [this, note] { mCurrentNote = note; });
                                  it& mCurrentNote > [note](AView& view, const _<Note>& currentNote) {
                                      ALOG_DEBUG(LOG_TAG) << "currentNote == note " << currentNote << " == " << note;
examples/ui/backdrop/src/main.cpp

Backdrop - Backdrop effects demo.

using namespace ass;

static auto headerWithContents(_<AView> content) {
    auto result = Stacked {
        AScrollArea::Builder().withContents(content).build() AUI_WITH_STYLE {
              Expanding(),
              Padding { 80_dp, 0, 0 },
            } AUI_LET { it->setExtraStylesheet(
                     AStylesheet {
                         {
examples/ui/contacts/src/view/ContactDetailsView.cpp

AUI Contacts - Usage of AUI_DECLARATIVE_FOR to make a contacts-like application.

      },
    });
    connect(mEditorMode, [this] {
        setContents(Vertical::Expanding {
          AScrollArea::Builder().withContents(Centered {
            Vertical::Expanding {
              Horizontal {
                profilePhoto(mContact),
                Centered::Expanding {
                  presentation(mContact->displayName) AUI_WITH_STYLE { FontSize { 12_pt } },
examples/7guis/crud/src/main.cpp

7GUIs CRUD - Create/Read/Update/Delete example.

                Label { "Filter prefix:" },
                _new<ATextField>() AUI_WITH_STYLE { Expanding(1, 0) } && mFilterPrefix,
              },
              AScrollArea::Builder().withExpanding().withContents(
                  AUI_DECLARATIVE_FOR(i, *mUsers | FILTER_VIEW, AVerticalLayout) {
                    auto view = _new<ALabel>();
                    view & i->displayName;
                    connect(mSelectedUser, view, [this, &view = *view, i] {
                        view.setAssName("selected", mSelectedUser == i);
                    });

Empty structure.