layout for aligning Elements either horizontally or vertically
More...
#include <modules/userinterfacegl/glui/layout/boxlayout.h>
|
| enum class | LayoutDirection { Vertical
, Horizontal
} |
|
| virtual void | addElement (Element &element) override |
| | add a glui::Element to the layout at the end of the layout
|
|
| BoxLayout (LayoutDirection direction) |
|
LayoutDirection | getDirection () const |
| virtual ivec2 | getExtent () const override |
|
int | getSpacing () const |
| void | insertElement (int index, Element &element) |
| | insert a glui::Element to the layout at the given index. If the index is negative, the UI element is added at the end.
|
| void | removeElement (Element &element) override |
| | remove the given glui::Element from the layout
|
| virtual void | render (const ivec2 &topLeft, const size2_t &canvasDim) override |
| | render the layout and all its glui::Elements at the given position
|
|
void | setDirection (LayoutDirection direction) |
| virtual void | setScalingFactor (double factor) override |
| | apply the given scaling factor to all widgets
|
|
void | setSpacing (int spacing) |
|
const ivec4 & | getMargins () const |
| void | setMargins (const ivec4 &margins) |
| | set layout margins. margins correspond to margins in the order: top, left, bottom, and right.
|
|
void | setMargins (int top, int left, int bottom, int right) |
|
|
ivec4 | margins_ = ivec4(10, 10, 10, 10) |
| | top, left, bottom, right
|
|
double | scaling_ = 1.0 |
layout for aligning Elements either horizontally or vertically
This class does not take over ownership of the Elements.
◆ addElement()
| virtual void inviwo::glui::BoxLayout::addElement |
( |
Element & | element | ) |
|
|
overridevirtual |
◆ getExtent()
| virtual ivec2 inviwo::glui::BoxLayout::getExtent |
( |
| ) |
const |
|
overridevirtual |
◆ insertElement()
| void inviwo::glui::BoxLayout::insertElement |
( |
int | index, |
|
|
Element & | element ) |
insert a glui::Element to the layout at the given index. If the index is negative, the UI element is added at the end.
- Parameters
-
◆ removeElement()
| void inviwo::glui::BoxLayout::removeElement |
( |
Element & | element | ) |
|
|
overridevirtual |
◆ render()
| virtual void inviwo::glui::BoxLayout::render |
( |
const ivec2 & | topLeft, |
|
|
const size2_t & | canvasDim ) |
|
overridevirtual |
render the layout and all its glui::Elements at the given position
- Parameters
-
| topLeft | defines the top left corner where the UI is positioned |
| canvasDim | dimensions of the output canvas |
Implements inviwo::glui::Layout.
◆ setScalingFactor()
| virtual void inviwo::glui::BoxLayout::setScalingFactor |
( |
double | factor | ) |
|
|
overridevirtual |
apply the given scaling factor to all widgets
- Parameters
-
| factor | scaling factor for widget extents |
- See also
- Element::setScalingFactor
Implements inviwo::glui::Layout.
The documentation for this class was generated from the following file:
- modules/userinterfacegl/include/modules/userinterfacegl/glui/layout/boxlayout.h