summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 22a47f3)
raw | patch | inline | side by side (parent: 22a47f3)
author | cilix42 <cilix42@users.sourceforge.net> | |
Wed, 4 Jun 2008 14:47:17 +0000 (14:47 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Wed, 4 Jun 2008 14:47:17 +0000 (14:47 +0000) |
index 854182726a836bc586a3fe40f11499f42496dbea..287c9c64da61e5d63aba32d511bd6b9d57c419f7 100644 (file)
--- a/src/knot-holder-entity.h
+++ b/src/knot-holder-entity.h
/* 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();
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 */
diff --git a/src/knotholder.cpp b/src/knotholder.cpp
index b589d18c5bf65baadda28edfe2c3f3ec1cbf718c..0a3cb295769138d99112eba3a52f891570c20c60 100644 (file)
--- a/src/knotholder.cpp
+++ b/src/knotholder.cpp
class SPDesktop;
-//static void knot_clicked_handler (SPKnot *knot, guint state, gpointer data);
-//static void knot_moved_handler(SPKnot *knot, NR::Point const *p, guint state, gpointer data);
-//static void knot_ungrabbed_handler (SPKnot *knot, unsigned int state, KnotHolder *kh);
-
KnotHolder::KnotHolder(SPDesktop *desktop, SPItem *item, SPKnotHolderReleasedFunc relhandler)
{
Inkscape::XML::Node *repr = SP_OBJECT(item)->repr;
entity.clear(); // this shouldn't be necessary, though
}
-/** TODO: is this still needed?
-void sp_knot_holder_destroy(SPKnotHolder *kh) {
- g_object_unref(kh);
- }
-**/
-
/**
* \param p In desktop coordinates.
*/
KnotHolderEntity *e = *i;
if (e->knot == knot) {
// no need to test whether knot_click exists since it's virtual now
- e->knot_click_func(state);
+ e->knot_click(state);
break;
}
}
KnotHolderEntity *e = *i;
if (e->knot == knot) {
NR::Point const q = *p / sp_item_i2d_affine(item);
- e->knot_set_func(q, e->knot->drag_origin / sp_item_i2d_affine(item), state);
+ e->knot_set(q, e->knot->drag_origin / sp_item_i2d_affine(item), state);
break;
}
}
diff --git a/src/live_effects/parameter/pointparam-knotholder.cpp b/src/live_effects/parameter/pointparam-knotholder.cpp
index 8e929a59ef19cbc3fdb5aca5e989da785c5ae883..f59b2f7eb75154e431b91fe870aab1d82f0e8c82 100644 (file)
g_object_unref(G_OBJECT(this->lpeobject));
}
+class KnotHolderEntityPointParam : public KnotHolderEntity {
+public:
+ virtual NR::Point knot_get();
+ virtual void knot_set(NR::Point const &p, NR::Point const &origin, guint state);
+};
+
+NR::Point
+KnotHolderEntityPointParam::knot_get() {
+ return NR::Point(0,0);
+}
+
+void
+KnotHolderEntityPointParam::knot_set(NR::Point const &p, NR::Point const &origin, guint state) {
+}
+
void
PointParamKnotHolder::add_knot (
Geom::Point & p,
const gchar *tip )
{
/* create new SPKnotHolderEntry */
- // TODO: knot_click can't be set any more with the new KnotHolder design; make it a virtual function?
- KnotHolderEntity *e = new KnotHolderEntity();
+ KnotHolderEntity *e = new KnotHolderEntityPointParam();
e->create(this->desktop, this->item, this, tip, shape, mode, color);
entity.push_back(e);
diff --git a/src/object-edit.cpp b/src/object-edit.cpp
index d335ced533aeec1082cd905bbe5d5b468ecd834a..281b5e89dc3bf3355d289b42449208f45fb3a65a 100644 (file)
--- a/src/object-edit.cpp
+++ b/src/object-edit.cpp
/* handle for horizontal rounding radius */
class RectKnotHolderEntityRX : 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 void knot_click_func(guint state);
+ virtual NR::Point knot_get();
+ virtual void knot_set(NR::Point const &p, NR::Point const &origin, guint state);
+ virtual void knot_click(guint state);
};
/* handle for vertical rounding radius */
class RectKnotHolderEntityRY : 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 void knot_click_func(guint state);
+ virtual NR::Point knot_get();
+ virtual void knot_set(NR::Point const &p, NR::Point const &origin, guint state);
+ virtual void knot_click(guint state);
};
/* handle for width/height adjustment */
class RectKnotHolderEntityWH : 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);
};
/* handle for x/y adjustment */
class RectKnotHolderEntityXY : 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);
};
static NR::Point snap_knot_position(SPItem *item, NR::Point const &p)
}
NR::Point
-RectKnotHolderEntityRX::knot_get_func()
+RectKnotHolderEntityRX::knot_get()
{
SPRect *rect = SP_RECT(item);
}
void
-RectKnotHolderEntityRX::knot_set_func(NR::Point const &p, NR::Point const &/*origin*/, guint state)
+RectKnotHolderEntityRX::knot_set(NR::Point const &p, NR::Point const &/*origin*/, guint state)
{
SPRect *rect = SP_RECT(item);
@@ -173,7 +173,7 @@ RectKnotHolderEntityRX::knot_set_func(NR::Point const &p, NR::Point const &/*ori
}
void
-RectKnotHolderEntityRX::knot_click_func(guint state)
+RectKnotHolderEntityRX::knot_click(guint state)
{
SPRect *rect = SP_RECT(item);
}
NR::Point
-RectKnotHolderEntityRY::knot_get_func()
+RectKnotHolderEntityRY::knot_get()
{
SPRect *rect = SP_RECT(item);
}
void
-RectKnotHolderEntityRY::knot_set_func(NR::Point const &p, NR::Point const &/*origin*/, guint state)
+RectKnotHolderEntityRY::knot_set(NR::Point const &p, NR::Point const &/*origin*/, guint state)
{
SPRect *rect = SP_RECT(item);
@@ -230,7 +230,7 @@ RectKnotHolderEntityRY::knot_set_func(NR::Point const &p, NR::Point const &/*ori
}
void
-RectKnotHolderEntityRY::knot_click_func(guint state)
+RectKnotHolderEntityRY::knot_click(guint state)
{
SPRect *rect = SP_RECT(item);
}
NR::Point
-RectKnotHolderEntityWH::knot_get_func()
+RectKnotHolderEntityWH::knot_get()
{
SPRect *rect = SP_RECT(item);
}
void
-RectKnotHolderEntityWH::knot_set_func(NR::Point const &p, NR::Point const &origin, guint state)
+RectKnotHolderEntityWH::knot_set(NR::Point const &p, NR::Point const &origin, guint state)
{
SPRect *rect = SP_RECT(item);
@@ -332,7 +332,7 @@ RectKnotHolderEntityWH::knot_set_func(NR::Point const &p, NR::Point const &origi
}
NR::Point
-RectKnotHolderEntityXY::knot_get_func()
+RectKnotHolderEntityXY::knot_get()
{
SPRect *rect = SP_RECT(item);
}
void
-RectKnotHolderEntityXY::knot_set_func(NR::Point const &p, NR::Point const &origin, guint state)
+RectKnotHolderEntityXY::knot_set(NR::Point const &p, NR::Point const &origin, guint state)
{
SPRect *rect = SP_RECT(item);
@@ -447,21 +447,21 @@ RectKnotHolder::RectKnotHolder(SPDesktop *desktop, SPItem *item, SPKnotHolderRel
class Box3DKnotHolderEntity : public KnotHolderEntity {
public:
- virtual NR::Point knot_get_func() = 0;
- virtual void knot_set_func(NR::Point const &p, NR::Point const &origin, guint state) = 0;
+ virtual NR::Point knot_get() = 0;
+ virtual void knot_set(NR::Point const &p, NR::Point const &origin, guint state) = 0;
- static NR::Point knot_get_func_generic(SPItem *item, unsigned int knot_id);
- static void knot_set_func_generic(SPItem *item, unsigned int knot_id, NR::Point const &p, guint state);
+ static NR::Point knot_get_generic(SPItem *item, unsigned int knot_id);
+ static void knot_set_generic(SPItem *item, unsigned int knot_id, NR::Point const &p, guint state);
};
NR::Point
-Box3DKnotHolderEntity::knot_get_func_generic(SPItem *item, unsigned int knot_id)
+Box3DKnotHolderEntity::knot_get_generic(SPItem *item, unsigned int knot_id)
{
return box3d_get_corner_screen(SP_BOX3D(item), knot_id);
}
void
-Box3DKnotHolderEntity::knot_set_func_generic(SPItem *item, unsigned int knot_id, NR::Point const &new_pos, guint state)
+Box3DKnotHolderEntity::knot_set_generic(SPItem *item, unsigned int knot_id, NR::Point const &new_pos, guint state)
{
NR::Point const s = snap_knot_position(item, new_pos);
@@ -483,162 +483,162 @@ Box3DKnotHolderEntity::knot_set_func_generic(SPItem *item, unsigned int knot_id,
class Box3DKnotHolderEntity0 : public Box3DKnotHolderEntity {
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 Box3DKnotHolderEntity1 : public Box3DKnotHolderEntity {
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 Box3DKnotHolderEntity2 : public Box3DKnotHolderEntity {
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 Box3DKnotHolderEntity3 : public Box3DKnotHolderEntity {
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 Box3DKnotHolderEntity4 : public Box3DKnotHolderEntity {
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 Box3DKnotHolderEntity5 : public Box3DKnotHolderEntity {
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 Box3DKnotHolderEntity6 : public Box3DKnotHolderEntity {
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 Box3DKnotHolderEntity7 : public Box3DKnotHolderEntity {
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 Box3DKnotHolderEntityCenter : 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);
};
NR::Point
-Box3DKnotHolderEntity0::knot_get_func()
+Box3DKnotHolderEntity0::knot_get()
{
- return knot_get_func_generic(item, 0);
+ return knot_get_generic(item, 0);
}
NR::Point
-Box3DKnotHolderEntity1::knot_get_func()
+Box3DKnotHolderEntity1::knot_get()
{
- return knot_get_func_generic(item, 1);
+ return knot_get_generic(item, 1);
}
NR::Point
-Box3DKnotHolderEntity2::knot_get_func()
+Box3DKnotHolderEntity2::knot_get()
{
- return knot_get_func_generic(item, 2);
+ return knot_get_generic(item, 2);
}
NR::Point
-Box3DKnotHolderEntity3::knot_get_func()
+Box3DKnotHolderEntity3::knot_get()
{
- return knot_get_func_generic(item, 3);
+ return knot_get_generic(item, 3);
}
NR::Point
-Box3DKnotHolderEntity4::knot_get_func()
+Box3DKnotHolderEntity4::knot_get()
{
- return knot_get_func_generic(item, 4);
+ return knot_get_generic(item, 4);
}
NR::Point
-Box3DKnotHolderEntity5::knot_get_func()
+Box3DKnotHolderEntity5::knot_get()
{
- return knot_get_func_generic(item, 5);
+ return knot_get_generic(item, 5);
}
NR::Point
-Box3DKnotHolderEntity6::knot_get_func()
+Box3DKnotHolderEntity6::knot_get()
{
- return knot_get_func_generic(item, 6);
+ return knot_get_generic(item, 6);
}
NR::Point
-Box3DKnotHolderEntity7::knot_get_func()
+Box3DKnotHolderEntity7::knot_get()
{
- return knot_get_func_generic(item, 7);
+ return knot_get_generic(item, 7);
}
NR::Point
-Box3DKnotHolderEntityCenter::knot_get_func()
+Box3DKnotHolderEntityCenter::knot_get()
{
return box3d_get_center_screen(SP_BOX3D(item));
}
void
-Box3DKnotHolderEntity0::knot_set_func(NR::Point const &new_pos, NR::Point const &/*origin*/, guint state)
+Box3DKnotHolderEntity0::knot_set(NR::Point const &new_pos, NR::Point const &/*origin*/, guint state)
{
- knot_set_func_generic(item, 0, new_pos, state);
+ knot_set_generic(item, 0, new_pos, state);
}
void
-Box3DKnotHolderEntity1::knot_set_func(NR::Point const &new_pos, NR::Point const &/*origin*/, guint state)
+Box3DKnotHolderEntity1::knot_set(NR::Point const &new_pos, NR::Point const &/*origin*/, guint state)
{
- knot_set_func_generic(item, 1, new_pos, state);
+ knot_set_generic(item, 1, new_pos, state);
}
void
-Box3DKnotHolderEntity2::knot_set_func(NR::Point const &new_pos, NR::Point const &/*origin*/, guint state)
+Box3DKnotHolderEntity2::knot_set(NR::Point const &new_pos, NR::Point const &/*origin*/, guint state)
{
- knot_set_func_generic(item, 2, new_pos, state);
+ knot_set_generic(item, 2, new_pos, state);
}
void
-Box3DKnotHolderEntity3::knot_set_func(NR::Point const &new_pos, NR::Point const &/*origin*/, guint state)
+Box3DKnotHolderEntity3::knot_set(NR::Point const &new_pos, NR::Point const &/*origin*/, guint state)
{
- knot_set_func_generic(item, 3, new_pos, state);
+ knot_set_generic(item, 3, new_pos, state);
}
void
-Box3DKnotHolderEntity4::knot_set_func(NR::Point const &new_pos, NR::Point const &/*origin*/, guint state)
+Box3DKnotHolderEntity4::knot_set(NR::Point const &new_pos, NR::Point const &/*origin*/, guint state)
{
- knot_set_func_generic(item, 4, new_pos, state);
+ knot_set_generic(item, 4, new_pos, state);
}
void
-Box3DKnotHolderEntity5::knot_set_func(NR::Point const &new_pos, NR::Point const &/*origin*/, guint state)
+Box3DKnotHolderEntity5::knot_set(NR::Point const &new_pos, NR::Point const &/*origin*/, guint state)
{
- knot_set_func_generic(item, 5, new_pos, state);
+ knot_set_generic(item, 5, new_pos, state);
}
void
-Box3DKnotHolderEntity6::knot_set_func(NR::Point const &new_pos, NR::Point const &/*origin*/, guint state)
+Box3DKnotHolderEntity6::knot_set(NR::Point const &new_pos, NR::Point const &/*origin*/, guint state)
{
- knot_set_func_generic(item, 6, new_pos, state);
+ knot_set_generic(item, 6, new_pos, state);
}
void
-Box3DKnotHolderEntity7::knot_set_func(NR::Point const &new_pos, NR::Point const &/*origin*/, guint state)
+Box3DKnotHolderEntity7::knot_set(NR::Point const &new_pos, NR::Point const &/*origin*/, guint state)
{
- knot_set_func_generic(item, 7, new_pos, state);
+ knot_set_generic(item, 7, new_pos, state);
}
void
-Box3DKnotHolderEntityCenter::knot_set_func(NR::Point const &new_pos, NR::Point const &origin, guint state)
+Box3DKnotHolderEntityCenter::knot_set(NR::Point const &new_pos, NR::Point const &origin, guint state)
{
NR::Point const s = snap_knot_position(item, new_pos);
@@ -710,29 +710,29 @@ Box3DKnotHolder::Box3DKnotHolder(SPDesktop *desktop, SPItem *item, SPKnotHolderR
class ArcKnotHolderEntityStart : 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 ArcKnotHolderEntityEnd : 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 void knot_click_func(guint state);
+ virtual NR::Point knot_get();
+ virtual void knot_set(NR::Point const &p, NR::Point const &origin, guint state);
+ virtual void knot_click(guint state);
};
class ArcKnotHolderEntityRX : 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 void knot_click_func(guint state);
+ virtual NR::Point knot_get();
+ virtual void knot_set(NR::Point const &p, NR::Point const &origin, guint state);
+ virtual void knot_click(guint state);
};
class ArcKnotHolderEntityRY : 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 void knot_click_func(guint state);
+ virtual NR::Point knot_get();
+ virtual void knot_set(NR::Point const &p, NR::Point const &origin, guint state);
+ virtual void knot_click(guint state);
};
/*
}
void
-ArcKnotHolderEntityStart::knot_set_func(NR::Point const &p, NR::Point const &/*origin*/, guint state)
+ArcKnotHolderEntityStart::knot_set(NR::Point const &p, NR::Point const &/*origin*/, guint state)
{
int snaps = prefs_get_int_attribute("options.rotationsnapsperpi", "value", 12);
@@ -776,7 +776,7 @@ ArcKnotHolderEntityStart::knot_set_func(NR::Point const &p, NR::Point const &/*o
}
NR::Point
-ArcKnotHolderEntityStart::knot_get_func()
+ArcKnotHolderEntityStart::knot_get()
{
SPGenericEllipse *ge = SP_GENERICELLIPSE(item);
SPArc *arc = SP_ARC(item);
}
void
-ArcKnotHolderEntityEnd::knot_set_func(NR::Point const &p, NR::Point const &/*origin*/, guint state)
+ArcKnotHolderEntityEnd::knot_set(NR::Point const &p, NR::Point const &/*origin*/, guint state)
{
int snaps = prefs_get_int_attribute("options.rotationsnapsperpi", "value", 12);
@@ -807,7 +807,7 @@ ArcKnotHolderEntityEnd::knot_set_func(NR::Point const &p, NR::Point const &/*ori
}
NR::Point
-ArcKnotHolderEntityEnd::knot_get_func()
+ArcKnotHolderEntityEnd::knot_get()
{
SPGenericEllipse *ge = SP_GENERICELLIPSE(item);
SPArc *arc = SP_ARC(item);
void
-ArcKnotHolderEntityEnd::knot_click_func(guint state)
+ArcKnotHolderEntityEnd::knot_click(guint state)
{
SPGenericEllipse *ge = SP_GENERICELLIPSE(item);
void
-ArcKnotHolderEntityRX::knot_set_func(NR::Point const &p, NR::Point const &/*origin*/, guint state)
+ArcKnotHolderEntityRX::knot_set(NR::Point const &p, NR::Point const &/*origin*/, guint state)
{
SPGenericEllipse *ge = SP_GENERICELLIPSE(item);
SPArc *arc = SP_ARC(item);
@@ -846,7 +846,7 @@ ArcKnotHolderEntityRX::knot_set_func(NR::Point const &p, NR::Point const &/*orig
}
NR::Point
-ArcKnotHolderEntityRX::knot_get_func()
+ArcKnotHolderEntityRX::knot_get()
{
SPGenericEllipse *ge = SP_GENERICELLIPSE(item);
}
void
-ArcKnotHolderEntityRX::knot_click_func(guint state)
+ArcKnotHolderEntityRX::knot_click(guint state)
{
SPGenericEllipse *ge = SP_GENERICELLIPSE(item);
}
void
-ArcKnotHolderEntityRY::knot_set_func(NR::Point const &p, NR::Point const &/*origin*/, guint state)
+ArcKnotHolderEntityRY::knot_set(NR::Point const &p, NR::Point const &/*origin*/, guint state)
{
SPGenericEllipse *ge = SP_GENERICELLIPSE(item);
SPArc *arc = SP_ARC(item);
@@ -882,7 +882,7 @@ ArcKnotHolderEntityRY::knot_set_func(NR::Point const &p, NR::Point const &/*orig
}
NR::Point
-ArcKnotHolderEntityRY::knot_get_func()
+ArcKnotHolderEntityRY::knot_get()
{
SPGenericEllipse *ge = SP_GENERICELLIPSE(item);
}
void
-ArcKnotHolderEntityRY::knot_click_func(guint state)
+ArcKnotHolderEntityRY::knot_click(guint state)
{
SPGenericEllipse *ge = SP_GENERICELLIPSE(item);
@@ -933,20 +933,20 @@ ArcKnotHolder::ArcKnotHolder(SPDesktop *desktop, SPItem *item, SPKnotHolderRelea
class StarKnotHolderEntity1 : 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 void knot_click_func(guint state);
+ virtual NR::Point knot_get();
+ virtual void knot_set(NR::Point const &p, NR::Point const &origin, guint state);
+ virtual void knot_click(guint state);
};
class StarKnotHolderEntity2 : 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 void knot_click_func(guint state);
+ virtual NR::Point knot_get();
+ virtual void knot_set(NR::Point const &p, NR::Point const &origin, guint state);
+ virtual void knot_click(guint state);
};
void
-StarKnotHolderEntity1::knot_set_func(NR::Point const &p, NR::Point const &/*origin*/, guint state)
+StarKnotHolderEntity1::knot_set(NR::Point const &p, NR::Point const &/*origin*/, guint state)
{
SPStar *star = SP_STAR(item);
@@ -972,7 +972,7 @@ StarKnotHolderEntity1::knot_set_func(NR::Point const &p, NR::Point const &/*orig
}
void
-StarKnotHolderEntity2::knot_set_func(NR::Point const &p, NR::Point const &/*origin*/, guint state)
+StarKnotHolderEntity2::knot_set(NR::Point const &p, NR::Point const &/*origin*/, guint state)
{
SPStar *star = SP_STAR(item);
@@ -1001,7 +1001,7 @@ StarKnotHolderEntity2::knot_set_func(NR::Point const &p, NR::Point const &/*orig
}
NR::Point
-StarKnotHolderEntity1::knot_get_func()
+StarKnotHolderEntity1::knot_get()
{
g_assert(item != NULL);
}
NR::Point
-StarKnotHolderEntity2::knot_get_func()
+StarKnotHolderEntity2::knot_get()
{
g_assert(item != NULL);
}
void
-StarKnotHolderEntity1::knot_click_func(guint state)
+StarKnotHolderEntity1::knot_click(guint state)
{
return sp_star_knot_click(item, state);
}
void
-StarKnotHolderEntity2::knot_click_func(guint state)
+StarKnotHolderEntity2::knot_click(guint state)
{
return sp_star_knot_click(item, state);
}
@@ -1076,15 +1076,15 @@ StarKnotHolder::StarKnotHolder(SPDesktop *desktop, SPItem *item, SPKnotHolderRel
class SpiralKnotHolderEntityInner : 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 void knot_click_func(guint state);
+ virtual NR::Point knot_get();
+ virtual void knot_set(NR::Point const &p, NR::Point const &origin, guint state);
+ virtual void knot_click(guint state);
};
class SpiralKnotHolderEntityOuter : 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);
};
* [control] constrain inner arg to round per PI/4
*/
void
-SpiralKnotHolderEntityInner::knot_set_func(NR::Point const &p, NR::Point const &/*origin*/, guint state)
+SpiralKnotHolderEntityInner::knot_set(NR::Point const &p, NR::Point const &/*origin*/, guint state)
{
int snaps = prefs_get_int_attribute("options.rotationsnapsperpi", "value", 12);
@@ -1137,7 +1137,7 @@ SpiralKnotHolderEntityInner::knot_set_func(NR::Point const &p, NR::Point const &
* [control] constrain inner arg to round per PI/4
*/
void
-SpiralKnotHolderEntityOuter::knot_set_func(NR::Point const &p, NR::Point const &/*origin*/, guint state)
+SpiralKnotHolderEntityOuter::knot_set(NR::Point const &p, NR::Point const &/*origin*/, guint state)
{
int snaps = prefs_get_int_attribute("options.rotationsnapsperpi", "value", 12);
@@ -1210,7 +1210,7 @@ SpiralKnotHolderEntityOuter::knot_set_func(NR::Point const &p, NR::Point const &
}
NR::Point
-SpiralKnotHolderEntityInner::knot_get_func()
+SpiralKnotHolderEntityInner::knot_get()
{
SPSpiral *spiral = SP_SPIRAL(item);
}
NR::Point
-SpiralKnotHolderEntityOuter::knot_get_func()
+SpiralKnotHolderEntityOuter::knot_get()
{
SPSpiral *spiral = SP_SPIRAL(item);
}
void
-SpiralKnotHolderEntityInner::knot_click_func(guint state)
+SpiralKnotHolderEntityInner::knot_click(guint state)
{
SPSpiral *spiral = SP_SPIRAL(item);
@@ -1260,12 +1260,12 @@ SpiralKnotHolder::SpiralKnotHolder(SPDesktop *desktop, SPItem *item, SPKnotHolde
class OffsetKnotHolderEntity : 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);
};
void
-OffsetKnotHolderEntity::knot_set_func(NR::Point const &p, NR::Point const &/*origin*/, guint /*state*/)
+OffsetKnotHolderEntity::knot_set(NR::Point const &p, NR::Point const &/*origin*/, guint /*state*/)
{
SPOffset *offset = SP_OFFSET(item);
@@ -1278,7 +1278,7 @@ OffsetKnotHolderEntity::knot_set_func(NR::Point const &p, NR::Point const &/*ori
NR::Point
-OffsetKnotHolderEntity::knot_get_func()
+OffsetKnotHolderEntity::knot_get()
{
SPOffset *offset = SP_OFFSET(item);
@@ -1300,12 +1300,12 @@ OffsetKnotHolder::OffsetKnotHolder(SPDesktop *desktop, SPItem *item, SPKnotHolde
class FlowtextKnotHolderEntity : 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);
};
NR::Point
-FlowtextKnotHolderEntity::knot_get_func()
+FlowtextKnotHolderEntity::knot_get()
{
SPRect *rect = SP_RECT(item);
}
void
-FlowtextKnotHolderEntity::knot_set_func(NR::Point const &p, NR::Point const &origin, guint state)
+FlowtextKnotHolderEntity::knot_set(NR::Point const &p, NR::Point const &origin, guint state)
{
SPRect *rect = SP_RECT(item);