1
/* $Id: gui.h,v 1.1 2008/03/03 15:37:41 arif Exp $ $Revision: 1.1 $ */
2
/* vim:set shiftwidth=4 ts=8: */
4
/**********************************************************
5
* This software is part of the graphviz package *
6
* http://www.graphviz.org/ *
8
* Copyright (c) 1994-2004 AT&T Corp. *
9
* and is licensed under the *
10
* Common Public License, Version 1.0 *
13
* Information and Software Systems Research *
14
* AT&T Research, Florham Park NJ *
15
**********************************************************/
20
#include "smyrnadefs.h"
22
#include <gdk/gdkkeysyms.h>
23
#include <gtk/gtkgl.h>
24
#include <glade/glade.h>
25
#include "callbacks.h"
33
#define MAXIMUM_WIDGET_COUNT 97
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,char* attrvalue);
70
void change_selected_node_attributes (Agraph_t* g,char* attrname,char* attrvalue);
71
void change_selected_edge_attributes (Agraph_t* g,char* attrname,char* attrvalue);
72
char* get_attribute_string_value_from_widget(attribute* att);
75
//GTK helpre functions
76
//void Color_Widget_bg (int r, int g, int b, GtkWidget *widget); //change background color
77
void Color_Widget_bg (char* colorstring, GtkWidget *widget);