41 m_Frame(frame ? std::optional<
Frame>(*frame) : std::nullopt) {}
80 m_Frame(frame ? std::optional<
Frame>(*frame) : std::nullopt) {}
111 void Undo()
override;
112 void Redo()
override;
131 void Undo()
override;
132 void Redo()
override;
155 void Undo()
override;
156 void Redo()
override;
161 [[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:56
DeleteFrameAction(unsigned long frameI, const SharedPtr< ProjectFile > &proj)
Creates an empty delete-frame action.
Definition Frame.h:27
void Redo() override
Re-applies frame deletion.
Definition Frame.cc:21
WeakPtr< ProjectFile > m_Proj
Owning project.
Definition Frame.h:57
bool m_Empty
Whether frame data exists.
Definition Frame.h:55
DeleteFrameAction(unsigned long frameI, Frame *frame, const SharedPtr< ProjectFile > &proj)
Creates a delete-frame action storing frame data.
Definition Frame.h:38
void Undo() override
Restores deleted frame.
Definition Frame.cc:6
unsigned long m_FrameIndex
Frame index affected.
Definition Frame.h:54
Wraps an ImageArray with higher-level frame editing operations.
Definition Frame.h:248
std::optional< Frame > m_Frame
Stored frame data.
Definition Frame.h:95
void Redo() override
Re-inserts frame.
Definition Frame.cc:30
InsertFrameAction(unsigned long frameI, const SharedPtr< ProjectFile > &proj)
Creates an empty insert-frame action.
Definition Frame.h:69
InsertFrameAction(unsigned long frameI, Frame *frame, const SharedPtr< ProjectFile > &proj)
Creates an insert-frame action with frame data.
Definition Frame.h:77
bool m_Empty
Whether frame data exists.
Definition Frame.h:94
WeakPtr< ProjectFile > m_Proj
Owning project.
Definition Frame.h:96
unsigned long m_FrameIndex
Frame index affected.
Definition Frame.h:93
void Undo() override
Removes inserted frame.
Definition Frame.cc:26
void Undo() override
Reverts the effects of this action.
Definition Frame.cc:45
WeakPtr< ProjectFile > m_Proj
Owning project.
Definition Frame.h:116
MoveFrameLeftAction(unsigned long frameI, const SharedPtr< ProjectFile > &proj)
Creates an action that shifts a frame one slot to the left.
Definition Frame.h:107
unsigned long m_FrameIndex
Frame index.
Definition Frame.h:115
void Redo() override
Reapplies the effects of this action.
Definition Frame.cc:50
void Redo() override
Reapplies the effects of this action.
Definition Frame.cc:60
unsigned long m_FrameIndex
Frame index.
Definition Frame.h:135
WeakPtr< ProjectFile > m_Proj
Owning project.
Definition Frame.h:136
MoveFrameRightAction(unsigned long frameI, const SharedPtr< ProjectFile > &proj)
Creates an action that shifts a frame one slot to the right.
Definition Frame.h:127
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:161
unsigned long m_FrameIndex
Frame index.
Definition Frame.h:164
int32_t m_Deg
Rotation angle.
Definition Frame.h:165
void Undo() override
Reverts the effects of this action.
Definition Frame.cc:66
RotateFrameAction(unsigned long frameIndex, int32_t deg, const SharedPtr< ProjectFile > &proj)
Creates a frame rotation action.
Definition Frame.h:151
void Redo() override
Reapplies the effects of this action.
Definition Frame.cc:72
WeakPtr< ProjectFile > m_Proj
Owning project.
Definition Frame.h:166
The FuncDoodle C++ namespace.
Definition Common.h:12