mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
(formating)
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@33 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
+10
-10
@@ -34,7 +34,7 @@ class SymbolPartMoveAction : public SymbolPartAction {
|
|||||||
SymbolPartMoveAction(const set<SymbolPartP>& parts);
|
SymbolPartMoveAction(const set<SymbolPartP>& parts);
|
||||||
|
|
||||||
virtual String getName(bool to_undo) const;
|
virtual String getName(bool to_undo) const;
|
||||||
virtual void perform(bool to_undo);
|
virtual void perform(bool to_undo);
|
||||||
|
|
||||||
/// Update this action to move some more
|
/// Update this action to move some more
|
||||||
void move(const Vector2D& delta);
|
void move(const Vector2D& delta);
|
||||||
@@ -71,7 +71,7 @@ class SymbolPartRotateAction : public SymbolPartMatrixAction {
|
|||||||
SymbolPartRotateAction(const set<SymbolPartP>& parts, const Vector2D& center);
|
SymbolPartRotateAction(const set<SymbolPartP>& parts, const Vector2D& center);
|
||||||
|
|
||||||
virtual String getName(bool to_undo) const;
|
virtual String getName(bool to_undo) const;
|
||||||
virtual void perform(bool to_undo);
|
virtual void perform(bool to_undo);
|
||||||
|
|
||||||
/// Update this action to rotate to a different angle
|
/// Update this action to rotate to a different angle
|
||||||
void rotateTo(double newAngle);
|
void rotateTo(double newAngle);
|
||||||
@@ -94,7 +94,7 @@ class SymbolPartShearAction : public SymbolPartMatrixAction {
|
|||||||
SymbolPartShearAction(const set<SymbolPartP>& parts, const Vector2D& center);
|
SymbolPartShearAction(const set<SymbolPartP>& parts, const Vector2D& center);
|
||||||
|
|
||||||
virtual String getName(bool to_undo) const;
|
virtual String getName(bool to_undo) const;
|
||||||
virtual void perform(bool to_undo);
|
virtual void perform(bool to_undo);
|
||||||
|
|
||||||
/// Change shear by a given amount
|
/// Change shear by a given amount
|
||||||
void move(const Vector2D& deltaShear);
|
void move(const Vector2D& deltaShear);
|
||||||
@@ -115,7 +115,7 @@ class SymbolPartScaleAction : public SymbolPartAction {
|
|||||||
SymbolPartScaleAction(const set<SymbolPartP>& parts, int scaleX, int scaleY);
|
SymbolPartScaleAction(const set<SymbolPartP>& parts, int scaleX, int scaleY);
|
||||||
|
|
||||||
virtual String getName(bool to_undo) const;
|
virtual String getName(bool to_undo) const;
|
||||||
virtual void perform(bool to_undo);
|
virtual void perform(bool to_undo);
|
||||||
|
|
||||||
/// Change min and max coordinates
|
/// Change min and max coordinates
|
||||||
void move(const Vector2D& deltaMin, const Vector2D& deltaMax);
|
void move(const Vector2D& deltaMin, const Vector2D& deltaMax);
|
||||||
@@ -146,7 +146,7 @@ class CombiningModeAction : public SymbolPartListAction {
|
|||||||
CombiningModeAction(const set<SymbolPartP>& parts, SymbolPartCombine mode);
|
CombiningModeAction(const set<SymbolPartP>& parts, SymbolPartCombine mode);
|
||||||
|
|
||||||
virtual String getName(bool to_undo) const;
|
virtual String getName(bool to_undo) const;
|
||||||
virtual void perform(bool to_undo);
|
virtual void perform(bool to_undo);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
vector<pair<SymbolPartP,SymbolPartCombine> > parts; ///< Affected parts with new combining modes
|
vector<pair<SymbolPartP,SymbolPartCombine> > parts; ///< Affected parts with new combining modes
|
||||||
@@ -160,7 +160,7 @@ class SymbolPartNameAction : public SymbolPartListAction {
|
|||||||
SymbolPartNameAction(const SymbolPartP& part, const String& name);
|
SymbolPartNameAction(const SymbolPartP& part, const String& name);
|
||||||
|
|
||||||
virtual String getName(bool to_undo) const;
|
virtual String getName(bool to_undo) const;
|
||||||
virtual void perform(bool to_undo);
|
virtual void perform(bool to_undo);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SymbolPartP part; ///< Affected part
|
SymbolPartP part; ///< Affected part
|
||||||
@@ -175,7 +175,7 @@ class AddSymbolPartAction : public SymbolPartListAction {
|
|||||||
AddSymbolPartAction(Symbol& symbol, const SymbolPartP& part);
|
AddSymbolPartAction(Symbol& symbol, const SymbolPartP& part);
|
||||||
|
|
||||||
virtual String getName(bool to_undo) const;
|
virtual String getName(bool to_undo) const;
|
||||||
virtual void perform(bool to_undo);
|
virtual void perform(bool to_undo);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Symbol& symbol; ///< Symbol to add the part to
|
Symbol& symbol; ///< Symbol to add the part to
|
||||||
@@ -190,7 +190,7 @@ class RemoveSymbolPartsAction : public SymbolPartListAction {
|
|||||||
RemoveSymbolPartsAction(Symbol& symbol, const set<SymbolPartP>& parts);
|
RemoveSymbolPartsAction(Symbol& symbol, const set<SymbolPartP>& parts);
|
||||||
|
|
||||||
virtual String getName(bool to_undo) const;
|
virtual String getName(bool to_undo) const;
|
||||||
virtual void perform(bool to_undo);
|
virtual void perform(bool to_undo);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Symbol& symbol;
|
Symbol& symbol;
|
||||||
@@ -206,7 +206,7 @@ class DuplicateSymbolPartsAction : public SymbolPartListAction {
|
|||||||
DuplicateSymbolPartsAction(Symbol& symbol, const set<SymbolPartP>& parts);
|
DuplicateSymbolPartsAction(Symbol& symbol, const set<SymbolPartP>& parts);
|
||||||
|
|
||||||
virtual String getName(bool to_undo) const;
|
virtual String getName(bool to_undo) const;
|
||||||
virtual void perform(bool to_undo);
|
virtual void perform(bool to_undo);
|
||||||
|
|
||||||
/// Fill a set with all the new parts
|
/// Fill a set with all the new parts
|
||||||
void getParts(set<SymbolPartP>& parts);
|
void getParts(set<SymbolPartP>& parts);
|
||||||
@@ -226,7 +226,7 @@ class ReorderSymbolPartsAction : public SymbolPartListAction {
|
|||||||
ReorderSymbolPartsAction(Symbol& symbol, size_t partId1, size_t partId2);
|
ReorderSymbolPartsAction(Symbol& symbol, size_t partId1, size_t partId2);
|
||||||
|
|
||||||
virtual String getName(bool to_undo) const;
|
virtual String getName(bool to_undo) const;
|
||||||
virtual void perform(bool to_undo);
|
virtual void perform(bool to_undo);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Symbol& symbol; ///< Symbol to swap the parts in
|
Symbol& symbol; ///< Symbol to swap the parts in
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ class SinglePointRemoveAction : public Action {
|
|||||||
SinglePointRemoveAction(const SymbolPartP& part, UInt position);
|
SinglePointRemoveAction(const SymbolPartP& part, UInt position);
|
||||||
|
|
||||||
virtual String getName(bool to_undo) const { return _("Delete point"); }
|
virtual String getName(bool to_undo) const { return _("Delete point"); }
|
||||||
virtual void perform(bool to_undo);
|
virtual void perform(bool to_undo);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SymbolPartP part;
|
SymbolPartP part;
|
||||||
@@ -337,7 +337,7 @@ class ControlPointRemoveAction : public Action {
|
|||||||
ControlPointRemoveAction(const SymbolPartP& part, const set<ControlPointP>& toDelete);
|
ControlPointRemoveAction(const SymbolPartP& part, const set<ControlPointP>& toDelete);
|
||||||
|
|
||||||
virtual String getName(bool to_undo) const;
|
virtual String getName(bool to_undo) const;
|
||||||
virtual void perform(bool to_undo);
|
virtual void perform(bool to_undo);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
vector<SinglePointRemoveActionP> removals;
|
vector<SinglePointRemoveActionP> removals;
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class ControlPointMoveAction : public Action {
|
|||||||
ControlPointMoveAction(const set<ControlPointP>& points);
|
ControlPointMoveAction(const set<ControlPointP>& points);
|
||||||
|
|
||||||
virtual String getName(bool to_undo) const;
|
virtual String getName(bool to_undo) const;
|
||||||
virtual void perform(bool to_undo);
|
virtual void perform(bool to_undo);
|
||||||
|
|
||||||
/// Update this action to move some more
|
/// Update this action to move some more
|
||||||
void move(const Vector2D& delta);
|
void move(const Vector2D& delta);
|
||||||
@@ -53,7 +53,7 @@ class HandleMoveAction : public Action {
|
|||||||
HandleMoveAction(const SelectedHandle& handle);
|
HandleMoveAction(const SelectedHandle& handle);
|
||||||
|
|
||||||
virtual String getName(bool to_undo) const;
|
virtual String getName(bool to_undo) const;
|
||||||
virtual void perform(bool to_undo);
|
virtual void perform(bool to_undo);
|
||||||
|
|
||||||
/// Update this action to move some more
|
/// Update this action to move some more
|
||||||
void move(const Vector2D& delta);
|
void move(const Vector2D& delta);
|
||||||
@@ -91,7 +91,7 @@ class SegmentModeAction : public Action {
|
|||||||
SegmentModeAction(const ControlPointP& p1, const ControlPointP& p2, SegmentMode mode);
|
SegmentModeAction(const ControlPointP& p1, const ControlPointP& p2, SegmentMode mode);
|
||||||
|
|
||||||
virtual String getName(bool to_undo) const;
|
virtual String getName(bool to_undo) const;
|
||||||
virtual void perform(bool to_undo);
|
virtual void perform(bool to_undo);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ControlPointUpdate point1, point2;
|
ControlPointUpdate point1, point2;
|
||||||
@@ -105,7 +105,7 @@ class LockModeAction : public Action {
|
|||||||
LockModeAction(const ControlPointP& p, LockMode mode);
|
LockModeAction(const ControlPointP& p, LockMode mode);
|
||||||
|
|
||||||
virtual String getName(bool to_undo) const;
|
virtual String getName(bool to_undo) const;
|
||||||
virtual void perform(bool to_undo);
|
virtual void perform(bool to_undo);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ControlPointUpdate point; ///< The affected point
|
ControlPointUpdate point; ///< The affected point
|
||||||
@@ -121,7 +121,7 @@ class CurveDragAction : public SegmentModeAction {
|
|||||||
CurveDragAction(const ControlPointP& point1, const ControlPointP& point2);
|
CurveDragAction(const ControlPointP& point1, const ControlPointP& point2);
|
||||||
|
|
||||||
virtual String getName(bool to_undo) const;
|
virtual String getName(bool to_undo) const;
|
||||||
virtual void perform(bool to_undo);
|
virtual void perform(bool to_undo);
|
||||||
|
|
||||||
// Move the curve by this much, it is grabbed at time t
|
// Move the curve by this much, it is grabbed at time t
|
||||||
void move(const Vector2D& delta, double t);
|
void move(const Vector2D& delta, double t);
|
||||||
@@ -136,7 +136,7 @@ class ControlPointAddAction : public Action {
|
|||||||
ControlPointAddAction(const SymbolPartP& part, UInt insert_after, double t);
|
ControlPointAddAction(const SymbolPartP& part, UInt insert_after, double t);
|
||||||
|
|
||||||
virtual String getName(bool to_undo) const;
|
virtual String getName(bool to_undo) const;
|
||||||
virtual void perform(bool to_undo);
|
virtual void perform(bool to_undo);
|
||||||
|
|
||||||
inline ControlPointP getNewPoint() const { return new_point; }
|
inline ControlPointP getNewPoint() const { return new_point; }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user