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 (EditorManager *editor_manager)
 
 ~DashboardPanel ()=default
 
void Draw ()
 
void Show ()
 
void Hide ()
 
bool IsVisible () const
 
bool * visibility_flag ()
 
void MarkRecentlyUsed (EditorType type)
 
void LoadRecentEditors ()
 
void SaveRecentEditors ()
 
void ClearRecentEditors ()
 

Private Member Functions

void DrawWelcomeHeader ()
 
void DrawRecentEditors ()
 
void DrawEditorGrid ()
 
void DrawEditorPanel (const EditorInfo &info, int index)
 

Private Attributes

EditorManagereditor_manager_
 
gui::PanelWindow window_
 
bool show_ = true
 
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 305 of file dashboard_panel.cc.

References kMaxRecentEditors, recent_editors_, and SaveRecentEditors().

Referenced by DrawEditorPanel(), and DrawRecentEditors().

Here is the call graph for this function:

◆ LoadRecentEditors()

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

Definition at line 323 of file dashboard_panel.cc.

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

Referenced by DashboardPanel().

Here is the call graph for this function:

◆ SaveRecentEditors()

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

Definition at line 343 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 355 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 96 of file dashboard_panel.cc.

References ICON_MD_EDIT.

Referenced by Draw().

◆ DrawRecentEditors()

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

Definition at line 107 of file dashboard_panel.cc.

References editor_manager_, editors_, ICON_MD_HISTORY, MarkRecentlyUsed(), recent_editors_, show_, and yaze::editor::EditorManager::SwitchToEditor().

Referenced by Draw().

Here is the call graph for this function:

◆ DrawEditorGrid()

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

Definition at line 153 of file dashboard_panel.cc.

References DrawEditorPanel(), editors_, and ICON_MD_APPS.

Referenced by Draw().

Here is the call graph for this function:

◆ DrawEditorPanel()

Member Data Documentation

◆ editor_manager_

EditorManager* yaze::editor::DashboardPanel::editor_manager_
private

Definition at line 50 of file dashboard_panel.h.

Referenced by DrawEditorPanel(), and DrawRecentEditors().

◆ window_

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

Definition at line 51 of file dashboard_panel.h.

Referenced by DashboardPanel(), and Draw().

◆ show_

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

◆ editors_

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

Definition at line 54 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 56 of file dashboard_panel.h.

Referenced by LoadRecentEditors(), and MarkRecentlyUsed().


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