Inviwo
0.9.10.1
Inviwo documentation
|
layout for aligning Elements either horizontally or vertically More...
#include <boxlayout.h>
Public Types | |
enum | LayoutDirection { Vertical, Horizontal } |
Public Member Functions | |
BoxLayout (LayoutDirection direction) | |
void | setDirection (LayoutDirection direction) |
LayoutDirection | getDirection () const |
virtual ivec2 | getExtent () const override |
void | setSpacing (int spacing) |
int | getSpacing () const |
virtual void | setScalingFactor (double factor) override |
apply the given scaling factor to all widgets More... | |
virtual void | render (const ivec2 &topLeft, const size2_t &canvasDim) override |
render the layout and all its glui::Elements at the given position More... | |
virtual void | addElement (Element &element) override |
add a glui::Element to the layout at the end of the layout More... | |
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. More... | |
void | removeElement (Element &element) override |
remove the given glui::Element from the layout More... | |
Public Member Functions inherited from inviwo::glui::Layout | |
void | setMargins (int top, int left, int bottom, int right) |
void | setMargins (const ivec4 &margins) |
set layout margins. margins correspond to margins in the order: top, left, bottom, and right. More... | |
const ivec4 & | getMargins () const |
Additional Inherited Members | |
Protected Attributes inherited from inviwo::glui::Layout | |
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.
|
overridevirtual |
add a glui::Element to the layout at the end of the layout
element | glui::Element to be added |
Implements inviwo::glui::Layout.
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.
index | index position of where to insert the glui::Element |
element | glui::Element to be added |
|
overridevirtual |
remove the given glui::Element from the layout
element | glui::Element to be removed |
Implements inviwo::glui::Layout.
|
overridevirtual |
render the layout and all its glui::Elements at the given position
topLeft | defines the top left corner where the UI is positioned |
canvasDim | dimensions of the output canvas |
Implements inviwo::glui::Layout.
|
overridevirtual |
apply the given scaling factor to all widgets
factor | scaling factor for widget extents |
Implements inviwo::glui::Layout.