/[paths]/src/egg_view.h
ViewVC logotype

Contents of /src/egg_view.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 70 - (show annotations)
Sun Aug 26 18:24:39 2012 UTC (6 years, 10 months ago) by ben
File MIME type: text/plain
File size: 1327 byte(s)
working with force-directed algorithm
1 #ifndef EGG_VIEW_H
2 #define EGG_VIEW_H
3
4 #include <gtk/gtk.h>
5 #include "graph.h"
6 #include "egg_node.h"
7 #include "egg_link.h"
8
9 #define VIEW_WIDTH 1024
10 #define VIEW_HEIGHT 768
11
12 /* object definition */
13 struct _EggView
14 {
15 GtkLayout parent;
16
17 /* private */
18 struct graph *graph; /* reference to the backend */
19
20 EggNode **nodes; /* reference array to displayed nodes */
21 EggLink **links; /* reference array to displayed links */
22
23 EggNode *clicked; /* reference of last clicked node */
24 GtkWidget *menu; /* reference to the menu for node */
25
26 gboolean completed;
27 gboolean populated;
28 };
29
30 /* object class definition */
31 struct _EggViewClass
32 {
33 GtkLayoutClass parent_class;
34 };
35
36
37 typedef struct _EggView EggView;
38 typedef struct _EggViewClass EggViewClass;
39
40 /* public api */
41 GtkWidget *egg_view_new(void);
42
43 void egg_view_populate(EggView *view, struct graph *graph);
44
45 #define EGG_TYPE_VIEW (egg_view_get_type ())
46 #define EGG_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_VIEW, EggView))
47 #define EGG_VIEW_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), EGG_VIEW, EggViewClass))
48 #define EGG_IS_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_VIEW))
49 #define EGG_IS_VIEW_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), EGG_TYPE_VIEW))
50 #define EGG_VIEW_GET_CLASS (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_VIEW, EggViewClass))
51
52 #endif

  ViewVC Help
Powered by ViewVC 1.1.26