Inviwo  0.9.10.1
Inviwo documentation
inviwo::glui::Layout Class Referenceabstract

base class for layouting glui::Elements More...

#include <layout.h>

+ Inheritance diagram for inviwo::glui::Layout:

Public Member Functions

virtual ivec2 getExtent () const =0
 
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
 
virtual void setScalingFactor (double factor)=0
 apply the given scaling factor to all widgets More...
 
virtual void render (const ivec2 &topLeft, const size2_t &canvasDim)=0
 render the layout and all its UI elements at the given position More...
 
virtual void addElement (Element &element)=0
 add a UI element to the layout at the end of the layout More...
 
virtual void removeElement (Element &element)=0
 remove the given UI element from the layout More...
 

Protected Attributes

ivec4 margins_ = ivec4(10, 10, 10, 10)
 top, left, bottom, right
 
double scaling_ = 1.0
 

Detailed Description

base class for layouting glui::Elements

See also
glui::Element

Member Function Documentation

◆ addElement()

virtual void inviwo::glui::Layout::addElement ( Element element)
pure virtual

add a UI element to the layout at the end of the layout

Parameters
elementUI element to be added

Implemented in inviwo::glui::BoxLayout.

◆ removeElement()

virtual void inviwo::glui::Layout::removeElement ( Element element)
pure virtual

remove the given UI element from the layout

Parameters
elementUI element to be removed

Implemented in inviwo::glui::BoxLayout.

◆ render()

virtual void inviwo::glui::Layout::render ( const ivec2 &  topLeft,
const size2_t &  canvasDim 
)
pure virtual

render the layout and all its UI elements at the given position

Parameters
topLeftdefines the top left corner where the UI is positioned
canvasDimdimensions of the output canvas

Implemented in inviwo::glui::BoxLayout.

◆ setMargins()

void inviwo::glui::Layout::setMargins ( const ivec4 &  margins)

set layout margins. margins correspond to margins in the order: top, left, bottom, and right.

Parameters
marginsnew margins (top, left, bottom, right)

◆ setScalingFactor()

virtual void inviwo::glui::Layout::setScalingFactor ( double  factor)
pure virtual

apply the given scaling factor to all widgets

Parameters
factorscaling factor for widget extents
See also
Element::setScalingFactor

Implemented in inviwo::glui::BoxLayout.


The documentation for this class was generated from the following files: