diff --git a/src/gradient-drag.h b/src/gradient-drag.h
index b9a2fdcc22aa66204818e697958b588079427589..ed0887e9810ab2ab4c8b6272ef5ac0f78c6ddcee 100644 (file)
--- a/src/gradient-drag.h
+++ b/src/gradient-drag.h
#include <vector>
#include <forward.h>
#include <vector>
#include <forward.h>
+#include <libnr/nr-forward.h>
#include <knot-enums.h>
struct SPItem;
struct SPKnot;
#include <knot-enums.h>
struct SPItem;
struct SPKnot;
-namespace NR {
-class Point;
-}
/**
This class represents a single draggable point of a gradient. It remembers the item
/**
This class represents a single draggable point of a gradient. It remembers the item
*/
struct GrDraggable {
GrDraggable(SPItem *item, guint point_type, guint point_i, bool fill_or_stroke);
*/
struct GrDraggable {
GrDraggable(SPItem *item, guint point_type, guint point_i, bool fill_or_stroke);
- ~GrDraggable();
+ virtual ~GrDraggable();
SPItem *item;
gint point_type;
SPItem *item;
gint point_type;
*/
struct GrDragger {
GrDragger (GrDrag *parent, NR::Point p, GrDraggable *draggable);
*/
struct GrDragger {
GrDragger (GrDrag *parent, NR::Point p, GrDraggable *draggable);
- ~GrDragger();
+ virtual ~GrDragger();
GrDrag *parent;
GrDrag *parent;
bool mayMerge (GrDragger *other);
bool mayMerge (GrDraggable *da2);
bool mayMerge (GrDragger *other);
bool mayMerge (GrDraggable *da2);
- bool isA (gint point_type);
- bool isA (SPItem *item, gint point_type, gint point_i, bool fill_or_stroke);
+ bool isA (gint point_type);
+ bool isA (SPItem *item, gint point_type, bool fill_or_stroke);
+ bool isA (SPItem *item, gint point_type, gint point_i, bool fill_or_stroke);
void fireDraggables (bool write_repr, bool scale_radial = false, bool merging_focus = false);
};
void fireDraggables (bool write_repr, bool scale_radial = false, bool merging_focus = false);
};
public: // FIXME: make more of this private!
GrDrag(SPDesktop *desktop);
public: // FIXME: make more of this private!
GrDrag(SPDesktop *desktop);
- ~GrDrag();
+ virtual ~GrDrag();
bool isNonEmpty() {return (draggers != NULL);}
bool hasSelection() {return (selected != NULL);}
bool isNonEmpty() {return (draggers != NULL);}
bool hasSelection() {return (selected != NULL);}
void deselectAll();
void selectAll();
void selectByCoords(std::vector<NR::Point> coords);
void deselectAll();
void selectAll();
void selectByCoords(std::vector<NR::Point> coords);
+ void selectRect(NR::Rect const &r);
+
+ bool dropColor(SPItem *item, gchar *c, NR::Point p);
+
+ SPStop *addStopNearPoint (SPItem *item, NR::Point mouse_p, double tolerance);
void deleteSelected (bool just_one = false);
void deleteSelected (bool just_one = false);
+
+ guint32 getColor();
bool keep_selection;
GrDragger *getDraggerFor (SPItem *item, gint point_type, gint point_i, bool fill_or_stroke);
bool keep_selection;
GrDragger *getDraggerFor (SPItem *item, gint point_type, gint point_i, bool fill_or_stroke);
+ void grabKnot (GrDragger *dragger, gint x, gint y, guint32 etime);
void grabKnot (SPItem *item, gint point_type, gint point_i, bool fill_or_stroke, gint x, gint y, guint32 etime);
bool local_change;
void grabKnot (SPItem *item, gint point_type, gint point_i, bool fill_or_stroke, gint x, gint y, guint32 etime);
bool local_change;
private:
void deselect_all();
private:
void deselect_all();
- void addLine (NR::Point p1, NR::Point p2, guint32 rgba);
+ void addLine (SPItem *item, NR::Point p1, NR::Point p2, guint32 rgba);
void addDragger (GrDraggable *draggable);
void addDragger (GrDraggable *draggable);