40 m_Frame(frame ? std::optional<
Frame>(*frame) : std::nullopt) {}
78 m_Frame(frame ? std::optional<
Frame>(*frame) : std::nullopt) {}
108 void Undo()
override;
109 void Redo()
override;
128 void Undo()
override;
129 void Redo()
override;
152 void Undo()
override;
153 void Redo()
override;
158 [[nodiscard]] int32_t
Deg()
const {
return m_Deg; }
Defines the base interface for undoable and redoable editor actions.
Defines the ProjectFile class, which manages animation project data.
std::weak_ptr< T > WeakPtr
Alias for a non-owning observer of a SharedPtr.
Definition Ptr.h:34
std::shared_ptr< T > SharedPtr
Alias for a reference-counted shared smart pointer.
Definition Ptr.h:31
Base interface for undoable and redoable editor actions.
Definition Common.h:24
std::optional< Frame > m_Frame
Stored frame data for undo.
Definition Frame.h:55
void Redo() override
Re-applies frame deletion.
Definition Frame.cc:21
WeakPtr< ProjectFile > m_Proj
Owning project.
Definition Frame.h:56
DeleteFrameAction(uint64_t frameI, Frame *frame, const SharedPtr< ProjectFile > &proj)
Creates a delete-frame action storing frame data.
Definition Frame.h:37
DeleteFrameAction(uint64_t frameI, const SharedPtr< ProjectFile > &proj)
Creates an empty delete-frame action.
Definition Frame.h:27
uint64_t m_FrameIndex
Frame index affected.
Definition Frame.h:53
bool m_Empty
Whether frame data exists.
Definition Frame.h:54
void Undo() override
Restores deleted frame.
Definition Frame.cc:6
Wraps an ImageArray with higher-level frame editing operations.
Definition Frame.h:248
std::optional< Frame > m_Frame
Stored frame data.
Definition Frame.h:93
uint64_t m_FrameIndex
Frame index affected.
Definition Frame.h:91
void Redo() override
Re-inserts frame.
Definition Frame.cc:30
InsertFrameAction(uint64_t frameI, const SharedPtr< ProjectFile > &proj)
Creates an empty insert-frame action.
Definition Frame.h:68
bool m_Empty
Whether frame data exists.
Definition Frame.h:92
WeakPtr< ProjectFile > m_Proj
Owning project.
Definition Frame.h:94
void Undo() override
Removes inserted frame.
Definition Frame.cc:26
InsertFrameAction(uint64_t frameI, Frame *frame, const SharedPtr< ProjectFile > &proj)
Creates an insert-frame action with frame data.
Definition Frame.h:75
void Undo() override
Reverts the effects of this action.
Definition Frame.cc:45
uint64_t m_FrameIndex
Frame index.
Definition Frame.h:112
WeakPtr< ProjectFile > m_Proj
Owning project.
Definition Frame.h:113
MoveFrameLeftAction(uint64_t frameI, const SharedPtr< ProjectFile > &proj)
Creates an action that shifts a frame one slot to the left.
Definition Frame.h:105
void Redo() override
Reapplies the effects of this action.
Definition Frame.cc:50
uint64_t m_FrameIndex
Frame index.
Definition Frame.h:132
MoveFrameRightAction(uint64_t frameI, const SharedPtr< ProjectFile > &proj)
Creates an action that shifts a frame one slot to the right.
Definition Frame.h:124
void Redo() override
Reapplies the effects of this action.
Definition Frame.cc:60
WeakPtr< ProjectFile > m_Proj
Owning project.
Definition Frame.h:133
void Undo() override
Reverts the effects of this action.
Definition Frame.cc:55
int32_t Deg() const
Returns rotation angle in degrees.
Definition Frame.h:158
int32_t m_Deg
Rotation angle.
Definition Frame.h:162
RotateFrameAction(uint64_t frameIndex, int32_t deg, const SharedPtr< ProjectFile > &proj)
Creates a frame rotation action.
Definition Frame.h:148
void Undo() override
Reverts the effects of this action.
Definition Frame.cc:66
void Redo() override
Reapplies the effects of this action.
Definition Frame.cc:72
WeakPtr< ProjectFile > m_Proj
Owning project.
Definition Frame.h:163
uint64_t m_FrameIndex
Frame index.
Definition Frame.h:161
The FuncDoodle C++ namespace.
Definition Common.h:12