~ubuntu-branches/ubuntu/precise/graphviz/precise-security

« back to all changes in this revision

Viewing changes to cmd/smyrna/gui/gui.h

  • Committer: Bazaar Package Importer
  • Author(s): David Claughton
  • Date: 2010-03-24 22:45:18 UTC
  • mfrom: (1.2.7 upstream) (6.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100324224518-do441tthbqjaqjzd
Tags: 2.26.3-4
Add patch to fix segfault in circo. Backported from upstream snapshot
release.  Thanks to Francis Russell for his work on this.
(Closes: #575255)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: gui.h,v 1.2 2008/03/19 21:43:59 erg Exp $ $Revision: 1.2 $ */
 
1
/* $Id: gui.h,v 1.13 2009/11/03 16:52:33 arif Exp $ $Revision: 1.13 $ */
2
2
/* vim:set shiftwidth=4 ts=8: */
3
3
 
4
4
/**********************************************************
24
24
#include <glade/glade.h>
25
25
#include "callbacks.h"
26
26
#include "cgraph.h"
27
 
 
28
 
 
29
 
 
30
 
 
31
 
 
 
27
#include <agxbuf.h>
32
28
 
33
29
#define MAXIMUM_WIDGET_COUNT    97
34
30
 
 
31
#ifdef __cplusplus
 
32
extern "C" {
 
33
#endif
 
34
 
35
35
//GtkWidget *window1;           //main window
36
 
extern GdkWindow *window1;
37
 
extern GtkWidget *statusbar1;
38
 
 
39
 
extern GladeXML *xml;           //global libglade vars
40
 
extern GtkWidget *gladewidget;
41
 
 
42
 
//1 subgraph 2 node 3 edge
43
 
extern int frmObjectTypeIndex;
44
 
extern Agraph_t *frmObjectg;
45
 
 
46
 
 
47
 
extern GtkComboBox *cbSelectGraph;      //combo at top left
48
 
 
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];
54
 
 
55
 
 
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
65
 
 
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,
70
 
                                      char *attrvalue);
71
 
void change_selected_node_attributes(Agraph_t * g, char *attrname,
72
 
                                     char *attrvalue);
73
 
void change_selected_edge_attributes(Agraph_t * g, char *attrname,
74
 
                                     char *attrvalue);
75
 
char *get_attribute_string_value_from_widget(attribute * att);
 
36
    extern GdkWindow *window1;
 
37
    extern GtkWidget *statusbar1;
 
38
 
 
39
    extern GladeXML *xml;       //global libglade vars
 
40
    extern GtkWidget *gladewidget;
 
41
 
 
42
    extern gve_element frmObjectTypeIndex;
 
43
    extern Agraph_t *frmObjectg;
 
44
 
 
45
    extern GtkComboBox *cbSelectGraph;  //combo at top left
 
46
 
 
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];
 
52
 
 
53
 
 
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
 
63
 
 
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,
 
68
                                          char *attrvalue);
 
69
    void change_selected_node_attributes(Agraph_t * g, char *attrname,
 
70
                                         char *attrvalue);
 
71
    void change_selected_edge_attributes(Agraph_t * g, char *attrname,
 
72
                                         char *attrvalue);
 
73
    char *get_attribute_string_value_from_widget(attribute * att);
76
74
 
77
75
 
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);
81
 
 
82
 
 
83
 
 
84
 
 
85
 
 
86
 
 
87
 
 
88
 
 
 
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);
 
87
 
 
88
#ifdef __cplusplus
 
89
}                               /* end extern "C" */
 
90
#endif
89
91
#endif