Panel for managing project settings, ROM versions, and snapshots. More...
#include <project_management_panel.h>
Public Types | |
| using | SwapRomCallback = std::function<void()> |
| using | ReloadRomCallback = std::function<void()> |
| using | SaveProjectCallback = std::function<absl::Status()> |
| using | BuildProjectCallback = std::function<void()> |
| using | CancelBuildCallback = std::function<void()> |
| using | RunProjectCallback = std::function<void()> |
| using | BrowseFolderCallback = std::function<void(const std::string& type)> |
Public Member Functions | |
| ProjectManagementPanel ()=default | |
| void | SetProject (project::YazeProject *project, bool dirty=false) |
| void | SetVersionManager (core::VersionManager *manager) |
| void | SetRom (Rom *rom) |
| void | SetToastManager (ToastManager *manager) |
| void | SetSwapRomCallback (SwapRomCallback cb) |
| void | SetReloadRomCallback (ReloadRomCallback cb) |
| void | SetSaveProjectCallback (SaveProjectCallback cb) |
| void | SetBuildProjectCallback (BuildProjectCallback cb) |
| void | SetCancelBuildCallback (CancelBuildCallback cb) |
| void | SetRunProjectCallback (RunProjectCallback cb) |
| void | SetBrowseFolderCallback (BrowseFolderCallback cb) |
| void | SetBuildStatus (const ProjectWorkflowStatus &status) |
| void | SetRunStatus (const ProjectWorkflowStatus &status) |
| void | SetBuildLogOutput (const std::string &output) |
| bool | IsProjectDirty () const |
| void | SetProjectDirty (bool dirty) |
| absl::Status | SaveProjectEdits () |
| void | Draw () |
Private Member Functions | |
| void | DrawProjectOverview () |
| void | DrawStorageLocations () |
| void | DrawRomManagement () |
| void | DrawVersionControl () |
| void | DrawSnapshotHistory () |
| void | DrawQuickActions () |
| void | ReloadProjectBuffers () |
Panel for managing project settings, ROM versions, and snapshots.
Displayed in the right sidebar when a project is loaded. Features:
Definition at line 32 of file project_management_panel.h.
| using yaze::editor::ProjectManagementPanel::SwapRomCallback = std::function<void()> |
Definition at line 45 of file project_management_panel.h.
| using yaze::editor::ProjectManagementPanel::ReloadRomCallback = std::function<void()> |
Definition at line 46 of file project_management_panel.h.
| using yaze::editor::ProjectManagementPanel::SaveProjectCallback = std::function<absl::Status()> |
Definition at line 47 of file project_management_panel.h.
| using yaze::editor::ProjectManagementPanel::BuildProjectCallback = std::function<void()> |
Definition at line 48 of file project_management_panel.h.
| using yaze::editor::ProjectManagementPanel::CancelBuildCallback = std::function<void()> |
Definition at line 49 of file project_management_panel.h.
| using yaze::editor::ProjectManagementPanel::RunProjectCallback = std::function<void()> |
Definition at line 50 of file project_management_panel.h.
| using yaze::editor::ProjectManagementPanel::BrowseFolderCallback = std::function<void(const std::string& type)> |
Definition at line 51 of file project_management_panel.h.
|
default |
| void yaze::editor::ProjectManagementPanel::SetProject | ( | project::YazeProject * | project, |
| bool | dirty = false ) |
Definition at line 77 of file project_management_panel.cc.
References history_cache_, history_dirty_, project_, project_dirty_, and ReloadProjectBuffers().

|
inline |
Definition at line 38 of file project_management_panel.h.
References version_manager_.
|
inline |
Definition at line 41 of file project_management_panel.h.
References rom_.
|
inline |
Definition at line 42 of file project_management_panel.h.
References toast_manager_.
|
inline |
Definition at line 53 of file project_management_panel.h.
References swap_rom_callback_.
|
inline |
Definition at line 54 of file project_management_panel.h.
References reload_rom_callback_.
|
inline |
Definition at line 55 of file project_management_panel.h.
References save_project_callback_.
|
inline |
Definition at line 58 of file project_management_panel.h.
References build_project_callback_.
|
inline |
Definition at line 61 of file project_management_panel.h.
References cancel_build_callback_.
|
inline |
Definition at line 64 of file project_management_panel.h.
References run_project_callback_.
|
inline |
Definition at line 67 of file project_management_panel.h.
References browse_folder_callback_.
|
inline |
Definition at line 70 of file project_management_panel.h.
References build_status_.
Referenced by yaze::editor::anonymous_namespace{editor_manager.cc}::UpdateBuildWorkflowStatus().
|
inline |
Definition at line 73 of file project_management_panel.h.
References run_status_.
Referenced by yaze::editor::anonymous_namespace{editor_manager.cc}::UpdateRunWorkflowStatus().
|
inline |
Definition at line 76 of file project_management_panel.h.
References build_log_output_.
|
inline |
Definition at line 80 of file project_management_panel.h.
References project_dirty_.
|
inline |
Definition at line 81 of file project_management_panel.h.
References project_dirty_.
| absl::Status yaze::editor::ProjectManagementPanel::SaveProjectEdits | ( | ) |
Definition at line 107 of file project_management_panel.cc.
References project_dirty_, and save_project_callback_.
Referenced by DrawQuickActions().
| void yaze::editor::ProjectManagementPanel::Draw | ( | ) |
Definition at line 118 of file project_management_panel.cc.
References DrawProjectOverview(), DrawQuickActions(), DrawRomManagement(), DrawStorageLocations(), DrawVersionControl(), and project_.
Referenced by yaze::editor::RightDrawerManager::DrawProjectPanel().
|
private |
Definition at line 139 of file project_management_panel.cc.
References yaze::project::ProjectMetadata::author, author_buffer_, yaze::gui::ColoredTextF(), yaze::gui::ConvertColorToImVec4(), yaze::project::ProjectMetadata::description, description_buffer_, yaze::project::YazeProject::filepath, yaze::project::YazeProject::format, yaze::gui::ThemeManager::Get(), yaze::gui::ThemeManager::GetCurrentTheme(), yaze::gui::GetPrimaryVec4(), yaze::gui::GetTextSecondaryVec4(), ICON_MD_FOLDER_SPECIAL, yaze::editor::kInfo, yaze::project::kYazeNative, yaze::project::YazeProject::metadata, yaze::project::YazeProject::name, name_buffer_, project_, project_dirty_, yaze::editor::ToastManager::Show(), toast_manager_, yaze::project::ProjectMetadata::yaze_version, and YAZE_VERSION_STRING.
Referenced by Draw().
|
private |
Definition at line 220 of file project_management_panel.cc.
References yaze::gui::ColoredTextF(), yaze::gui::ConvertColorToImVec4(), yaze::gui::ThemeManager::Get(), yaze::util::PlatformPaths::GetAppDataDirectory(), yaze::gui::ThemeManager::GetCurrentTheme(), yaze::gui::GetPrimaryVec4(), yaze::util::PlatformPaths::GetTempDirectory(), yaze::gui::GetTextSecondaryVec4(), ICON_MD_STORAGE, yaze::editor::kInfo, yaze::util::PlatformPaths::NormalizePathForDisplay(), yaze::editor::ToastManager::Show(), and toast_manager_.
Referenced by Draw().
|
private |
Definition at line 282 of file project_management_panel.cc.
References yaze::gui::ColoredTextF(), yaze::gui::ConvertColorToImVec4(), yaze::Rom::dirty(), yaze::gui::ThemeManager::Get(), yaze::gui::ThemeManager::GetCurrentTheme(), yaze::gui::GetPrimaryVec4(), yaze::gui::GetTextSecondaryVec4(), ICON_MD_MEMORY, ICON_MD_REFRESH, ICON_MD_SWAP_HORIZ, ICON_MD_WARNING, yaze::Rom::is_loaded(), project_, reload_rom_callback_, rom_, yaze::project::YazeProject::rom_filename, yaze::Rom::size(), swap_rom_callback_, and yaze::Rom::title().
Referenced by Draw().
|
private |
Definition at line 351 of file project_management_panel.cc.
References yaze::gui::ColoredTextF(), yaze::core::VersionManager::CreateSnapshot(), DrawSnapshotHistory(), yaze::core::VersionManager::GetCurrentHash(), yaze::gui::GetPrimaryVec4(), yaze::gui::GetTextSecondaryVec4(), history_dirty_, ICON_MD_ADD, ICON_MD_CAMERA_ALT, ICON_MD_HISTORY, yaze::core::VersionManager::InitializeGit(), yaze::core::VersionManager::IsGitInitialized(), yaze::editor::kError, yaze::editor::kSuccess, yaze::editor::ToastManager::Show(), snapshot_message_, toast_manager_, and version_manager_.
Referenced by Draw().
|
private |
Definition at line 434 of file project_management_panel.cc.
References yaze::gui::ColoredText(), yaze::core::VersionManager::GetHistory(), yaze::gui::GetTextSecondaryVec4(), history_cache_, history_dirty_, ICON_MD_LIST, yaze::core::VersionManager::IsGitInitialized(), and version_manager_.
Referenced by DrawVersionControl().

|
private |
Definition at line 467 of file project_management_panel.cc.
References assets_buffer_, yaze::project::YazeProject::assets_folder, browse_folder_callback_, build_buffer_, build_log_output_, build_project_callback_, yaze::project::YazeProject::build_script, build_status_, yaze::project::YazeProject::build_target, cancel_build_callback_, code_buffer_, yaze::project::YazeProject::code_folder, yaze::gui::ColoredTextF(), yaze::gui::ConvertColorToImVec4(), yaze::gui::ThemeManager::Get(), yaze::gui::ThemeManager::GetCurrentTheme(), yaze::gui::GetPrimaryVec4(), yaze::gui::GetTextSecondaryVec4(), ICON_MD_BOLT, ICON_MD_BUILD, ICON_MD_CANCEL, ICON_MD_EDIT, ICON_MD_FOLDER_OPEN, ICON_MD_PLAY_ARROW, ICON_MD_ROUTE, ICON_MD_SAVE, yaze::editor::kRunning, project_, project_dirty_, run_project_callback_, run_status_, SaveProjectEdits(), script_buffer_, yaze::editor::ProjectWorkflowStatus::state, and yaze::editor::ProjectWorkflowStatus::visible.
Referenced by Draw().
|
private |
Definition at line 86 of file project_management_panel.cc.
References assets_buffer_, yaze::project::YazeProject::assets_folder, yaze::project::ProjectMetadata::author, author_buffer_, build_buffer_, yaze::project::YazeProject::build_script, yaze::project::YazeProject::build_target, code_buffer_, yaze::project::YazeProject::code_folder, yaze::project::ProjectMetadata::description, description_buffer_, yaze::project::YazeProject::metadata, yaze::project::YazeProject::name, name_buffer_, project_, and script_buffer_.
Referenced by SetProject().
|
private |
Definition at line 96 of file project_management_panel.h.
Referenced by Draw(), DrawProjectOverview(), DrawQuickActions(), DrawRomManagement(), ReloadProjectBuffers(), and SetProject().
|
private |
Definition at line 97 of file project_management_panel.h.
Referenced by DrawSnapshotHistory(), DrawVersionControl(), and SetVersionManager().
|
private |
Definition at line 98 of file project_management_panel.h.
Referenced by DrawRomManagement(), and SetRom().
|
private |
Definition at line 99 of file project_management_panel.h.
Referenced by DrawProjectOverview(), DrawStorageLocations(), DrawVersionControl(), and SetToastManager().
|
private |
Definition at line 102 of file project_management_panel.h.
Referenced by DrawRomManagement(), and SetSwapRomCallback().
|
private |
Definition at line 103 of file project_management_panel.h.
Referenced by DrawRomManagement(), and SetReloadRomCallback().
|
private |
Definition at line 104 of file project_management_panel.h.
Referenced by SaveProjectEdits(), and SetSaveProjectCallback().
|
private |
Definition at line 105 of file project_management_panel.h.
Referenced by DrawQuickActions(), and SetBuildProjectCallback().
|
private |
Definition at line 106 of file project_management_panel.h.
Referenced by DrawQuickActions(), and SetCancelBuildCallback().
|
private |
Definition at line 107 of file project_management_panel.h.
Referenced by DrawQuickActions(), and SetRunProjectCallback().
|
private |
Definition at line 108 of file project_management_panel.h.
Referenced by DrawQuickActions(), and SetBrowseFolderCallback().
|
private |
Definition at line 111 of file project_management_panel.h.
Referenced by DrawVersionControl().
|
private |
Definition at line 112 of file project_management_panel.h.
|
private |
Definition at line 115 of file project_management_panel.h.
Referenced by DrawSnapshotHistory(), and SetProject().
|
private |
Definition at line 116 of file project_management_panel.h.
Referenced by DrawSnapshotHistory(), DrawVersionControl(), and SetProject().
|
private |
Definition at line 119 of file project_management_panel.h.
Referenced by DrawProjectOverview(), DrawQuickActions(), IsProjectDirty(), SaveProjectEdits(), SetProject(), and SetProjectDirty().
|
private |
Definition at line 120 of file project_management_panel.h.
Referenced by DrawProjectOverview(), and ReloadProjectBuffers().
|
private |
Definition at line 121 of file project_management_panel.h.
Referenced by DrawProjectOverview(), and ReloadProjectBuffers().
|
private |
Definition at line 122 of file project_management_panel.h.
Referenced by DrawProjectOverview(), and ReloadProjectBuffers().
|
private |
Definition at line 123 of file project_management_panel.h.
Referenced by DrawQuickActions(), and ReloadProjectBuffers().
|
private |
Definition at line 124 of file project_management_panel.h.
Referenced by DrawQuickActions(), and ReloadProjectBuffers().
|
private |
Definition at line 125 of file project_management_panel.h.
Referenced by DrawQuickActions(), and ReloadProjectBuffers().
|
private |
Definition at line 126 of file project_management_panel.h.
Referenced by DrawQuickActions(), and ReloadProjectBuffers().
|
private |
Definition at line 128 of file project_management_panel.h.
Referenced by DrawQuickActions(), and SetBuildStatus().
|
private |
Definition at line 129 of file project_management_panel.h.
Referenced by DrawQuickActions(), and SetRunStatus().
|
private |
Definition at line 130 of file project_management_panel.h.
Referenced by DrawQuickActions(), and SetBuildLogOutput().