summaryrefslogtreecommitdiffstats
path: root/src/knot-holder-entity.h
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2008-06-04 14:47:17 +0000
committercilix42 <cilix42@users.sourceforge.net>2008-06-04 14:47:17 +0000
commit1576e4cb9a983ecd228902aab0a70d90e9b95dad (patch)
tree6a47f964fa3702967431b6493bbc61d4f1f94739 /src/knot-holder-entity.h
parentIcon for spiro spline mode (diff)
downloadinkscape-1576e4cb9a983ecd228902aab0a70d90e9b95dad.tar.gz
inkscape-1576e4cb9a983ecd228902aab0a70d90e9b95dad.zip
Some cleanup of knotholder code; mostly renaming knot_(get|set|click)_func --> knot_(get|set_click) for reduced verbosity
(bzr r5802)
Diffstat (limited to 'src/knot-holder-entity.h')
-rw-r--r--src/knot-holder-entity.h34
1 files changed, 9 insertions, 25 deletions
diff --git a/src/knot-holder-entity.h b/src/knot-holder-entity.h
index 854182726..287c9c64d 100644
--- a/src/knot-holder-entity.h
+++ b/src/knot-holder-entity.h
@@ -45,9 +45,9 @@ public:
/* the get/set/click handlers are virtual functions; each handler class for a knot
should be derived from KnotHolderEntity and override these functions */
- virtual void knot_set_func(NR::Point const &p, NR::Point const &origin, guint state);
- virtual NR::Point knot_get_func();
- virtual void knot_click_func(guint state);
+ virtual void knot_set(NR::Point const &p, NR::Point const &origin, guint state) = 0;
+ virtual NR::Point knot_get() = 0;
+ virtual void knot_click(guint state) {}
void update_knot();
@@ -70,42 +70,26 @@ public:
sigc::connection _moved_connection;
sigc::connection _click_connection;
sigc::connection _ungrabbed_connection;
-
- /**
- * Called solely from knot_moved_handler.
- *
- * \param p Requested position of the knot, in item coordinates
- * \param origin Position where the knot started being dragged
- * \param state GTK event state (for keyboard modifiers)
- */
- void (* knot_set) (SPItem *item, NR::Point const &p, NR::Point const &origin, guint state);
-
- /**
- * Returns the position of the knot representation, in item coordinates.
- */
- NR::Point (* knot_get) (SPItem *item);
-
- void (* knot_click) (SPItem *item, guint state);
};
/* pattern manipulation */
class PatternKnotHolderEntityXY : public KnotHolderEntity {
public:
- virtual NR::Point knot_get_func();
- virtual void knot_set_func(NR::Point const &p, NR::Point const &origin, guint state);
+ virtual NR::Point knot_get();
+ virtual void knot_set(NR::Point const &p, NR::Point const &origin, guint state);
};
class PatternKnotHolderEntityAngle : public KnotHolderEntity {
public:
- virtual NR::Point knot_get_func();
- virtual void knot_set_func(NR::Point const &p, NR::Point const &origin, guint state);
+ virtual NR::Point knot_get();
+ virtual void knot_set(NR::Point const &p, NR::Point const &origin, guint state);
};
class PatternKnotHolderEntityScale : public KnotHolderEntity {
public:
- virtual NR::Point knot_get_func();
- virtual void knot_set_func(NR::Point const &p, NR::Point const &origin, guint state);
+ virtual NR::Point knot_get();
+ virtual void knot_set(NR::Point const &p, NR::Point const &origin, guint state);
};
#endif /* !SEEN_KNOT_HOLDER_ENTITY_H */