summaryrefslogtreecommitdiff
path: root/src/gtkext/graph/node.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gtkext/graph/node.h')
-rw-r--r--src/gtkext/graph/node.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/gtkext/graph/node.h b/src/gtkext/graph/node.h
index ffe0a0d..53232d9 100644
--- a/src/gtkext/graph/node.h
+++ b/src/gtkext/graph/node.h
@@ -59,8 +59,17 @@ typedef struct _GGraphNode GGraphNode;
typedef struct _GGraphNodeClass GGraphNodeClass;
+/* Détail sur une visite */
+typedef enum _GNodeVisitState
+{
+ GVS_ENTER, /* Entrée dans un groupe */
+ GVS_NODE, /* Traitement d'une feuille */
+ GVS_EXIT /* Sortie d'un groupe */
+
+} GNodeVisitState;
+
/* Rappel à chaque noeud visité */
-typedef bool (* graph_node_visitor_cb) (GGraphNode *, void *);
+typedef bool (* graph_node_visitor_cb) (GGraphNode *, GNodeVisitState, void *);
/* Indique le type définit par la GLib pour le noeud. */
@@ -74,6 +83,9 @@ GGraphNode *g_graph_node_new(GtkWidget *);
/* Fournit le rang du noeud dans le graphique. */
unsigned int g_graph_node_get_rank(const GGraphNode *);
+/* Réinitialise la position d'un noeud de graphique. */
+void g_graph_node_reset_position(GGraphNode *);
+
/* Altère la position du noeud d'encapsulation. */
void g_graph_node_set_position(GGraphNode *, gint *, gint *);
@@ -91,7 +103,10 @@ void g_graph_node_get_position(const GGraphNode *, gint *, gint *);
GtkAllocation g_graph_node_get_allocation(const GGraphNode *);
/* Parcourt tous les noeuds graphiques dans un ordre donné. */
-bool g_graph_node_visit_flow_nodes(GGraphNode *, graph_node_visitor_cb, void *);
+bool g_graph_node_visit_nodes(GGraphNode *, graph_node_visitor_cb, void *);
+
+/* Recherche le noeud contenant un autre noeud. */
+GGraphNode *g_graph_node_find_container(GGraphNode *, GGraphNode *);