1#ifndef YAZE_APP_EDITOR_CODE_PROJECT_FILE_EDITOR_H_
2#define YAZE_APP_EDITOR_CODE_PROJECT_FILE_EDITOR_H_
8#include "absl/status/status.h"
40 const std::string&
filepath,
const std::string& contents)>;
42 const std::string&
filepath,
const std::string& contents)>;
Editor for .yaze project files with syntax highlighting and validation.
SaveGuardCallback save_guard_callback_
void ApplySyntaxHighlighting()
ToastManager * toast_manager_
bool * active()
Get pointer to active state for ImGui.
absl::Status SaveFileAs(const std::string &filepath)
Save to a new file path.
absl::Status LoadFile(const std::string &filepath)
Load a project file into the editor.
void SetProject(project::YazeProject *project)
Set the project pointer for label import operations.
ProjectFileEditorState CaptureState() const
bool IsModified() const
Get whether the file has unsaved changes.
std::string GetDocumentText() const
void RestoreState(const ProjectFileEditorState &state, project::YazeProject *project)
absl::Status CanReplaceDocument() const
void set_active(bool active)
Set whether the editor window is active.
std::vector< std::string > validation_errors_
absl::Status SaveFile()
Save the current editor contents to disk.
absl::Status ImportLabelsFromZScream()
Import labels from a ZScream DefaultNames.txt file.
SaveCompleteCallback save_complete_callback_
project::YazeProject * project_
absl::Status NewFile()
Create a new empty project file.
void ResetForProject(project::YazeProject *project)
void ShowValidationErrors()
std::function< absl::Status( const std::string &filepath, const std::string &contents)> SaveCompleteCallback
void SetSaveCompleteCallback(SaveCompleteCallback callback)
void SetToastManager(ToastManager *toast_manager)
Set toast manager for notifications.
bool IsInitialized() const
const std::string & filepath() const
Get the current filepath.
void SetSaveGuardCallback(SaveGuardCallback callback)
std::function< absl::Status( const std::string &filepath, const std::string &contents)> SaveGuardCallback
std::vector< std::string > validation_errors
Modern project structure with comprehensive settings consolidation.