1 #ifndef TERMOX_WIDGET_WIDGETS_TITLEBAR_HPP
2 #define TERMOX_WIDGET_WIDGETS_TITLEBAR_HPP
5 #include <termox/painter/glyph_string.hpp>
6 #include <termox/widget/pair.hpp>
7 #include <termox/widget/widgets/button.hpp>
8 #include <termox/widget/widgets/label.hpp>
22 HLabel& title = this->first;
23 Button& exit_button = this->second;
33 inline static auto constexpr exit_width = 3;
34 inline static auto constexpr extra_left = 0;
35 inline static auto constexpr extra_right = exit_width;
39 [[nodiscard]]
auto titlebar(
Glyph_string title_text = U
"")
40 -> std::unique_ptr<Titlebar>;
44 -> std::unique_ptr<Titlebar>;
Holds a collection of Glyphs with a similar interface to std::string.
Definition: glyph_string.hpp:19
A single line of text with alignment, non-editable.
Definition: label.hpp:22
Provides a centered title and flush-right exit button.
Definition: titlebar.hpp:15
Titlebar(Glyph_string title_text=U"")
Construct a Titlebar with centered title.
Definition: titlebar.cpp:17
Heterogeneous pair of Widgets within a Layout.
Definition: pair.hpp:14
Definition: titlebar.hpp:17