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

#include <dashboard_panel.h>

Collaboration diagram for yaze::editor::DashboardPanel:

Classes

struct  EditorInfo
 

Public Member Functions

 DashboardPanel (IEditorSwitcher *editor_switcher)
 
 ~DashboardPanel ()=default
 
void Draw ()
 
void Show ()
 
void Hide ()
 
bool IsVisible () const
 
bool * visibility_flag ()
 
void MarkRecentlyUsed (EditorType type)
 
void LoadRecentEditors ()
 
void SaveRecentEditors ()
 
void ClearRecentEditors ()
 

Static Public Member Functions

static std::vector< EditorTypeParseRecentEditors (const std::string &data, size_t max_entries)
 

Private Member Functions

void DrawWelcomeHeader ()
 
void DrawRecentEditors ()
 
void DrawEditorGrid ()
 
void DrawEditorPanel (const EditorInfo &info, int index, const ImVec2 &card_size, bool enabled)
 

Private Attributes

IEditorSwitchereditor_switcher_
 
gui::PanelWindow window_
 
bool show_ = true
 
bool has_rom_ = false
 
std::vector< EditorInfoeditors_
 
std::vector< EditorTyperecent_editors_
 

Static Private Attributes

static constexpr size_t kMaxRecentEditors = 5
 

Detailed Description

Definition at line 17 of file dashboard_panel.h.

Constructor & Destructor Documentation

◆ DashboardPanel()

◆ ~DashboardPanel()

yaze::editor::DashboardPanel::~DashboardPanel ( )
default

Member Function Documentation

◆ Draw()

◆ Show()

void yaze::editor::DashboardPanel::Show ( )
inline

Definition at line 24 of file dashboard_panel.h.

References show_.

◆ Hide()

void yaze::editor::DashboardPanel::Hide ( )
inline

Definition at line 25 of file dashboard_panel.h.

References show_.

◆ IsVisible()

bool yaze::editor::DashboardPanel::IsVisible ( ) const
inline

Definition at line 26 of file dashboard_panel.h.

References show_.

◆ visibility_flag()

bool * yaze::editor::DashboardPanel::visibility_flag ( )
inline

Definition at line 27 of file dashboard_panel.h.

References show_.

◆ MarkRecentlyUsed()

void yaze::editor::DashboardPanel::MarkRecentlyUsed ( EditorType type)

Definition at line 635 of file dashboard_panel.cc.

References kMaxRecentEditors, recent_editors_, and SaveRecentEditors().

Referenced by DrawEditorPanel(), and DrawRecentEditors().

Here is the call graph for this function:

◆ ParseRecentEditors()

std::vector< EditorType > yaze::editor::DashboardPanel::ParseRecentEditors ( const std::string & data,
size_t max_entries )
static

Definition at line 653 of file dashboard_panel.cc.

References yaze::editor::kSettings, and yaze::editor::kUnknown.

Referenced by LoadRecentEditors().

◆ LoadRecentEditors()

void yaze::editor::DashboardPanel::LoadRecentEditors ( )

Definition at line 686 of file dashboard_panel.cc.

References kMaxRecentEditors, yaze::util::LoadFileFromConfigDir(), ParseRecentEditors(), and recent_editors_.

Referenced by DashboardPanel().

Here is the call graph for this function:

◆ SaveRecentEditors()

void yaze::editor::DashboardPanel::SaveRecentEditors ( )

Definition at line 693 of file dashboard_panel.cc.

References recent_editors_, and yaze::util::SaveFile().

Referenced by ClearRecentEditors(), and MarkRecentlyUsed().

Here is the call graph for this function:

◆ ClearRecentEditors()

void yaze::editor::DashboardPanel::ClearRecentEditors ( )

Definition at line 705 of file dashboard_panel.cc.

References recent_editors_, and SaveRecentEditors().

Here is the call graph for this function:

◆ DrawWelcomeHeader()

void yaze::editor::DashboardPanel::DrawWelcomeHeader ( )
private

Definition at line 271 of file dashboard_panel.cc.

References yaze::gui::ConvertColorToImVec4(), yaze::gui::ThemeManager::Get(), yaze::gui::ThemeManager::GetCurrentTheme(), and ICON_MD_EDIT.

Referenced by Draw().

Here is the call graph for this function:

◆ DrawRecentEditors()

◆ DrawEditorGrid()

void yaze::editor::DashboardPanel::DrawEditorGrid ( )
private

Definition at line 382 of file dashboard_panel.cc.

References DrawEditorPanel(), editors_, has_rom_, and ICON_MD_APPS.

Referenced by Draw().

Here is the call graph for this function:

◆ DrawEditorPanel()

Member Data Documentation

◆ editor_switcher_

IEditorSwitcher* yaze::editor::DashboardPanel::editor_switcher_
private

Definition at line 56 of file dashboard_panel.h.

Referenced by Draw(), DrawEditorPanel(), and DrawRecentEditors().

◆ window_

gui::PanelWindow yaze::editor::DashboardPanel::window_
private

Definition at line 57 of file dashboard_panel.h.

Referenced by DashboardPanel(), and Draw().

◆ show_

bool yaze::editor::DashboardPanel::show_ = true
private

◆ has_rom_

bool yaze::editor::DashboardPanel::has_rom_ = false
private

Definition at line 59 of file dashboard_panel.h.

Referenced by Draw(), DrawEditorGrid(), and DrawRecentEditors().

◆ editors_

std::vector<EditorInfo> yaze::editor::DashboardPanel::editors_
private

Definition at line 61 of file dashboard_panel.h.

Referenced by DashboardPanel(), DrawEditorGrid(), and DrawRecentEditors().

◆ recent_editors_

std::vector<EditorType> yaze::editor::DashboardPanel::recent_editors_
private

◆ kMaxRecentEditors

constexpr size_t yaze::editor::DashboardPanel::kMaxRecentEditors = 5
staticconstexprprivate

Definition at line 63 of file dashboard_panel.h.

Referenced by LoadRecentEditors(), and MarkRecentlyUsed().


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