[nostalgia] Split PaletteEditor into Imgui and general files, other cleanup

This commit is contained in:
2022-04-08 01:05:32 -05:00
parent 632ade60b9
commit 56964e197a
16 changed files with 390 additions and 379 deletions
+16 -11
View File
@@ -11,12 +11,17 @@
#include "nostalgiastudio_export.h"
namespace nostalgia {
class StudioUI;
}
namespace nostalgia::studio {
class NOSTALGIASTUDIO_EXPORT Editor: public Widget {
friend StudioUI;
private:
UndoStack m_cmdStack;
bool m_unsavedChanges = false;
bool m_exportable = false;
bool m_cutEnabled = false;
@@ -43,20 +48,12 @@ class NOSTALGIASTUDIO_EXPORT Editor: public Widget {
virtual void exportFile();
/**
* Returns the undo stack holding changes to the item being edited.
*/
[[nodiscard]]
virtual UndoStack *undoStack() noexcept {
return nullptr;
}
void close();
/**
* Save changes to item being edited.
*/
void save();
void save() noexcept;
/**
* Sets indication of item being edited has unsaved changes. Also emits
@@ -91,7 +88,15 @@ class NOSTALGIASTUDIO_EXPORT Editor: public Widget {
/**
* Save changes to item being edited.
*/
virtual void saveItem();
virtual ox::Error saveItem() noexcept;
/**
* Returns the undo stack holding changes to the item being edited.
*/
[[nodiscard]]
virtual UndoStack *undoStack() noexcept {
return nullptr;
}
// signals
public: