|
HikoGUI
A low latency retained GUI
|
#include <hikogui/layout/grid_layout.hpp>
Public Types | |
| using | value_type = T |
| using | cell_type = detail::grid_layout_cell<value_type> |
| using | cell_vector = std::vector<cell_type> |
| using | iterator = cell_vector::iterator |
| using | const_iterator = cell_vector::const_iterator |
| using | reference = cell_vector::reference |
| using | const_reference = cell_vector::const_reference |
Public Member Functions | |
| constexpr | grid_layout (grid_layout const &) noexcept=default |
| constexpr | grid_layout (grid_layout &&) noexcept=default |
| constexpr grid_layout & | operator= (grid_layout const &) noexcept=default |
| constexpr grid_layout & | operator= (grid_layout &&) noexcept=default |
| constexpr bool | empty () const noexcept |
| constexpr size_t | size () const noexcept |
| constexpr size_t | num_columns () const noexcept |
| constexpr size_t | num_rows () const noexcept |
| constexpr iterator | begin () noexcept |
| constexpr iterator | end () noexcept |
| constexpr const_iterator | begin () const noexcept |
| constexpr const_iterator | end () const noexcept |
| constexpr const_iterator | cbegin () const noexcept |
| constexpr const_iterator | cend () const noexcept |
| constexpr const_reference | operator[] (size_t i) const noexcept |
| constexpr reference | operator[] (size_t i) noexcept |
| constexpr bool | cell_in_use (size_t first_column, size_t first_row, size_t last_column, size_t last_row) noexcept |
| Check if the cell on the grid is already in use. | |
| template<forward_of< value_type > Value> | |
| constexpr reference | add_cell (size_t first_column, size_t first_row, size_t last_column, size_t last_row, Value &&value, bool beyond_maximum=false) noexcept |
| Check if the cell on the grid is already in use. | |
| template<forward_of< value_type > Value> | |
| constexpr reference | add_cell (size_t column, size_t row, Value &&value, bool beyond_maximum=false) noexcept |
| Check if the cell on the grid is already in use. | |
| constexpr void | clear () noexcept |
| constexpr box_constraints | constraints (bool left_to_right) const noexcept |
| constexpr void | set_layout (box_shape const &shape, float baseline_adjustment) noexcept |
| Layout the cells based on the width and height. | |
Friends | |
| constexpr friend bool | operator== (grid_layout const &, grid_layout const &) noexcept=default |
Grid layout algorithm.
|
inlineconstexprnoexcept |
Check if the cell on the grid is already in use.
| column | The column of the cell. |
| row | The row of the cell. |
| value | The value to be copied or moved into the cell. |
| beyond_maximum | Allow this cell to resize beyond the maximum constraint. |
|
inlineconstexprnoexcept |
Check if the cell on the grid is already in use.
| first_column | The first column of the cell-span. |
| last_column | One beyond the last column of the cell-span. |
| first_row | The first row of the cell-span. |
| last_row | One beyond the last row of the cell-span. |
| value | The value to be copied or moved into the cell. |
| beyond_maximum | Allow this cell to resize beyond the maximum constraint. |
|
inlineconstexprnoexcept |
Check if the cell on the grid is already in use.
| first_column | The first column of the cell-span. |
| first_row | The first row of the cell-span. |
| last_column | One beyond the last column of the cell-span. |
| last_row | One beyond the last row of the cell-span. |
| true | If the given cell-span overlaps with an already existing cell. |
|
inlineconstexprnoexcept |
Layout the cells based on the width and height.
| shape | The shape of the box to place the grid in. |
| baseline_adjustment | How much the baseline needs to be adjusted when aligned to the top. |