summaryrefslogtreecommitdiffstats
path: root/ganv
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-04-24 01:44:43 +0000
committerDavid Robillard <d@drobilla.net>2012-04-24 01:44:43 +0000
commit89c5346a3377a2075954acc436d3d843183ad31a (patch)
treec5d690b2a63b1a4720ccf34eea91f1b7a4b39183 /ganv
parent2bae5abe2bf3068e4a36113e104168ba31928386 (diff)
downloadganv-89c5346a3377a2075954acc436d3d843183ad31a.tar.gz
ganv-89c5346a3377a2075954acc436d3d843183ad31a.tar.bz2
ganv-89c5346a3377a2075954acc436d3d843183ad31a.zip
Fix downward signal flow display (i.e. port labels disabled).
git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@4260 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'ganv')
-rw-r--r--ganv/Canvas.hpp6
-rw-r--r--ganv/Module.hpp5
-rw-r--r--ganv/canvas.h16
-rw-r--r--ganv/module.h4
-rw-r--r--ganv/node.h1
-rw-r--r--ganv/port.h4
6 files changed, 29 insertions, 7 deletions
diff --git a/ganv/Canvas.hpp b/ganv/Canvas.hpp
index e017d70..477277d 100644
--- a/ganv/Canvas.hpp
+++ b/ganv/Canvas.hpp
@@ -111,10 +111,8 @@ public:
RW_PROPERTY(GanvDirection, direction);
- typedef void (*NodeFunction)(GanvNode* node, void* data);
-
- void for_each_node(NodeFunction f, void* data);
- void for_each_selected_node(NodeFunction f, void* data);
+ void for_each_node(GanvNodeFunction f, void* data);
+ void for_each_selected_node(GanvNodeFunction f, void* data);
typedef void (*EdgePtrFunction)(GanvEdge* edge, void* data);
diff --git a/ganv/Module.hpp b/ganv/Module.hpp
index b734ba2..9b294c9 100644
--- a/ganv/Module.hpp
+++ b/ganv/Module.hpp
@@ -43,8 +43,7 @@ public:
const std::string& name,
double x = 0,
double y = 0,
- bool show_title = true,
- bool show_port_labels = true)
+ bool show_title = true)
: Box(&canvas, GANV_BOX(
ganv_item_new(
GANV_ITEM(canvas.root()),
@@ -120,7 +119,7 @@ public:
guint num_ports() const { return ganv_module_num_ports(gobj()); }
RW_PROPERTY(gboolean, stacked)
- RW_PROPERTY(gboolean, show_port_labels)
+
METHODRET0(ganv_module, double, get_empty_port_breadth)
METHODRET0(ganv_module, double, get_empty_port_depth)
diff --git a/ganv/canvas.h b/ganv/canvas.h
index bbf6b97..352c13c 100644
--- a/ganv/canvas.h
+++ b/ganv/canvas.h
@@ -98,11 +98,27 @@ void
ganv_canvas_set_font_size(GanvCanvas* canvas, double points);
void
+ganv_canvas_set_direction(GanvCanvas* canvas, GanvDirection dir);
+
+void
ganv_canvas_clear_selection(GanvCanvas* canvas);
+typedef void (*GanvNodeFunction)(GanvNode* node, void* data);
+
typedef void (*GanvEdgeFunction)(GanvEdge* edge);
/**
+ * ganv_canvas_for_each_node:
+ * @canvas: The canvas.
+ * @f: (scope call): A function to call on every node on @canvas.
+ * @data: Data to pass to @f.
+ */
+void
+ganv_canvas_for_each_node(GanvCanvas* canvas,
+ GanvNodeFunction f,
+ void* data);
+
+/**
* ganv_canvas_for_each_edge_from:
* @canvas: The canvas.
* @tail: The tail to enumerate every edge for.
diff --git a/ganv/module.h b/ganv/module.h
index 16c5258..de36f4e 100644
--- a/ganv/module.h
+++ b/ganv/module.h
@@ -75,6 +75,10 @@ void
ganv_module_embed(GanvModule* module,
GtkWidget* widget);
+void
+ganv_module_set_direction(GanvModule* module,
+ GanvDirection direction);
+
/**
* ganv_module_for_each_port:
* @module: The module.
diff --git a/ganv/node.h b/ganv/node.h
index a18a361..9150945 100644
--- a/ganv/node.h
+++ b/ganv/node.h
@@ -134,6 +134,7 @@ GanvNode*
ganv_node_get_partner(const GanvNode* node);
void ganv_node_set_label(GanvNode* node, const char* str);
+void ganv_node_set_show_label(GanvNode* node, gboolean show);
void
ganv_node_move(GanvNode* node,
diff --git a/ganv/port.h b/ganv/port.h
index 402c67a..af5cc6b 100644
--- a/ganv/port.h
+++ b/ganv/port.h
@@ -49,6 +49,10 @@ ganv_port_new(GanvModule* module,
const char* first_prop_name, ...);
void
+ganv_port_set_direction(GanvPort* port,
+ GanvDirection direction);
+
+void
ganv_port_show_control(GanvPort* port);
void