24
24
#include <glade/glade.h>
25
25
#include "callbacks.h"
26
26
#include "cgraph.h"
33
29
#define MAXIMUM_WIDGET_COUNT 97
35
35
//GtkWidget *window1; //main window
36
extern GdkWindow *window1;
37
extern GtkWidget *statusbar1;
39
extern GladeXML *xml; //global libglade vars
40
extern GtkWidget *gladewidget;
42
//1 subgraph 2 node 3 edge
43
extern int frmObjectTypeIndex;
44
extern Agraph_t *frmObjectg;
47
extern GtkComboBox *cbSelectGraph; //combo at top left
49
extern GtkWidget *AttrWidgets[MAXIMUM_WIDGET_COUNT];
50
extern GtkWidget *AttrLabels[MAXIMUM_WIDGET_COUNT];
51
extern int attr_widgets_modified[MAXIMUM_WIDGET_COUNT];
52
extern int widgetcounter; //number of attributes counted dynamically, might be removed in the future
53
extern attribute attr[MAXIMUM_WIDGET_COUNT];
56
void create_object_properties(); //creates general purpose object properties template
57
void object_properties_node_init(); //customize window for Nodes
58
void object_properties_edge_init(); //customize window for Edges
59
void object_properties_cluster_init(); //customize window for Cluster
60
void object_properties_graph_init(); //customize window for Graph , this shows the graph default values
61
void graph_properties_init(int newgraph); //initialize little open graph dialog
62
GtkComboBox *get_SelectGraph(); //freaking GLADE!!!!!
63
int update_graph_properties(Agraph_t * graph); //updates graph from gui
64
void load_graph_properties(Agraph_t * graph); //load from graph to gui
66
void update_object_properties(int typeIndex, Agraph_t * g); //updates objects from gui(node ,edge, cluster)
67
int load_object_properties(int typeIndex, Agraph_t * g); //load from object to gui;
68
void load_attributes(); //loads attributes from a text file
69
void change_selected_graph_attributes(Agraph_t * g, char *attrname,
71
void change_selected_node_attributes(Agraph_t * g, char *attrname,
73
void change_selected_edge_attributes(Agraph_t * g, char *attrname,
75
char *get_attribute_string_value_from_widget(attribute * att);
36
extern GdkWindow *window1;
37
extern GtkWidget *statusbar1;
39
extern GladeXML *xml; //global libglade vars
40
extern GtkWidget *gladewidget;
42
extern gve_element frmObjectTypeIndex;
43
extern Agraph_t *frmObjectg;
45
extern GtkComboBox *cbSelectGraph; //combo at top left
47
extern GtkWidget *AttrWidgets[MAXIMUM_WIDGET_COUNT];
48
extern GtkWidget *AttrLabels[MAXIMUM_WIDGET_COUNT];
49
extern int attr_widgets_modified[MAXIMUM_WIDGET_COUNT];
50
extern int widgetcounter; //number of attributes counted dynamically, might be removed in the future
51
extern attribute attr[MAXIMUM_WIDGET_COUNT];
54
void create_object_properties(void); //creates general purpose object properties template
55
void object_properties_node_init(void); //customize window for Nodes
56
void object_properties_edge_init(void); //customize window for Edges
57
void object_properties_cluster_init(void); //customize window for Cluster
58
void object_properties_graph_init(void); //customize window for Graph , this shows the graph default values
59
void graph_properties_init(int newgraph); //initialize little open graph dialog
60
GtkComboBox *get_SelectGraph(void); //freaking GLADE!!!!!
61
int update_graph_properties(Agraph_t * graph); //updates graph from gui
62
void load_graph_properties(Agraph_t * graph); //load from graph to gui
64
void update_object_properties(int typeIndex, Agraph_t * g); //updates objects from gui(node ,edge, cluster)
65
int load_object_properties(gve_element typeIndex, Agraph_t * g);
66
void load_attributes(void); //loads attributes from a text file
67
void change_selected_graph_attributes(Agraph_t * g, char *attrname,
69
void change_selected_node_attributes(Agraph_t * g, char *attrname,
71
void change_selected_edge_attributes(Agraph_t * g, char *attrname,
73
char *get_attribute_string_value_from_widget(attribute * att);
78
76
//GTK helpre functions
79
77
//void Color_Widget_bg (int r, int g, int b, GtkWidget *widget); //change background color
80
void Color_Widget_bg(char *colorstring, GtkWidget * widget);
78
void Color_Widget_bg(char *colorstring, GtkWidget * widget);
79
void Color_Widget(char *colorstring, GtkWidget * widget);
80
/*generic warning pop up*/
81
void show_gui_warning(char *str);
82
/*generic open file dialog*/
83
int openfiledlg(int filtercnt, char **filters, agxbuf * xbuf);
84
/*generic save file dialog*/
85
int savefiledlg(int filtercnt, char **filters, agxbuf * xbuf);
86
void append_textview(GtkTextView * textv, const char *s, size_t bytes);
89
} /* end extern "C" */