53 [[nodiscard]] int32_t
Deg()
const {
return m_Deg; }
124 void Undo()
override;
129 void Redo()
override;
150 return m_Ctx.FrameIndex;
Defines the base interface for undoable and redoable editor actions.
Defines the ProjectFile class, which manages animation project data.
Convenience type aliases for standard smart pointers.
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
Defines selection primitives for editing regions of pixels.
Base interface for undoable and redoable editor actions.
Definition Common.h:24
void Undo() override
Restores deleted pixels.
Definition Selection.cc:22
void Redo() override
Re-applies deletion.
Definition Selection.cc:37
std::vector< Col > m_PrevPixels
Stored pixels for undo.
Definition Selection.h:103
unsigned long m_FrameIndex
Frame index of action.
Definition Selection.h:101
WeakPtr< ProjectFile > m_Proj
Owning project.
Definition Selection.h:104
DeleteSelectionAction(unsigned long frameIndex, WeakPtr< Selection > sel, std::vector< Col > prevPixels, const SharedPtr< ProjectFile > &proj)
Constructs a delete-selection action.
Definition Selection.h:80
WeakPtr< Selection > Sel() const
Returns affected selection.
Definition Selection.h:98
WeakPtr< Selection > m_Sel
Target selection.
Definition Selection.h:102
Wraps an ImageArray with higher-level frame editing operations.
Definition Frame.h:248
void Redo() override
Reapplies movement.
Definition Selection.cc:55
Direction Dir() const
Returns movement direction.
Definition Selection.h:139
MoveSelectionActionContext Ctx() const
Returns full context snapshot.
Definition Selection.h:156
Frame m_FrameBeforeMove
Frame state before move.
Definition Selection.h:160
MoveSelectionActionContext m_Ctx
Movement context.
Definition Selection.h:159
unsigned long FrameIndex() const
Returns frame index.
Definition Selection.h:149
void Undo() override
Undoes movement.
Definition Selection.cc:45
WeakPtr< Selection > Sel() const
Returns selection being moved.
Definition Selection.h:134
MoveSelectionAction(Frame frame, MoveSelectionActionContext ctx)
Constructs a move-selection action.
Definition Selection.h:118
SharedPtr< ProjectFile > Proj() const
Returns owning project.
Definition Selection.h:144
WeakPtr< ProjectFile > m_Proj
Owning project.
Definition Selection.h:64
unsigned long m_FrameIndex
Frame index where action occurred.
Definition Selection.h:61
int32_t m_Deg
Rotation in degrees.
Definition Selection.h:63
void Redo() override
Reapplies the rotation.
Definition Selection.cc:14
WeakPtr< Selection > m_Sel
Target selection.
Definition Selection.h:62
int32_t Deg() const
Returns rotation amount in degrees.
Definition Selection.h:53
WeakPtr< Selection > Sel() const
Returns the affected selection.
Definition Selection.h:58
void Undo() override
Undoes the rotation.
Definition Selection.cc:6
RotateSelectionAction(unsigned long frameIndex, WeakPtr< Selection > sel, int32_t deg, const SharedPtr< ProjectFile > &proj)
Constructs a rotation action.
Definition Selection.h:35
The FuncDoodle C++ namespace.
Definition Common.h:12
Direction
Direction used for moving a selection.
Definition Direction.h:23
Context data required to perform a selection move action.
Definition Direction.h:32