Class to store the left, top, width or height of a widget.
More...
#include <TGUI/Layout.hpp>
|
enum class | Operation |
| The operation which the layout has to perform to find its value.
|
|
|
| Layout ()=default |
| Default constructor.
|
|
template<typename T , typename = typename std::enable_if<std::is_arithmetic<T>::value, T>::type> |
| Layout (T constant) |
| Constructor to implicitly construct from numeric constant. More...
|
|
| Layout (const char *expression) |
| Constructs the layout based on a string which will be parsed to determine the value of the layout. More...
|
|
| Layout (std::string expression) |
| Constructs the layout based on a string which will be parsed to determine the value of the layout. More...
|
|
| Layout (const Layout &other) |
| Copy constructor.
|
|
| Layout (Layout &&other) |
| Move constructor.
|
|
Layout & | operator= (const Layout &other) |
| Copy assignment operator.
|
|
Layout & | operator= (Layout &&other) |
| Move assignment operator.
|
|
| ~Layout () |
| Destructor.
|
|
float | getValue () const |
| Return the cached value of the layout. More...
|
|
bool | isConstant () const |
| Return whether the layout stores a constant value. More...
|
|
Class to store the left, top, width or height of a widget.
You don't have to create an instance of this class, numbers are implicitly cast to this class.
◆ Layout() [1/3]
template<typename T , typename = typename std::enable_if<std::is_arithmetic<T>::value, T>::type>
tgui::Layout::Layout |
( |
T |
constant | ) |
|
|
inline |
Constructor to implicitly construct from numeric constant.
- Parameters
-
constant | Value of the layout |
◆ Layout() [2/3]
tgui::Layout::Layout |
( |
const char * |
expression | ) |
|
|
inline |
Constructs the layout based on a string which will be parsed to determine the value of the layout.
- Parameters
-
◆ Layout() [3/3]
tgui::Layout::Layout |
( |
std::string |
expression | ) |
|
Constructs the layout based on a string which will be parsed to determine the value of the layout.
- Parameters
-
◆ getValue()
float tgui::Layout::getValue |
( |
| ) |
const |
|
inline |
Return the cached value of the layout.
- Returns
- Value of the layout
◆ isConstant()
bool tgui::Layout::isConstant |
( |
| ) |
const |
|
inline |
Return whether the layout stores a constant value.
- Returns
- Value of the layout
The documentation for this class was generated from the following file: