From e9567f83e9050b0a7ec58d22a9199cc8eca9fed8 Mon Sep 17 00:00:00 2001 From: buliabyak Date: Sun, 7 Oct 2007 20:48:12 +0000 Subject: [PATCH] still more utility functions --- src/gradient-drag.h | 4 ++++ 1 file changed, 4 insertions(+) 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* -- 2.30.2