yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::cli::UnifiedLayout Class Reference

#include <unified_layout.h>

Collaboration diagram for yaze::cli::UnifiedLayout:

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_
 
Romrom_context_
 
LayoutConfig config_
 
PanelState state_
 
std::unique_ptr< tui::ChatTUIchat_tui_
 
std::unique_ptr< HexViewerComponenthex_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_
 

Detailed Description

Definition at line 66 of file unified_layout.h.

Constructor & Destructor Documentation

◆ UnifiedLayout()

Member Function Documentation

◆ Run()

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().

◆ SetRomContext()

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().

Here is the call graph for this function:

◆ SwitchMainPanel()

void yaze::cli::UnifiedLayout::SwitchMainPanel ( PanelType  panel)

◆ SwitchToolPanel()

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_.

◆ ToggleChat()

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().

◆ ToggleStatus()

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().

◆ ToggleTodoOverlay()

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().

◆ SetLayoutConfig()

void yaze::cli::UnifiedLayout::SetLayoutConfig ( const LayoutConfig config)

Definition at line 169 of file unified_layout.cc.

References config_.

Referenced by yaze::cli::ShowMain().

◆ GetLayoutConfig()

LayoutConfig yaze::cli::UnifiedLayout::GetLayoutConfig ( ) const
inline

Definition at line 83 of file unified_layout.h.

References config_.

◆ SetStatusProvider()

void yaze::cli::UnifiedLayout::SetStatusProvider ( std::function< ftxui::Element()>  provider)

Definition at line 173 of file unified_layout.cc.

References status_provider_.

◆ SetCommandSummaryProvider()

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_.

◆ SetTodoProvider()

void yaze::cli::UnifiedLayout::SetTodoProvider ( std::function< std::vector< std::string >()>  provider)

Definition at line 181 of file unified_layout.cc.

References todo_provider_.

◆ InitializeTheme()

void yaze::cli::UnifiedLayout::InitializeTheme ( )
private

◆ CreateMainMenuPanel()

Component yaze::cli::UnifiedLayout::CreateMainMenuPanel ( )
private

◆ CreateChatPanel()

Component yaze::cli::UnifiedLayout::CreateChatPanel ( )
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().

Here is the call graph for this function:

◆ CreateStatusPanel()

Component yaze::cli::UnifiedLayout::CreateStatusPanel ( )
private

◆ CreateToolsPanel()

Component yaze::cli::UnifiedLayout::CreateToolsPanel ( )
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().

Here is the call graph for this function:

◆ CreateHexViewerPanel()

Component yaze::cli::UnifiedLayout::CreateHexViewerPanel ( )
private

Definition at line 406 of file unified_layout.cc.

References RenderWorkflowLane(), rom_context_, yaze::Rom::size(), and yaze::Rom::vector().

Referenced by UnifiedLayout().

Here is the call graph for this function:

◆ CreatePaletteEditorPanel()

Component yaze::cli::UnifiedLayout::CreatePaletteEditorPanel ( )
private

Definition at line 469 of file unified_layout.cc.

References yaze::cli::kPaletteEditor, RenderPanelHeader(), RenderResponsiveGrid(), and RenderWorkflowLane().

Referenced by UnifiedLayout().

Here is the call graph for this function:

◆ CreateTodoManagerPanel()

Component yaze::cli::UnifiedLayout::CreateTodoManagerPanel ( )
private

Definition at line 501 of file unified_layout.cc.

References yaze::cli::kTodoManager, RenderPanelHeader(), RenderWorkflowLane(), and todo_provider_.

Referenced by UnifiedLayout().

Here is the call graph for this function:

◆ CreateRomToolsPanel()

Component yaze::cli::UnifiedLayout::CreateRomToolsPanel ( )
private

Definition at line 527 of file unified_layout.cc.

Referenced by UnifiedLayout().

◆ CreateGraphicsToolsPanel()

Component yaze::cli::UnifiedLayout::CreateGraphicsToolsPanel ( )
private

Definition at line 554 of file unified_layout.cc.

Referenced by UnifiedLayout().

◆ CreateSettingsPanel()

Component yaze::cli::UnifiedLayout::CreateSettingsPanel ( )
private

◆ CreateHelpPanel()

Component yaze::cli::UnifiedLayout::CreateHelpPanel ( )
private

Definition at line 673 of file unified_layout.cc.

References yaze::cli::kHelp, and RenderPanelHeader().

Referenced by UnifiedLayout().

Here is the call graph for this function:

◆ CreateUnifiedLayout()

◆ HandleGlobalEvents()

bool yaze::cli::UnifiedLayout::HandleGlobalEvents ( const ftxui::Event &  event)
private

◆ HandlePanelEvents()

bool yaze::cli::UnifiedLayout::HandlePanelEvents ( const ftxui::Event &  event)
private

Definition at line 862 of file unified_layout.cc.

Referenced by UnifiedLayout().

◆ RenderPanelHeader()

◆ RenderStatusBar()

Element yaze::cli::UnifiedLayout::RenderStatusBar ( )
private

◆ RenderAnimatedBanner()

Element yaze::cli::UnifiedLayout::RenderAnimatedBanner ( )
private

Definition at line 920 of file unified_layout.cc.

Referenced by CreateMainMenuPanel(), and CreateStatusPanel().

◆ RenderWorkflowLane()

Element yaze::cli::UnifiedLayout::RenderWorkflowLane ( )
private

◆ RenderCommandHints()

Element yaze::cli::UnifiedLayout::RenderCommandHints ( )
private

Definition at line 928 of file unified_layout.cc.

