diff --git a/src/olympic/studio/modlib/include/studio/studio.hpp b/src/olympic/studio/modlib/include/studio/studio.hpp index 13d2ab05..9e47156a 100644 --- a/src/olympic/studio/modlib/include/studio/studio.hpp +++ b/src/olympic/studio/modlib/include/studio/studio.hpp @@ -13,5 +13,6 @@ #include #include #include +#include #include #include diff --git a/src/olympic/studio/modlib/include/studio/undocommand.hpp b/src/olympic/studio/modlib/include/studio/undocommand.hpp new file mode 100644 index 00000000..9f7bb845 --- /dev/null +++ b/src/olympic/studio/modlib/include/studio/undocommand.hpp @@ -0,0 +1,19 @@ +/* + * Copyright 2016 - 2024 Gary Talent (gary@drinkingtea.net). All rights reserved. + */ + +#pragma once + +namespace studio { + +class UndoCommand { + public: + virtual ~UndoCommand() noexcept = default; + virtual void redo() noexcept = 0; + virtual void undo() noexcept = 0; + [[nodiscard]] + virtual int commandId() const noexcept = 0; + virtual bool mergeWith(UndoCommand const*cmd) noexcept; +}; + +} diff --git a/src/olympic/studio/modlib/include/studio/undostack.hpp b/src/olympic/studio/modlib/include/studio/undostack.hpp index 094f7136..3ef654b4 100644 --- a/src/olympic/studio/modlib/include/studio/undostack.hpp +++ b/src/olympic/studio/modlib/include/studio/undostack.hpp @@ -9,17 +9,9 @@ #include #include -namespace studio { +#include "undocommand.hpp" -class UndoCommand { - public: - virtual ~UndoCommand() noexcept = default; - virtual void redo() noexcept = 0; - virtual void undo() noexcept = 0; - [[nodiscard]] - virtual int commandId() const noexcept = 0; - virtual bool mergeWith(UndoCommand const*cmd) noexcept; -}; +namespace studio { class UndoStack { private: