#include <unified_layout.h>
Public Member Functions | |
UnifiedLayout (Rom *rom_context=nullptr) | |
void | Run () |
void | SetRomContext (Rom *rom_context) |
void | SwitchMainPanel (PanelType panel) |
void | SwitchToolPanel (PanelType panel) |
void | ToggleChat () |
void | ToggleStatus () |
void | ToggleTodoOverlay () |
void | SetLayoutConfig (const LayoutConfig &config) |
LayoutConfig | GetLayoutConfig () const |
void | SetStatusProvider (std::function< ftxui::Element()> provider) |
void | SetCommandSummaryProvider (std::function< std::vector< std::string >()> provider) |
void | SetTodoProvider (std::function< std::vector< std::string >()> provider) |
Private Member Functions | |
void | InitializeTheme () |
ftxui::Component | CreateMainMenuPanel () |
ftxui::Component | CreateChatPanel () |
ftxui::Component | CreateStatusPanel () |
ftxui::Component | CreateToolsPanel () |
ftxui::Component | CreateHexViewerPanel () |
ftxui::Component | CreatePaletteEditorPanel () |
ftxui::Component | CreateTodoManagerPanel () |
ftxui::Component | CreateRomToolsPanel () |
ftxui::Component | CreateGraphicsToolsPanel () |
ftxui::Component | CreateSettingsPanel () |
ftxui::Component | CreateHelpPanel () |
ftxui::Component | CreateUnifiedLayout () |
bool | HandleGlobalEvents (const ftxui::Event &event) |
bool | HandlePanelEvents (const ftxui::Event &event) |
ftxui::Element | RenderPanelHeader (PanelType panel) |
ftxui::Element | RenderStatusBar () |
ftxui::Element | RenderAnimatedBanner () |
ftxui::Element | RenderWorkflowLane () |
ftxui::Element | RenderCommandHints () |
ftxui::Element | RenderTodoStack () |
ftxui::Element | RenderResponsiveGrid (const std::vector< ftxui::Element > &tiles) |
Private Attributes | |
ftxui::ScreenInteractive | screen_ |
Rom * | rom_context_ |
LayoutConfig | config_ |
PanelState | state_ |
std::unique_ptr< tui::ChatTUI > | chat_tui_ |
std::unique_ptr< HexViewerComponent > | hex_viewer_component_ |
ftxui::Component | main_menu_panel_ |
ftxui::Component | chat_panel_ |
ftxui::Component | status_panel_ |
ftxui::Component | tools_panel_ |
ftxui::Component | hex_viewer_panel_ |
ftxui::Component | palette_editor_panel_ |
ftxui::Component | todo_manager_panel_ |
ftxui::Component | rom_tools_panel_ |
ftxui::Component | graphics_tools_panel_ |
ftxui::Component | settings_panel_ |
ftxui::Component | help_panel_ |
ftxui::Component | unified_layout_ |
std::function< bool(const ftxui::Event &)> | global_event_handler_ |
std::function< bool(const ftxui::Event &)> | panel_event_handler_ |
std::function< ftxui::Element()> | status_provider_ |
std::function< std::vector< std::string >()> | command_summary_provider_ |
std::function< std::vector< std::string >()> | todo_provider_ |
bool | todo_overlay_visible_ = false |
ftxui::Component | todo_overlay_component_ |
Definition at line 66 of file unified_layout.h.
|
explicit |
Definition at line 19 of file unified_layout.cc.
References yaze::cli::PanelState::active_workflows, chat_panel_, chat_tui_, yaze::cli::PanelState::command_palette_hint, command_summary_provider_, config_, CreateChatPanel(), CreateGraphicsToolsPanel(), CreateHelpPanel(), CreateHexViewerPanel(), CreateMainMenuPanel(), CreatePaletteEditorPanel(), CreateRomToolsPanel(), CreateSettingsPanel(), CreateStatusPanel(), CreateTodoManagerPanel(), CreateToolsPanel(), CreateUnifiedLayout(), yaze::cli::PanelState::current_rom_file, global_event_handler_, graphics_tools_panel_, HandleGlobalEvents(), HandlePanelEvents(), help_panel_, hex_viewer_panel_, InitializeTheme(), yaze::Rom::is_loaded(), main_menu_panel_, palette_editor_panel_, panel_event_handler_, rom_context_, rom_tools_panel_, settings_panel_, state_, status_panel_, status_provider_, yaze::Rom::title(), todo_manager_panel_, todo_provider_, tools_panel_, and unified_layout_.
void yaze::cli::UnifiedLayout::Run | ( | ) |
Definition at line 98 of file unified_layout.cc.
References global_event_handler_, screen_, and unified_layout_.
Referenced by yaze::cli::ShowMain().
void yaze::cli::UnifiedLayout::SetRomContext | ( | Rom * | rom_context | ) |
Definition at line 105 of file unified_layout.cc.
References chat_tui_, yaze::cli::PanelState::current_rom_file, rom_context_, state_, and yaze::Rom::title().
void yaze::cli::UnifiedLayout::SwitchMainPanel | ( | PanelType | panel | ) |
Definition at line 118 of file unified_layout.cc.
References yaze::cli::PanelState::active_main_panel, screen_, and state_.
Referenced by CreateMainMenuPanel(), and HandleGlobalEvents().
void yaze::cli::UnifiedLayout::SwitchToolPanel | ( | PanelType | panel | ) |
Definition at line 123 of file unified_layout.cc.
References yaze::cli::PanelState::active_tool_panel, screen_, and state_.
void yaze::cli::UnifiedLayout::ToggleChat | ( | ) |
Definition at line 128 of file unified_layout.cc.
References config_, screen_, and yaze::cli::LayoutConfig::show_chat.
Referenced by HandleGlobalEvents().
void yaze::cli::UnifiedLayout::ToggleStatus | ( | ) |
Definition at line 133 of file unified_layout.cc.
References config_, screen_, and yaze::cli::LayoutConfig::show_status.
Referenced by HandleGlobalEvents().
void yaze::cli::UnifiedLayout::ToggleTodoOverlay | ( | ) |
Definition at line 138 of file unified_layout.cc.
References screen_, todo_overlay_component_, todo_overlay_visible_, and todo_provider_.
Referenced by HandleGlobalEvents().
void yaze::cli::UnifiedLayout::SetLayoutConfig | ( | const LayoutConfig & | config | ) |
Definition at line 169 of file unified_layout.cc.
References config_.
Referenced by yaze::cli::ShowMain().
|
inline |
Definition at line 83 of file unified_layout.h.
References config_.
void yaze::cli::UnifiedLayout::SetStatusProvider | ( | std::function< ftxui::Element()> | provider | ) |
Definition at line 173 of file unified_layout.cc.
References status_provider_.
void yaze::cli::UnifiedLayout::SetCommandSummaryProvider | ( | std::function< std::vector< std::string >()> | provider | ) |
Definition at line 177 of file unified_layout.cc.
References command_summary_provider_.
void yaze::cli::UnifiedLayout::SetTodoProvider | ( | std::function< std::vector< std::string >()> | provider | ) |
Definition at line 181 of file unified_layout.cc.
References todo_provider_.
|
private |
Definition at line 185 of file unified_layout.cc.
References yaze::cli::LayoutConfig::bottom_panel_height, config_, and yaze::cli::LayoutConfig::right_panel_width.
Referenced by UnifiedLayout().
|
private |
Definition at line 193 of file unified_layout.cc.
References yaze::cli::kGraphicsTools, yaze::cli::kHelp, yaze::cli::kHexViewer, yaze::cli::kPaletteEditor, yaze::cli::kRomTools, yaze::cli::kSettings, yaze::cli::kTodoManager, RenderAnimatedBanner(), RenderCommandHints(), RenderWorkflowLane(), screen_, and SwitchMainPanel().
Referenced by UnifiedLayout().
|
private |
Definition at line 243 of file unified_layout.cc.
References chat_tui_, yaze::cli::kChat, RenderPanelHeader(), RenderResponsiveGrid(), rom_context_, screen_, yaze::Rom::size(), and yaze::Rom::title().
Referenced by UnifiedLayout().
|
private |
Definition at line 339 of file unified_layout.cc.
References yaze::cli::PanelState::current_error, RenderAnimatedBanner(), RenderCommandHints(), RenderTodoStack(), rom_context_, state_, status_provider_, and yaze::Rom::title().
Referenced by UnifiedLayout().
|
private |
Definition at line 370 of file unified_layout.cc.
References yaze::cli::PanelState::command_palette_hint, yaze::cli::kTools, RenderCommandHints(), RenderPanelHeader(), RenderWorkflowLane(), and state_.
Referenced by UnifiedLayout().
|
private |
Definition at line 406 of file unified_layout.cc.
References RenderWorkflowLane(), rom_context_, yaze::Rom::size(), and yaze::Rom::vector().
Referenced by UnifiedLayout().
|
private |
Definition at line 469 of file unified_layout.cc.
References yaze::cli::kPaletteEditor, RenderPanelHeader(), RenderResponsiveGrid(), and RenderWorkflowLane().
Referenced by UnifiedLayout().
|
private |
Definition at line 501 of file unified_layout.cc.
References yaze::cli::kTodoManager, RenderPanelHeader(), RenderWorkflowLane(), and todo_provider_.
Referenced by UnifiedLayout().
|
private |
Definition at line 527 of file unified_layout.cc.
Referenced by UnifiedLayout().
|
private |
Definition at line 554 of file unified_layout.cc.
Referenced by UnifiedLayout().
|
private |
Definition at line 578 of file unified_layout.cc.
References yaze::cli::LayoutConfig::bottom_panel_height, config_, yaze::cli::kSettings, yaze::cli::LayoutConfig::left_panel_width, RenderPanelHeader(), yaze::cli::LayoutConfig::right_panel_width, screen_, yaze::cli::LayoutConfig::show_chat, and yaze::cli::LayoutConfig::show_status.
Referenced by UnifiedLayout().
|
private |
Definition at line 673 of file unified_layout.cc.
References yaze::cli::kHelp, and RenderPanelHeader().
Referenced by UnifiedLayout().
|
private |
Definition at line 715 of file unified_layout.cc.
References yaze::cli::PanelState::active_main_panel, yaze::cli::LayoutConfig::bottom_panel_height, chat_panel_, config_, graphics_tools_panel_, help_panel_, hex_viewer_panel_, main_menu_panel_, palette_editor_panel_, yaze::cli::LayoutConfig::right_panel_width, rom_tools_panel_, settings_panel_, yaze::cli::LayoutConfig::show_chat, yaze::cli::LayoutConfig::show_status, state_, status_panel_, todo_manager_panel_, todo_overlay_component_, todo_overlay_visible_, and tools_panel_.
Referenced by UnifiedLayout().
|
private |
Definition at line 803 of file unified_layout.cc.
References yaze::cli::PanelState::active_main_panel, chat_tui_, yaze::cli::kHelp, yaze::cli::kMainMenu, yaze::cli::kRomTools, screen_, state_, SwitchMainPanel(), ToggleChat(), ToggleStatus(), and ToggleTodoOverlay().
Referenced by UnifiedLayout().
|
private |
Definition at line 862 of file unified_layout.cc.
Referenced by UnifiedLayout().
|
private |
Definition at line 867 of file unified_layout.cc.
References yaze::cli::kChat, yaze::cli::kGraphicsTools, yaze::cli::kHelp, yaze::cli::kHexViewer, yaze::cli::kMainMenu, yaze::cli::kPaletteEditor, yaze::cli::kRomTools, yaze::cli::kSettings, yaze::cli::kStatus, yaze::cli::kTodoManager, and yaze::cli::kTools.
Referenced by CreateChatPanel(), CreateHelpPanel(), CreatePaletteEditorPanel(), CreateSettingsPanel(), CreateTodoManagerPanel(), and CreateToolsPanel().
|
private |
Definition at line 908 of file unified_layout.cc.
References yaze::cli::PanelState::active_main_panel, yaze::cli::PanelState::current_rom_file, yaze::cli::kMainMenu, and state_.
|
private |
Definition at line 920 of file unified_layout.cc.
Referenced by CreateMainMenuPanel(), and CreateStatusPanel().
|
private |
Definition at line 924 of file unified_layout.cc.
Referenced by CreateHexViewerPanel(), CreateMainMenuPanel(), CreatePaletteEditorPanel(), CreateTodoManagerPanel(), and CreateToolsPanel().
|
private |
Definition at line 928 of file unified_layout.cc.
Referenced by CreateMainMenuPanel(), CreateStatusPanel(), and CreateToolsPanel().
|
private |
Definition at line 937 of file unified_layout.cc.
Referenced by CreateStatusPanel().
|
private |
Definition at line 941 of file unified_layout.cc.
Referenced by CreateChatPanel(), and CreatePaletteEditorPanel().
|
private |
Definition at line 120 of file unified_layout.h.
Referenced by CreateChatPanel(), CreateMainMenuPanel(), CreateSettingsPanel(), HandleGlobalEvents(), Run(), SwitchMainPanel(), SwitchToolPanel(), ToggleChat(), ToggleStatus(), and ToggleTodoOverlay().
|
private |
Definition at line 121 of file unified_layout.h.
Referenced by CreateChatPanel(), CreateHexViewerPanel(), CreateStatusPanel(), SetRomContext(), and UnifiedLayout().
|
private |
Definition at line 122 of file unified_layout.h.
Referenced by CreateSettingsPanel(), CreateUnifiedLayout(), GetLayoutConfig(), InitializeTheme(), SetLayoutConfig(), ToggleChat(), ToggleStatus(), and UnifiedLayout().
|
private |
Definition at line 123 of file unified_layout.h.
Referenced by CreateStatusPanel(), CreateToolsPanel(), CreateUnifiedLayout(), HandleGlobalEvents(), RenderStatusBar(), SetRomContext(), SwitchMainPanel(), SwitchToolPanel(), and UnifiedLayout().
|
private |
Definition at line 126 of file unified_layout.h.
Referenced by CreateChatPanel(), HandleGlobalEvents(), SetRomContext(), and UnifiedLayout().
|
private |
Definition at line 127 of file unified_layout.h.
|
private |
Definition at line 130 of file unified_layout.h.
Referenced by CreateUnifiedLayout(), and UnifiedLayout().
|
private |
Definition at line 131 of file unified_layout.h.
Referenced by CreateUnifiedLayout(), and UnifiedLayout().
|
private |
Definition at line 132 of file unified_layout.h.
Referenced by CreateUnifiedLayout(), and UnifiedLayout().
|
private |
Definition at line 133 of file unified_layout.h.
Referenced by CreateUnifiedLayout(), and UnifiedLayout().
|
private |
Definition at line 134 of file unified_layout.h.
Referenced by CreateUnifiedLayout(), and UnifiedLayout().
|
private |
Definition at line 135 of file unified_layout.h.
Referenced by CreateUnifiedLayout(), and UnifiedLayout().
|
private |
Definition at line 136 of file unified_layout.h.
Referenced by CreateUnifiedLayout(), and UnifiedLayout().
|
private |
Definition at line 137 of file unified_layout.h.
Referenced by CreateUnifiedLayout(), and UnifiedLayout().
|
private |
Definition at line 138 of file unified_layout.h.
Referenced by CreateUnifiedLayout(), and UnifiedLayout().
|
private |
Definition at line 139 of file unified_layout.h.
Referenced by CreateUnifiedLayout(), and UnifiedLayout().
|
private |
Definition at line 140 of file unified_layout.h.
Referenced by CreateUnifiedLayout(), and UnifiedLayout().
|
private |
Definition at line 143 of file unified_layout.h.
Referenced by Run(), and UnifiedLayout().
|
private |
Definition at line 146 of file unified_layout.h.
Referenced by Run(), and UnifiedLayout().
|
private |
Definition at line 147 of file unified_layout.h.
Referenced by UnifiedLayout().
|
private |
Definition at line 150 of file unified_layout.h.
Referenced by CreateStatusPanel(), SetStatusProvider(), and UnifiedLayout().
|
private |
Definition at line 151 of file unified_layout.h.
Referenced by SetCommandSummaryProvider(), and UnifiedLayout().
|
private |
Definition at line 152 of file unified_layout.h.
Referenced by CreateTodoManagerPanel(), SetTodoProvider(), ToggleTodoOverlay(), and UnifiedLayout().
|
private |
Definition at line 154 of file unified_layout.h.
Referenced by CreateUnifiedLayout(), and ToggleTodoOverlay().
|
private |
Definition at line 155 of file unified_layout.h.
Referenced by CreateUnifiedLayout(), and ToggleTodoOverlay().