Referenced by CreateMainMenuPanel(), CreateStatusPanel(), and CreateToolsPanel().

◆ RenderTodoStack()

Element yaze::cli::UnifiedLayout::RenderTodoStack ( )
private

Definition at line 937 of file unified_layout.cc.

Referenced by CreateStatusPanel().

◆ RenderResponsiveGrid()

Element yaze::cli::UnifiedLayout::RenderResponsiveGrid ( const std::vector< ftxui::Element > &  tiles)
private

Definition at line 941 of file unified_layout.cc.

Referenced by CreateChatPanel(), and CreatePaletteEditorPanel().

Member Data Documentation

◆ screen_

ftxui::ScreenInteractive yaze::cli::UnifiedLayout::screen_
private

◆ rom_context_

Rom* yaze::cli::UnifiedLayout::rom_context_
private

◆ config_

◆ state_

◆ chat_tui_

std::unique_ptr<tui::ChatTUI> yaze::cli::UnifiedLayout::chat_tui_
private

◆ hex_viewer_component_

std::unique_ptr<HexViewerComponent> yaze::cli::UnifiedLayout::hex_viewer_component_
private

Definition at line 127 of file unified_layout.h.

◆ main_menu_panel_

ftxui::Component yaze::cli::UnifiedLayout::main_menu_panel_
private

Definition at line 130 of file unified_layout.h.

Referenced by CreateUnifiedLayout(), and UnifiedLayout().

◆ chat_panel_

ftxui::Component yaze::cli::UnifiedLayout::chat_panel_
private

Definition at line 131 of file unified_layout.h.

Referenced by CreateUnifiedLayout(), and UnifiedLayout().

◆ status_panel_

ftxui::Component yaze::cli::UnifiedLayout::status_panel_
private

Definition at line 132 of file unified_layout.h.

Referenced by CreateUnifiedLayout(), and UnifiedLayout().

◆ tools_panel_

ftxui::Component yaze::cli::UnifiedLayout::tools_panel_
private

Definition at line 133 of file unified_layout.h.

Referenced by CreateUnifiedLayout(), and UnifiedLayout().

◆ hex_viewer_panel_

ftxui::Component yaze::cli::UnifiedLayout::hex_viewer_panel_
private

Definition at line 134 of file unified_layout.h.

Referenced by CreateUnifiedLayout(), and UnifiedLayout().

◆ palette_editor_panel_

ftxui::Component yaze::cli::UnifiedLayout::palette_editor_panel_
private

Definition at line 135 of file unified_layout.h.

Referenced by CreateUnifiedLayout(), and UnifiedLayout().

◆ todo_manager_panel_

ftxui::Component yaze::cli::UnifiedLayout::todo_manager_panel_
private

Definition at line 136 of file unified_layout.h.

Referenced by CreateUnifiedLayout(), and UnifiedLayout().

◆ rom_tools_panel_

ftxui::Component yaze::cli::UnifiedLayout::rom_tools_panel_
private

Definition at line 137 of file unified_layout.h.

Referenced by CreateUnifiedLayout(), and UnifiedLayout().

◆ graphics_tools_panel_

ftxui::Component yaze::cli::UnifiedLayout::graphics_tools_panel_
private

Definition at line 138 of file unified_layout.h.

Referenced by CreateUnifiedLayout(), and UnifiedLayout().

◆ settings_panel_

ftxui::Component yaze::cli::UnifiedLayout::settings_panel_
private

Definition at line 139 of file unified_layout.h.

Referenced by CreateUnifiedLayout(), and UnifiedLayout().

◆ help_panel_

ftxui::Component yaze::cli::UnifiedLayout::help_panel_
private

Definition at line 140 of file unified_layout.h.

Referenced by CreateUnifiedLayout(), and UnifiedLayout().

◆ unified_layout_

ftxui::Component yaze::cli::UnifiedLayout::unified_layout_
private

Definition at line 143 of file unified_layout.h.

Referenced by Run(), and UnifiedLayout().

◆ global_event_handler_

std::function<bool(const ftxui::Event&)> yaze::cli::UnifiedLayout::global_event_handler_
private

Definition at line 146 of file unified_layout.h.

Referenced by Run(), and UnifiedLayout().

◆ panel_event_handler_

std::function<bool(const ftxui::Event&)> yaze::cli::UnifiedLayout::panel_event_handler_
private

Definition at line 147 of file unified_layout.h.

Referenced by UnifiedLayout().

◆ status_provider_

std::function<ftxui::Element()> yaze::cli::UnifiedLayout::status_provider_
private

Definition at line 150 of file unified_layout.h.

Referenced by CreateStatusPanel(), SetStatusProvider(), and UnifiedLayout().

◆ command_summary_provider_

std::function<std::vector<std::string>()> yaze::cli::UnifiedLayout::command_summary_provider_
private

Definition at line 151 of file unified_layout.h.

Referenced by SetCommandSummaryProvider(), and UnifiedLayout().

◆ todo_provider_

std::function<std::vector<std::string>()> yaze::cli::UnifiedLayout::todo_provider_
private

◆ todo_overlay_visible_

bool yaze::cli::UnifiedLayout::todo_overlay_visible_ = false
private

Definition at line 154 of file unified_layout.h.

Referenced by CreateUnifiedLayout(), and ToggleTodoOverlay().

◆ todo_overlay_component_

ftxui::Component yaze::cli::UnifiedLayout::todo_overlay_component_
private

Definition at line 155 of file unified_layout.h.

Referenced by CreateUnifiedLayout(), and ToggleTodoOverlay().


The documentation for this class was generated from the following files: