From: buliabyak Date: Sun, 7 Oct 2007 20:48:12 +0000 (+0000) Subject: still more utility functions X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e9567f83e9050b0a7ec58d22a9199cc8eca9fed8;p=inkscape.git still more utility functions --- diff --git a/src/gradient-drag.h b/src/gradient-drag.h index 890ab23ee..5b8c867f1 100644 --- a/src/gradient-drag.h +++ b/src/gradient-drag.h @@ -108,6 +108,10 @@ public: // FIXME: make more of this private! bool isNonEmpty() {return (draggers != NULL);} bool hasSelection() {return (selected != NULL);} + guint numSelected() {return (selected? g_list_length(selected) : 0);} + guint numDraggers() {return (draggers? g_list_length(draggers) : 0);} + guint singleSelectedDraggerNumDraggables() {return (selected? g_slist_length(((GrDragger *) selected->data)->draggables) : 0);} + guint singleSelectedDraggerSingleDraggableType() {return (selected? ((GrDraggable *) ((GrDragger *) selected->data)->draggables->data)->point_type : 0);} // especially the selection must be private, fix gradient-context to remove direct access to it GList *selected; // list of GrDragger*