#include <enhanced_status_panel.h>
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 | |
Rom * | rom_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_ |
Definition at line 16 of file enhanced_status_panel.h.
|
explicit |
Definition at line 16 of file enhanced_status_panel.cc.
References CollectLayoutInfo(), CollectRomInfo(), CollectSystemInfo(), CreateErrorSection(), CreateLayoutInfoSection(), CreateRomInfoSection(), CreateStatusContainer(), CreateSystemInfoSection(), error_section_, HandleStatusEvents(), layout_info_section_, rom_info_section_, status_container_, status_event_handler_, and system_info_section_.
Component yaze::cli::EnhancedStatusPanel::GetComponent | ( | ) |
Definition at line 36 of file enhanced_status_panel.cc.
References status_container_.
void yaze::cli::EnhancedStatusPanel::SetRomContext | ( | Rom * | rom_context | ) |
Definition at line 40 of file enhanced_status_panel.cc.
References rom_context_, and UpdateRomInfo().
void yaze::cli::EnhancedStatusPanel::UpdateRomInfo | ( | ) |
Definition at line 45 of file enhanced_status_panel.cc.
References CollectRomInfo().
Referenced by SetRomContext().
void yaze::cli::EnhancedStatusPanel::UpdateSystemInfo | ( | ) |
Definition at line 49 of file enhanced_status_panel.cc.
References CollectSystemInfo().
void yaze::cli::EnhancedStatusPanel::UpdateLayoutInfo | ( | ) |
Definition at line 53 of file enhanced_status_panel.cc.
References CollectLayoutInfo().
void yaze::cli::EnhancedStatusPanel::SetError | ( | const std::string & | error | ) |
Definition at line 57 of file enhanced_status_panel.cc.
References current_error_.
void yaze::cli::EnhancedStatusPanel::ClearError | ( | ) |
Definition at line 61 of file enhanced_status_panel.cc.
References current_error_.
|
inline |
Definition at line 32 of file enhanced_status_panel.h.
References show_detailed_info_.
Referenced by HandleStatusEvents().
|
inline |
Definition at line 33 of file enhanced_status_panel.h.
References show_detailed_info_.
|
inline |
Definition at line 36 of file enhanced_status_panel.h.
References expanded_.
|
inline |
Definition at line 37 of file enhanced_status_panel.h.
References expanded_.
Referenced by HandleStatusEvents().
|
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().
|
private |
Definition at line 90 of file enhanced_status_panel.cc.
References RenderRomInfo().
Referenced by EnhancedStatusPanel().
|
private |
Definition at line 96 of file enhanced_status_panel.cc.
References RenderSystemInfo().
Referenced by EnhancedStatusPanel().
|
private |
Definition at line 102 of file enhanced_status_panel.cc.
References RenderLayoutInfo().
Referenced by EnhancedStatusPanel().
|
private |
Definition at line 108 of file enhanced_status_panel.cc.
References RenderErrorInfo().
Referenced by EnhancedStatusPanel().
|
private |
Definition at line 114 of file enhanced_status_panel.cc.
References expanded_, SetExpanded(), SetShowDetailedInfo(), and show_detailed_info_.
Referenced by EnhancedStatusPanel().
|
private |
Definition at line 128 of file enhanced_status_panel.cc.
References yaze::cli::EnhancedStatusPanel::RomInfo::checksum, yaze::cli::EnhancedStatusPanel::RomInfo::loaded, yaze::cli::EnhancedStatusPanel::RomInfo::region, rom_info_, yaze::cli::EnhancedStatusPanel::RomInfo::size, and yaze::cli::EnhancedStatusPanel::RomInfo::title.
Referenced by CreateRomInfoSection().
|
private |
Definition at line 146 of file enhanced_status_panel.cc.
References yaze::cli::EnhancedStatusPanel::SystemInfo::cpu_usage, yaze::cli::EnhancedStatusPanel::SystemInfo::current_time, yaze::cli::EnhancedStatusPanel::SystemInfo::disk_space, yaze::cli::EnhancedStatusPanel::SystemInfo::memory_usage, and system_info_.
Referenced by CreateSystemInfoSection().
|
private |
Definition at line 156 of file enhanced_status_panel.cc.
References yaze::cli::EnhancedStatusPanel::LayoutInfo::active_panel, yaze::cli::EnhancedStatusPanel::LayoutInfo::focus_state, layout_info_, yaze::cli::EnhancedStatusPanel::LayoutInfo::layout_mode, and yaze::cli::EnhancedStatusPanel::LayoutInfo::panel_count.
Referenced by CreateLayoutInfoSection().
|
private |
Definition at line 166 of file enhanced_status_panel.cc.
References current_error_.
Referenced by CreateErrorSection().
|
private |
Definition at line 179 of file enhanced_status_panel.cc.
References expanded_, and show_detailed_info_.
Referenced by CreateStatusContainer().
|
private |
Definition at line 189 of file enhanced_status_panel.cc.
References yaze::cli::EnhancedStatusPanel::RomInfo::checksum, yaze::cli::EnhancedStatusPanel::RomInfo::loaded, yaze::cli::EnhancedStatusPanel::RomInfo::region, rom_context_, rom_info_, yaze::Rom::size(), yaze::cli::EnhancedStatusPanel::RomInfo::size, yaze::Rom::title(), yaze::cli::EnhancedStatusPanel::RomInfo::title, and yaze::Rom::vector().
Referenced by EnhancedStatusPanel(), and UpdateRomInfo().
|
private |
Definition at line 225 of file enhanced_status_panel.cc.
References yaze::cli::EnhancedStatusPanel::SystemInfo::cpu_usage, yaze::cli::EnhancedStatusPanel::SystemInfo::current_time, yaze::cli::EnhancedStatusPanel::SystemInfo::disk_space, yaze::cli::EnhancedStatusPanel::SystemInfo::memory_usage, and system_info_.
Referenced by EnhancedStatusPanel(), and UpdateSystemInfo().
|
private |
Definition at line 241 of file enhanced_status_panel.cc.
References yaze::cli::EnhancedStatusPanel::LayoutInfo::active_panel, yaze::cli::EnhancedStatusPanel::LayoutInfo::focus_state, layout_info_, yaze::cli::EnhancedStatusPanel::LayoutInfo::layout_mode, and yaze::cli::EnhancedStatusPanel::LayoutInfo::panel_count.
Referenced by EnhancedStatusPanel(), and UpdateLayoutInfo().
|
private |
Definition at line 63 of file enhanced_status_panel.h.
Referenced by CollectRomInfo(), and SetRomContext().
|
private |
Definition at line 64 of file enhanced_status_panel.h.
Referenced by HandleStatusEvents(), IsExpanded(), RenderStatusBar(), and SetExpanded().
|
private |
Definition at line 65 of file enhanced_status_panel.h.
Referenced by GetShowDetailedInfo(), HandleStatusEvents(), RenderStatusBar(), and SetShowDetailedInfo().
|
private |
Referenced by CollectRomInfo(), and RenderRomInfo().
|
private |
Referenced by CollectSystemInfo(), and RenderSystemInfo().
|
private |
Referenced by CollectLayoutInfo(), and RenderLayoutInfo().
|
private |
Definition at line 90 of file enhanced_status_panel.h.
Referenced by ClearError(), RenderErrorInfo(), and SetError().
|
private |
Definition at line 93 of file enhanced_status_panel.h.
Referenced by EnhancedStatusPanel(), and GetComponent().
|
private |
Definition at line 94 of file enhanced_status_panel.h.
Referenced by CreateStatusContainer(), and EnhancedStatusPanel().
|
private |
Definition at line 95 of file enhanced_status_panel.h.
Referenced by CreateStatusContainer(), and EnhancedStatusPanel().
|
private |
Definition at line 96 of file enhanced_status_panel.h.
Referenced by CreateStatusContainer(), and EnhancedStatusPanel().
|
private |
Definition at line 97 of file enhanced_status_panel.h.
Referenced by CreateStatusContainer(), and EnhancedStatusPanel().
|
private |
Definition at line 100 of file enhanced_status_panel.h.
Referenced by EnhancedStatusPanel().