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

#include <enhanced_status_panel.h>

Collaboration diagram for yaze::cli::EnhancedStatusPanel:

Classes

struct  LayoutInfo
 
struct  RomInfo
 
struct  SystemInfo
 

Public Member Functions

 EnhancedStatusPanel (Rom *rom_context=nullptr)
 
ftxui::Component GetComponent ()
 
void SetRomContext (Rom *rom_context)
 
void UpdateRomInfo ()
 
void UpdateSystemInfo ()
 
void UpdateLayoutInfo ()
 
void SetError (const std::string &error)
 
void ClearError ()
 
void SetShowDetailedInfo (bool show)
 
bool GetShowDetailedInfo () const
 
bool IsExpanded () const
 
void SetExpanded (bool expanded)
 

Private Member Functions

ftxui::Component CreateStatusContainer ()
 
ftxui::Component CreateRomInfoSection ()
 
ftxui::Component CreateSystemInfoSection ()
 
ftxui::Component CreateLayoutInfoSection ()
 
ftxui::Component CreateErrorSection ()
 
bool HandleStatusEvents (const ftxui::Event &event)
 
ftxui::Element RenderRomInfo ()
 
ftxui::Element RenderSystemInfo ()
 
ftxui::Element RenderLayoutInfo ()
 
ftxui::Element RenderErrorInfo ()
 
ftxui::Element RenderStatusBar ()
 
void CollectRomInfo ()
 
void CollectSystemInfo ()
 
void CollectLayoutInfo ()
 

Private Attributes

Romrom_context_
 
bool expanded_ = false
 
bool show_detailed_info_ = true
 
struct yaze::cli::EnhancedStatusPanel::RomInfo rom_info_
 
struct yaze::cli::EnhancedStatusPanel::SystemInfo system_info_
 
struct yaze::cli::EnhancedStatusPanel::LayoutInfo layout_info_
 
std::string current_error_
 
ftxui::Component status_container_
 
ftxui::Component rom_info_section_
 
ftxui::Component system_info_section_
 
ftxui::Component layout_info_section_
 
ftxui::Component error_section_
 
std::function< bool(const ftxui::Event &)> status_event_handler_
 

Detailed Description

Definition at line 16 of file enhanced_status_panel.h.

Constructor & Destructor Documentation

◆ EnhancedStatusPanel()

Member Function Documentation

◆ GetComponent()

Component yaze::cli::EnhancedStatusPanel::GetComponent ( )

Definition at line 36 of file enhanced_status_panel.cc.

References status_container_.

◆ SetRomContext()

void yaze::cli::EnhancedStatusPanel::SetRomContext ( Rom rom_context)

Definition at line 40 of file enhanced_status_panel.cc.

References rom_context_, and UpdateRomInfo().

Here is the call graph for this function:

◆ UpdateRomInfo()

void yaze::cli::EnhancedStatusPanel::UpdateRomInfo ( )

Definition at line 45 of file enhanced_status_panel.cc.

References CollectRomInfo().

Referenced by SetRomContext().

Here is the call graph for this function:

◆ UpdateSystemInfo()

void yaze::cli::EnhancedStatusPanel::UpdateSystemInfo ( )

Definition at line 49 of file enhanced_status_panel.cc.

References CollectSystemInfo().

Here is the call graph for this function:

◆ UpdateLayoutInfo()

void yaze::cli::EnhancedStatusPanel::UpdateLayoutInfo ( )

Definition at line 53 of file enhanced_status_panel.cc.

References CollectLayoutInfo().

Here is the call graph for this function:

◆ SetError()

void yaze::cli::EnhancedStatusPanel::SetError ( const std::string &  error)

Definition at line 57 of file enhanced_status_panel.cc.

References current_error_.

◆ ClearError()

void yaze::cli::EnhancedStatusPanel::ClearError ( )

Definition at line 61 of file enhanced_status_panel.cc.

References current_error_.

◆ SetShowDetailedInfo()

void yaze::cli::EnhancedStatusPanel::SetShowDetailedInfo ( bool  show)
inline

Definition at line 32 of file enhanced_status_panel.h.

References show_detailed_info_.

Referenced by HandleStatusEvents().

◆ GetShowDetailedInfo()

bool yaze::cli::EnhancedStatusPanel::GetShowDetailedInfo ( ) const
inline

Definition at line 33 of file enhanced_status_panel.h.

References show_detailed_info_.

◆ IsExpanded()

bool yaze::cli::EnhancedStatusPanel::IsExpanded ( ) const
inline

Definition at line 36 of file enhanced_status_panel.h.

References expanded_.

◆ SetExpanded()

void yaze::cli::EnhancedStatusPanel::SetExpanded ( bool  expanded)
inline

Definition at line 37 of file enhanced_status_panel.h.

References expanded_.

Referenced by HandleStatusEvents().

◆ CreateStatusContainer()

Component yaze::cli::EnhancedStatusPanel::CreateStatusContainer ( )
private

Definition at line 65 of file enhanced_status_panel.cc.

