ass::BackgroundSolid#
Represents solid (single color) background.
| Header: | #include <AUI/ASS/Property/BackgroundSolid.h> |
| CMake: | aui_link(my_target PUBLIC aui::views) |
Examples#
examples/7guis/flight_booker/src/main.cpp
7GUIs Flight Booker — Flight Booker.
// using type = _<ass::prop::IPropertyBase>;
// };
template<>
struct std::common_type<ass::BackgroundSolid, std::nullptr_t> {
using type = _<ass::prop::IPropertyBase>;
};
/// [date_field]
auto dateTextField(_<DateTextFieldState> state) {
examples/7guis/cells/src/main.cpp
7GUIs Cells — Spreadsheet processor (Excel).
for (unsigned row = 0; row < mState->spreadsheet.size().y; ++row) {
views[row + 1][0] = labelTitle("{}"_format(Cell::rowName(row)));
for (unsigned column = 0; column < mState->spreadsheet.size().x; ++column) {
views[row + 1][column + 1] = _new<CellView>(mState, mState->spreadsheet[{ column, row }]) AUI_OVERRIDE_STYLE {
BackgroundSolid { AColor::WHITE },
MinSize { {}, 20_dp },
};
}
}
return views;
examples/7guis/circle_drawer/src/main.cpp
7GUIs Circle Drawer — Undo, redo, dialog control.
examples/7guis/crud/src/main.cpp
7GUIs CRUD — Create/Read/Update/Delete example.
examples/app/minesweeper/src/Style.cpp
Minesweeper Game — Minesweeper game implementation driven by ass.
examples/app/fractal/src/FractalWindow.cpp
Fractal Example — Fractal viewer application demonstrating usage of custom shaders.
examples/app/game_of_life/src/main.cpp
Game of Life — Game of Life implementation that uses advanced large dynamic data rendering techniques such as ITexture, AImage to be GPU friendly. The computation is performed in AThreadPool.
},
Centered {
_new<CellsView>(aui::ptr::fake_shared(&mCells)) AUI_OVERRIDE_STYLE {
Expanding(),
BackgroundSolid(AColor::BLACK),
},
},
} AUI_OVERRIDE_STYLE { LayoutSpacing { 4_dp } });
}
examples/app/notes/src/main.cpp
Notes App — Note taking app that demonstrates usage of AListModel, AProperty, user data saving and loading.
examples/ui/contacts/src/main.cpp
AUI Contacts — Usage of AUI_DECLARATIVE_FOR to make a contacts-like application.
.build() AUI_OVERRIDE_STYLE { Expanding(0, 1), MinSize(200_dp) },
experimental::Dynamic {
.content = AUI_REACT(mSelectedContact != nullptr ? contactDetails(mSelectedContact) : nullptr),
} AUI_OVERRIDE_STYLE { Expanding(), MinSize(300_dp), BackgroundSolid { AColor::WHITE } },
} AUI_OVERRIDE_STYLE {
Padding(0),
});
}
examples/ui/opengl_simple/src/main.cpp
OpenGL Example — Demonstrates how to integrate custom OpenGL rendering with AUI Framework.
Vertical {
Label { AUI_REACT(fmt::format("FPS: {:.1f}", *state->fps)) },
} AUI_OVERRIDE_STYLE {
Padding(16_dp),
BackgroundSolid { AColor::WHITE.transparentize(0.5f) },
MinSize { 150_dp, {} },
},
},
},
} AUI_OVERRIDE_STYLE { Padding(0) });
examples/ui/views/src/ExampleWindow.cpp
Views Example — All-in-one views building example.
_new<ALabel>(i.toString()) AUI_OVERRIDE_STYLE {
TextColor { i.readableBlackOrWhite() },
}
} AUI_OVERRIDE_STYLE {
BackgroundSolid { i },
BorderRadius { 6_pt },
Margin { 2_dp, 4_dp },
};
}
};
examples/ui/contacts/src/view/common.cpp
AUI Contacts — Usage of AUI_DECLARATIVE_FOR to make a contacts-like application.