3#include "di/container/string/prelude.h"
4#include "di/reflect/prelude.h"
18constexpr auto tag_invoke(di::Tag<di::reflect>, di::InPlaceType<NavigateDirection>) {
20 return di::make_enumerators<
"NavigateDirection">(di::enumerator<
"Left",
Left>, di::enumerator<
"Right",
Right>,
21 di::enumerator<
"Up",
Up>, di::enumerator<
"Down",
Down>);
29 void layout(dius::tty::WindowSize
const& size, u32 row, u32 col);
43 auto name() const -> di::StringView {
return m_name; }
44 auto empty() const ->
bool {
return m_layout_root.empty(); }
51 return *m_layout_tree;
61 auto panes() const -> di::Ring<
Pane*> const& {
return m_panes_ordered_by_recency; }
67 dius::tty::WindowSize m_size;
70 di::Box<LayoutNode> m_layout_tree {};
71 di::Ring<Pane*> m_panes_ordered_by_recency {};
72 bool m_is_active {
false };
73 Pane* m_active {
nullptr };
Definition test_layout.cpp:6
Definition cursor_style.h:5
NavigateDirection
Definition tab.h:11
Direction
Definition direction.h:7
@ Down
Definition key.h:72
@ Right
Definition key.h:70
@ Left
Definition key.h:69
constexpr auto tag_invoke(di::Tag< di::reflect >, di::InPlaceType< CursorStyle >)
Definition cursor_style.h:16
auto name() const -> di::StringView
Definition tab.h:43
void invalidate_all()
Definition tab.cpp:14
Tab(di::String name)
Definition tab.h:27
auto set_active(Pane *pane) -> bool
Definition tab.cpp:131
void navigate(NavigateDirection direction)
Definition tab.cpp:76
auto add_pane(dius::tty::WindowSize const &size, u32 row, u32 col, CreatePaneArgs args, Direction direction, RenderThread &render_thread) -> di::Result<>
Definition tab.cpp:35
auto is_active() -> bool
Definition tab.h:64
auto set_is_active(bool b) -> bool
Definition tab.cpp:151
auto empty() const -> bool
Definition tab.h:44
auto layout_group() -> LayoutGroup &
Definition tab.h:46
auto remove_pane(Pane *pane) -> di::Box< Pane >
Definition tab.cpp:20
auto layout_tree() const -> di::Optional< LayoutNode & >
Definition tab.h:47
auto panes() const -> di::Ring< Pane * > const &
Definition tab.h:61
auto active() const -> di::Optional< Pane & >
Definition tab.h:54