|
| | Stack (StackDirection dir, float gap=0) |
| | Construct a stack with direction and optional gap.
|
| |
| void | render (sf::RenderWindow &window) override |
| | Render stack background and child widgets.
|
| |
| void | add (Widget *widget) |
| | Add a child widget pointer.
|
| |
| template<typename... Ts> |
| void | add (Ts &&... widgets) |
| | Add one or more child widgets (pointer or reference forms).
|
| |
| void | setPosition (float x, float y) override |
| | Set stack position (top-left).
|
| |
| sf::Vector2f | getDimensions () override |
| | Get total stack dimensions including padding.
|
| |
| void | handleEvent (const sf::Event &event, sf::RenderWindow &window) override |
| | Forward input events to all children.
|
| |
| void | setGap (float g) |
| | Set spacing between children.
|
| |
| float | getGap () const |
| | Get current child gap.
|
| |
| void | setJustifyContent (StackJustify value) |
| | Set main-axis content alignment.
|
| |
| void | setJustifyContent (const std::string &value) |
| | Set main-axis alignment from string (start|center|end).
|
| |
| void | setAlignItems (StackAlign value) |
| | Set cross-axis child alignment.
|
| |
| void | setAlignItems (const std::string &value) |
| | Set cross-axis alignment from string (start|center|end).
|
| |
| void | setSize (float width, float height) |
| | Set explicit content size used for alignment calculations.
|
| |
| void | setWidth (float width) |
| | Set explicit content width.
|
| |
| void | setHeight (float height) |
| | Set explicit content height.
|
| |
| void | setPadding (float p) |
| | Set uniform padding on all sides.
|
| |
| void | setPadding (float horizontal, float vertical) |
| | Set horizontal and vertical padding.
|
| |
| void | setPadding (float left, float right, float top, float bottom) |
| | Set side-specific padding.
|
| |
| void | setBackgroundColor (sf::Color color) |
| | Set container background color.
|
| |
| | Widget () |
| | Construct a widget with default font loading.
|
| |
Container widget that arranges children in a row or column.
Stack is Velvet's primary layout primitive.
- Horizontal mode (
HStack): children left-to-right
- Vertical mode (
VStack): children top-to-bottom
It supports gap, padding, explicit size, justify/align options, and optional background color.