Skip to content

ass::Border#

Represents border.

Header:#include <AUI/ASS/Property/Border.h>
CMake:aui_link(my_target PUBLIC aui::views)

Detailed Description#

See AUI Box Model.

Examples#

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

7GUIs Circle Drawer — Undo, redo, dialog control.

    CircleDrawArea(_<State> state) : mState(std::move(state)) {
        setCustomStyle({
          Expanding(),
          BackgroundSolid(AColor::WHITE),
          Border(1_px, AColor::GRAY),
          AOverflow::HIDDEN_FROM_THIS,
        });
        connect(mState->circles.changed, me::redraw);
        connect(mHoveredCircle.changed, me::redraw);
    }
examples/app/minesweeper/src/Style.cpp

Minesweeper Game — Minesweeper game implementation driven by ass.

          {
            t<CellView>(),
            FixedSize { 26_dp },
            BackgroundSolid { 0xdedede_rgb },
            Border { 1_px, 0xeaeaea_rgb },
          },
          {
            !RevealSelector{} >> t<CellView>::hover(),
            BackgroundSolid { 0xfdfdfd_rgb },
          },
examples/ui/views/src/ExampleWindow.cpp

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

                  _new<ADragArea>() AUI_LET {
                          it AUI_OVERRIDE_STYLE {
                              MinSize { 100_dp },
                              Border { 1_px, 0x0_rgb },
                          };
                          it->addView(ADragArea::convertToDraggable(_new<AButton>("Drag me!"), false));
                      },
                } AUI_OVERRIDE_STYLE { Expanding {} },
              } AUI_OVERRIDE_STYLE { LayoutSpacing { 4_dp } },

Public Types#


BorderType#

enum ass::Border::BorderType

Constant Description
BorderType::SOLID