summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4eda0ce)
raw | patch | inline | side by side (parent: 4eda0ce)
| author | buliabyak <buliabyak@users.sourceforge.net> | |
| Thu, 25 Jan 2007 03:30:58 +0000 (03:30 +0000) | ||
| committer | buliabyak <buliabyak@users.sourceforge.net> | |
| Thu, 25 Jan 2007 03:30:58 +0000 (03:30 +0000) |
| src/gradient-drag.h | patch | blob | history |
diff --git a/src/gradient-drag.h b/src/gradient-drag.h
index b6702bf8e335d8a5a2f89af469fa1ed8712251b3..4899a8fedc8e6e93a194363c55418536fe1c3eaf 100644 (file)
--- a/src/gradient-drag.h
+++ b/src/gradient-drag.h
}
};
-struct GrDrag;
+class GrDrag;
/**
This class holds together a visible on-canvas knot and a list of draggables that need to
This is the root class of the gradient dragging machinery. It holds lists of GrDraggers
and of lines (simple canvas items). It also remembers one of the draggers as selected.
*/
-struct GrDrag {
+class GrDrag {
+public: // FIXME: make more of this private!
+
GrDrag(SPDesktop *desktop);
~GrDrag();
- void addLine (NR::Point p1, NR::Point p2, guint32 rgba);
-
- void addDragger (GrDraggable *draggable);
-
- void addDraggersRadial (SPRadialGradient *rg, SPItem *item, bool fill_or_stroke);
- void addDraggersLinear (SPLinearGradient *lg, SPItem *item, bool fill_or_stroke);
-
+ // especially the selection must be private, fix gradient-context to remove direct access to it
GList *selected; // list of GrDragger*
void setSelected (GrDragger *dragger, bool add_to_selection = false, bool override = true);
void setDeselected (GrDragger *dragger);
- void deselect_all();
+ void deselectAll();
bool keep_selection;
bool local_change;
SPDesktop *desktop;
- Inkscape::Selection *selection;
- sigc::connection sel_changed_connection;
- sigc::connection sel_modified_connection;
-
- sigc::connection style_set_connection;
- sigc::connection style_query_connection;
// lists of edges of selection bboxes, to snap draggers to
std::vector<double> hor_levels;
void select_prev ();
void selected_reverse_vector ();
+
+private:
+ void deselect_all();
+
+ void addLine (NR::Point p1, NR::Point p2, guint32 rgba);
+
+ void addDragger (GrDraggable *draggable);
+
+ void addDraggersRadial (SPRadialGradient *rg, SPItem *item, bool fill_or_stroke);
+ void addDraggersLinear (SPLinearGradient *lg, SPItem *item, bool fill_or_stroke);
+
+ Inkscape::Selection *selection;
+ sigc::connection sel_changed_connection;
+ sigc::connection sel_modified_connection;
+
+ sigc::connection style_set_connection;
+ sigc::connection style_query_connection;
};
#endif