References error_section_, layout_info_section_, RenderStatusBar(), rom_info_section_, and system_info_section_.

Referenced by EnhancedStatusPanel().

Here is the call graph for this function:

◆ CreateRomInfoSection()

Component yaze::cli::EnhancedStatusPanel::CreateRomInfoSection ( )
private

Definition at line 90 of file enhanced_status_panel.cc.

References RenderRomInfo().

Referenced by EnhancedStatusPanel().

Here is the call graph for this function:

◆ CreateSystemInfoSection()

Component yaze::cli::EnhancedStatusPanel::CreateSystemInfoSection ( )
private

Definition at line 96 of file enhanced_status_panel.cc.

References RenderSystemInfo().

Referenced by EnhancedStatusPanel().

Here is the call graph for this function:

◆ CreateLayoutInfoSection()

Component yaze::cli::EnhancedStatusPanel::CreateLayoutInfoSection ( )
private

Definition at line 102 of file enhanced_status_panel.cc.

References RenderLayoutInfo().

Referenced by EnhancedStatusPanel().

Here is the call graph for this function:

◆ CreateErrorSection()

Component yaze::cli::EnhancedStatusPanel::CreateErrorSection ( )
private

Definition at line 108 of file enhanced_status_panel.cc.

References RenderErrorInfo().

Referenced by EnhancedStatusPanel().

Here is the call graph for this function:

◆ HandleStatusEvents()

bool yaze::cli::EnhancedStatusPanel::HandleStatusEvents ( const ftxui::Event &  event)
private

Definition at line 114 of file enhanced_status_panel.cc.

References expanded_, SetExpanded(), SetShowDetailedInfo(), and show_detailed_info_.

Referenced by EnhancedStatusPanel().

Here is the call graph for this function:

◆ RenderRomInfo()

◆ RenderSystemInfo()

◆ RenderLayoutInfo()

◆ RenderErrorInfo()

Element yaze::cli::EnhancedStatusPanel::RenderErrorInfo ( )
private

Definition at line 166 of file enhanced_status_panel.cc.

References current_error_.

Referenced by CreateErrorSection().

◆ RenderStatusBar()

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

Definition at line 179 of file enhanced_status_panel.cc.

References expanded_, and show_detailed_info_.

Referenced by CreateStatusContainer().

◆ CollectRomInfo()

◆ CollectSystemInfo()

◆ CollectLayoutInfo()

Member Data Documentation

◆ rom_context_

Rom* yaze::cli::EnhancedStatusPanel::rom_context_
private

Definition at line 63 of file enhanced_status_panel.h.

Referenced by CollectRomInfo(), and SetRomContext().

◆ expanded_

bool yaze::cli::EnhancedStatusPanel::expanded_ = false
private

◆ show_detailed_info_

bool yaze::cli::EnhancedStatusPanel::show_detailed_info_ = true
private

◆ rom_info_

struct yaze::cli::EnhancedStatusPanel::RomInfo yaze::cli::EnhancedStatusPanel::rom_info_
private

Referenced by CollectRomInfo(), and RenderRomInfo().

◆ system_info_

struct yaze::cli::EnhancedStatusPanel::SystemInfo yaze::cli::EnhancedStatusPanel::system_info_
private

◆ layout_info_

struct yaze::cli::EnhancedStatusPanel::LayoutInfo yaze::cli::EnhancedStatusPanel::layout_info_
private

◆ current_error_

std::string yaze::cli::EnhancedStatusPanel::current_error_
private

Definition at line 90 of file enhanced_status_panel.h.

Referenced by ClearError(), RenderErrorInfo(), and SetError().

◆ status_container_

ftxui::Component yaze::cli::EnhancedStatusPanel::status_container_
private

Definition at line 93 of file enhanced_status_panel.h.

Referenced by EnhancedStatusPanel(), and GetComponent().

◆ rom_info_section_

ftxui::Component yaze::cli::EnhancedStatusPanel::rom_info_section_
private

Definition at line 94 of file enhanced_status_panel.h.

Referenced by CreateStatusContainer(), and EnhancedStatusPanel().

◆ system_info_section_

ftxui::Component yaze::cli::EnhancedStatusPanel::system_info_section_
private

Definition at line 95 of file enhanced_status_panel.h.

Referenced by CreateStatusContainer(), and EnhancedStatusPanel().

◆ layout_info_section_

ftxui::Component yaze::cli::EnhancedStatusPanel::layout_info_section_
private

Definition at line 96 of file enhanced_status_panel.h.

Referenced by CreateStatusContainer(), and EnhancedStatusPanel().

◆ error_section_

ftxui::Component yaze::cli::EnhancedStatusPanel::error_section_
private

Definition at line 97 of file enhanced_status_panel.h.

Referenced by CreateStatusContainer(), and EnhancedStatusPanel().

◆ status_event_handler_

std::function<bool(const ftxui::Event&)> yaze::cli::EnhancedStatusPanel::status_event_handler_
private

Definition at line 100 of file enhanced_status_panel.h.

Referenced by EnhancedStatusPanel().


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