diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2013-03-19 21:13:51 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2013-03-19 21:13:51 (GMT) |
commit | cf97db0ea4d1ea983db38df85984034b49fa4f77 (patch) | |
tree | b6d69945b24ec8da93f0bef7ccf4dfdbe1d920a2 /src/gtkext/graph/layout.h | |
parent | e7a85861ba8bcd00ceb7bf9e47f4eadccd48ce3f (diff) |
Defined the first steps towards new graph renderings.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@345 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/gtkext/graph/layout.h')
-rw-r--r-- | src/gtkext/graph/layout.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/gtkext/graph/layout.h b/src/gtkext/graph/layout.h index 7a3bf1e..6295cac 100644 --- a/src/gtkext/graph/layout.h +++ b/src/gtkext/graph/layout.h @@ -38,4 +38,46 @@ bool build_graph_view(GtkGraphView *, GInstrBlock *, GtkViewPanel **, size_t); + + +#include "edge.h" +#include "../gtkbufferview.h" + + + + +#define G_TYPE_GRAPH_LAYOUT g_graph_layout_get_type() +#define G_GRAPH_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), g_graph_layout_get_type(), GGraphLayout)) +#define G_IS_GRAPH_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), g_graph_layout_get_type())) +#define G_GRAPH_LAYOUT_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE((inst), g_graph_layout_get_type(), GGraphLayoutIface)) +#define G_GRAPH_LAYOUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_GRAPH_LAYOUT, GGraphLayoutClass)) + + +/* Mise en disposition de blocs en graphique (instance) */ +typedef struct _GGraphLayout GGraphLayout; + +/* Mise en disposition de blocs en graphique (classe) */ +typedef struct _GGraphLayoutClass GGraphLayoutClass; + + +/* Indique le type définit par la GLib pour les mises en disposition graphique. */ +GType g_graph_layout_get_type(void); + +/* Construit un graphique à partir de blocs basiques. */ +GGraphLayout *g_graph_layout_new(GInstrBlock *, GtkBufferView **, size_t); + +/* Ajoute un lien entre deux noeuds au graphique. */ +void g_graph_layout_add_edge(GGraphLayout *, GGraphEdge *); + +/* Dispose chaque noeud sur la surface de destination donnée. */ +void g_graph_layout_place(GGraphLayout *, GtkGraphView *); + +/* Dessine les liens graphiques enregistrés dans le moteur. */ +void g_graph_layout_draw(const GGraphLayout *, GdkDrawable *, GdkGC *); + +/* Dessine les liens graphiques enregistrés dans le moteur. */ +void _g_graph_layout_draw(const GGraphLayout *, cairo_t *, bool); + + + #endif /* _GRAPH_LAYOUT_H */ |