HikoGUI
A low latency retained GUI
|
Data Structures | |
struct | constraint_type |
Public Types | |
using | value_type = T |
using | alignment_type = std::conditional_t<axis == axis::y, vertical_alignment, horizontal_alignment> |
using | cell_type = grid_layout_cell<value_type> |
using | cell_vector = std::vector<cell_type> |
using | constraint_vector = std::vector<constraint_type> |
using | iterator = constraint_vector::iterator |
using | const_iterator = constraint_vector::const_iterator |
using | reverse_iterator = constraint_vector::reverse_iterator |
using | reference = constraint_vector::reference |
using | const_reference = constraint_vector::const_reference |
Public Member Functions | |
constexpr | grid_layout_axis_constraints (grid_layout_axis_constraints const &) noexcept=default |
constexpr | grid_layout_axis_constraints (grid_layout_axis_constraints &&) noexcept=default |
constexpr grid_layout_axis_constraints & | operator= (grid_layout_axis_constraints const &) noexcept=default |
constexpr grid_layout_axis_constraints & | operator= (grid_layout_axis_constraints &&) noexcept=default |
constexpr | grid_layout_axis_constraints (cell_vector const &cells, size_t num, bool forward) noexcept |
Construct constraints for this axis. | |
constexpr float | margin_before () const noexcept |
constexpr float | margin_after () const noexcept |
constexpr float | padding_before () const noexcept |
constexpr float | padding_after () const noexcept |
constexpr std::tuple< float, float, float > | update_constraints () const noexcept |
constexpr std::tuple< float, float, float > | constraints (cell_type const &cell) const noexcept |
Get the minimum, preferred, maximum size of the span. | |
constexpr float | position (cell_type const &cell) const noexcept |
constexpr float | extent (cell_type const &cell) const noexcept |
constexpr std::optional< float > | guideline (cell_type const &cell) const noexcept |
constexpr void | layout (float new_position, float new_extent, std::optional< float > external_guideline, float guideline_width) noexcept |
Layout each cell along an axis. | |
constexpr size_t | size () const noexcept |
Number of cell on this axis. | |
constexpr bool | empty () const noexcept |
Check if this axis is empty. | |
constexpr iterator | begin () noexcept |
Iterator to the first cell on this axis. | |
constexpr const_iterator | begin () const noexcept |
Iterator to the first cell on this axis. | |
constexpr const_iterator | cbegin () const noexcept |
Iterator to the first cell on this axis. | |
constexpr iterator | end () noexcept |
Iterator to beyond the last cell on this axis. | |
constexpr const_iterator | end () const noexcept |
Iterator to beyond the last cell on this axis. | |
constexpr const_iterator | cend () const noexcept |
Iterator to beyond the last cell on this axis. | |
constexpr reverse_iterator | rbegin () noexcept |
Iterator to the first cell on this axis. | |
constexpr reverse_iterator | rend () noexcept |
Iterator to the first cell on this axis. | |
constexpr reference | operator[] (size_t index) noexcept |
Get element. | |
constexpr const_reference | operator[] (size_t index) const noexcept |
Get element. | |
constexpr reference | front () noexcept |
Get the first element. | |
constexpr const_reference | front () const noexcept |
Get the first element. | |
constexpr reference | back () noexcept |
Get the last element. | |
constexpr const_reference | back () const noexcept |
Get the last element. | |
Static Public Attributes | |
static constexpr hi::axis | axis = Axis |
Friends | |
constexpr friend bool | operator== (grid_layout_axis_constraints const &, grid_layout_axis_constraints const &) noexcept=default |
|
inlineconstexprnoexcept |
Construct constraints for this axis.
cells | The cells |
num | The number of cells in the direction of the current axis |
forward | True if the axis is used from left-to-right or bottom-to-top, False if the axis is used from right-to-left or top-to-bottom. |
|
inlineconstexprnoexcept |
Get the last element.
|
inlineconstexprnoexcept |
Get the last element.
|
inlineconstexprnoexcept |
Iterator to the first cell on this axis.
|
inlineconstexprnoexcept |
Iterator to the first cell on this axis.
|
inlineconstexprnoexcept |
Iterator to the first cell on this axis.
|
inlineconstexprnoexcept |
Iterator to beyond the last cell on this axis.
|
inlineconstexprnoexcept |
Get the minimum, preferred, maximum size of the span.
The returned minimum, preferred and maximum include the internal margin within the span.
cell | The reference to the cell in the grid. |
|
inlineconstexprnoexcept |
Check if this axis is empty.
|
inlineconstexprnoexcept |
Iterator to beyond the last cell on this axis.
|
inlineconstexprnoexcept |
Iterator to beyond the last cell on this axis.
|
inlineconstexprnoexcept |
Get the first element.
|
inlineconstexprnoexcept |
Get the first element.
|
inlineconstexprnoexcept |
Layout each cell along an axis.
The algorithm works as follows:
In an emergency widgets will get a size larger than its maximum. However widgets will never get a smaller size than its minimum.
new_position | The start of the grid along its axis. |
new_extent | The size of the grid along its axis. |
external_guideline | The position of the guideline external from the grid. |
guideline_width | The width of the guideline. |
|
inlineconstexprnoexcept |
Get element.
index | The index of the cell. |
|
inlineconstexprnoexcept |
Get element.
index | The index of the cell. |
|
inlineconstexprnoexcept |
Iterator to the first cell on this axis.
|
inlineconstexprnoexcept |
Iterator to the first cell on this axis.
|
inlineconstexprnoexcept |
Number of cell on this axis.