sandbox
Loading...
Searching...
No Matches
horizontal_layout.hpp
1// SPDX-License-Identifier: MIT
2#ifndef LIBSBX_UI_HORIZONTAL_LAYOUT_HPP_
3#define LIBSBX_UI_HORIZONTAL_LAYOUT_HPP_
4
5#include <algorithm>
6
7#include <libsbx/ui/layout.hpp>
8#include <libsbx/ui/element.hpp>
9
10namespace sbx::ui {
11
12class horizontal_layout : public layout {
13
14public:
15
16 std::float_t spacing{0.0f};
17
18 horizontal_layout() = default;
19
20 horizontal_layout(std::float_t spacing);
21
22 ~horizontal_layout() override = default;
23
24 auto arrange(const rectangle& bounds, std::vector<std::unique_ptr<element>>& children) -> void override;
25
26}; // class horizontal_layout
27
28} // namespace sbx::ui
29
30#endif // LIBSBX_UI_HORIZONTAL_LAYOUT_HPP_
Definition: horizontal_layout.hpp:12
Definition: layout.hpp:39
Definition: layout.hpp:15