15 static_assert(Axis == axis::x or Axis == axis::y);
18 using grid_type = grid_layout<T>;
19 using cell_type = grid_type::cell_type;
20 using iterator = grid_type::iterator;
21 using const_iterator = grid_type::const_iterator;
31 [[nodiscard]]
constexpr bool empty()
const noexcept
36 [[nodiscard]]
constexpr size_t size()
const noexcept
41 [[nodiscard]]
constexpr iterator begin()
noexcept
46 [[nodiscard]]
constexpr const_iterator begin()
const noexcept
51 [[nodiscard]]
constexpr const_iterator cbegin()
const noexcept
53 return _grid.cbegin();
56 [[nodiscard]]
constexpr iterator end()
noexcept
61 [[nodiscard]]
constexpr const_iterator end()
const noexcept
66 [[nodiscard]]
constexpr const_iterator cend()
const noexcept
71 [[nodiscard]]
constexpr cell_type& operator[](
size_t index)
noexcept
77 [[nodiscard]]
constexpr cell_type
const& operator[](
size_t index)
const noexcept
83 cell_type& insert(const_iterator pos, std::convertible_to<T>
auto&& value)
noexcept
87 for (
auto it = begin() + index; it != end(); ++it) {
88 if constexpr (Axis == axis::x) {
97 if constexpr (Axis == axis::x) {
98 return _grid.add_cell(index, 0,
hi_forward(value));
100 return _grid.add_cell(0, index,
hi_forward(value));
104 cell_type& push_front(std::convertible_to<T>
auto&& value)
noexcept
109 cell_type& push_back(std::convertible_to<T>
auto&& value)
noexcept
114 void clear()
noexcept
116 return _grid.clear();
119 [[nodiscard]]
box_constraints constraints(
bool left_to_right)
const noexcept
121 return _grid.constraints(left_to_right);
124 void set_layout(
box_shape const &shape,
float guideline)
noexcept
126 return _grid.set_layout(shape, guideline);