5#include "../geometry/module.hpp"
7namespace hi {
inline namespace v1 {
13 uint32_t in_use : 1 = 0;
14 uint32_t leaf : 1 = 0;
15 uint32_t perminant_mark : 1 = 0;
16 uint32_t temporary_mark : 1 = 0;
17 uint32_t reserved : 28 = 0;
147 [[nodiscard]]
constexpr friend bool operator==(
grid_cell const&,
grid_cell const&)
noexcept =
default;
150 constexpr grid_cell()
noexcept =
default;
153 constexpr grid_cell(
grid_cell const& parent, uint8_t col_begin, uint8_t row_begin, uint8_t col_end, uint8_t row_end) noexcept
175 [[nodiscard]]
constexpr bool empty()
const noexcept;
181 constexpr void clear()
noexcept;
190 constexpr void set_location(uint8_t col_begin, uint8_t row_begin, uint8_t col_end, uint8_t row_end)
noexcept;
209 [ col_begin, row_begin, col_end, row_end ] = parse_spreadsheet_range(address);
210 return set_location(col_begin, row_begin, col_end, row_end)
234 constexpr void set_priority(int8_t width_priority, int8_t height_priority)
noexcept;
236 constexpr void set_priority(int8_t priority = 0) noexcept
238 return set_priority(priority, priority);
241 constexpr void set_margin(
hi::margins margin)
noexcept;
243 constexpr void set_margin(
float margins)
noexcept
252 return set_constraints(minimum, maximum, minimum);
255 constexpr void set_constraints(
hi::extent2 size)
noexcept
257 return set_constraints(size);
260 constexpr void set_size(
hi::extent2 size)
noexcept;
262 [[nodiscard]]
constexpr aarectangle rectangle() const noexcept;
265 grid *_grid =
nullptr;
@ other
The gui_event does not have associated data.
DOXYGEN BUG.
Definition algorithm.hpp:13
geometry/margins.hpp
Definition cache.hpp:11
The layout-algorithm:
Definition grid.hpp:24
Definition grid_cell.hpp:11
int32_t width
The width of this cell.
Definition grid_cell.hpp:97
int32_t left
The left position of this cell relative to the parent.
Definition grid_cell.hpp:87
int8_t num_rows
Number of rows based on the locations of this cell's children.
Definition grid_cell.hpp:112
int8_t width_priority
The priority when the change the width compared to other cells in the row.
Definition grid_cell.hpp:34
int32_t wrapped_height
The taller height when the cell can wrap.
Definition grid_cell.hpp:74
int32_t row_offset
Offset in the row table.
Definition grid_cell.hpp:25
int8_t row_before_margin
The top-margin calculated from children.
Definition grid_cell.hpp:122
int32_t maximum_width
The maximum width.
Definition grid_cell.hpp:70
int8_t margin_right
The right-margin for this cell.
Definition grid_cell.hpp:53
int32_t col_offset
Offset in the column table.
Definition grid_cell.hpp:21
int8_t row_after_margin
The bottom margin calculated from children.
Definition grid_cell.hpp:132
int32_t wrapped_width
The thinner width when the cell can wrap.
Definition grid_cell.hpp:62
int8_t height_priority
The priority when the change the height compared to other cells in the column.
Definition grid_cell.hpp:38
int8_t margin_left
The left-margin for this cell.
Definition grid_cell.hpp:43
int8_t num_cols
Number of columns based on the locations of this cell's children.
Definition grid_cell.hpp:107
int32_t minimum_height
The minimum height.
Definition grid_cell.hpp:78
int8_t col_after_margin
The right-margin (rtl: left-margin) calculated from children.
Definition grid_cell.hpp:127
int32_t bottom
The bottom position of this cell relative to the parent.
Definition grid_cell.hpp:92
int8_t col_before_margin
The left-margin (rtl: right-margin) calculated from children.
Definition grid_cell.hpp:117
int8_t margin_bottom
The bottom-margin for this cell.
Definition grid_cell.hpp:48
int32_t maximum_height
The maximum height.
Definition grid_cell.hpp:82
int32_t minimum_width
The preferred width.
Definition grid_cell.hpp:66
int8_t margin_top
The top-margin for this cell.
Definition grid_cell.hpp:58
int32_t height
The height of this cell.
Definition grid_cell.hpp:102
A cell in a grid.
Definition grid_cell.hpp:141
constexpr void set_parent(grid_cell const &parent) noexcept
Set the parent for this child-cell.
Definition grid_cell_impl.hpp:67
constexpr void set_location(uint8_t col, uint8_t row) noexcept
Set the location of a cell.
Definition grid_cell.hpp:198
constexpr bool empty() const noexcept
Check if this cell has a location.
Definition grid_cell_impl.hpp:38
constexpr void set_location(std::string_view address) noexcept
Set the location and span of a cell based on the spreadsheet address.
Definition grid_cell.hpp:207
constexpr void clear() noexcept
Clear the cell.
Definition grid_cell_impl.hpp:43
constexpr void unset_parent(grid_cell const &parent) noexcept
Remove the parent for this child-cell.
Definition grid_cell_impl.hpp:74
constexpr void set_location() noexcept
Set the location to the origin of the grid.
Definition grid_cell.hpp:215