![]() |
Chesto 0.9
A declarative and element-based library for creating GUIs on homebrew'd consoles
|

Public Member Functions | |
| Constraint (int flags, int padding=0, std::vector< Element * > targets={}) | |
| void | clearFlags () |
| void | addFlags (int flags) |
| void | clearTargets () |
| void | addTarget (Element *target) |
| void | update () |
| void | apply (Element *element) |
Public Attributes | |
| int | positioningFlags = 0 |
| std::vector< Element * > | targets |
| int | paddingOffset = 0 |
Definition at line 24 of file Constraint.hpp.
| Constraint::Constraint | ( | int | flags, |
| int | padding = 0, |
||
| std::vector< Element * > | targets = {} |
||
| ) |
Constraints are used to define the positioning of an element relative to other elements. Currently only within another element or padding from a parent edge is supported. TODO: support for positioning relative to non-overlapping elements (eg. the space between)
If no targets are specified, the constraint will be relative to the parent element.
| flags | the positioning flags to use |
| targets | the elements to position relative to |
Definition at line 15 of file Constraint.cpp.
| void Constraint::addFlags | ( | int | flags | ) |
Definition at line 25 of file Constraint.cpp.
| void Constraint::addTarget | ( | Element * | target | ) |
Definition at line 33 of file Constraint.cpp.
| void Constraint::apply | ( | Element * | element | ) |
Definition at line 37 of file Constraint.cpp.
| void Constraint::clearFlags | ( | ) |
Definition at line 21 of file Constraint.cpp.
| void Constraint::clearTargets | ( | ) |
Definition at line 29 of file Constraint.cpp.
| int Constraint::paddingOffset = 0 |
Definition at line 42 of file Constraint.hpp.
| int Constraint::positioningFlags = 0 |
Definition at line 36 of file Constraint.hpp.
| std::vector<Element*> Constraint::targets |
Definition at line 39 of file Constraint.hpp.