4 #include <libgnomecanvasmm.h> |
4 #include <libgnomecanvasmm.h> |
5 #include <libgnomecanvasmm/polygon.h> |
5 #include <libgnomecanvasmm/polygon.h> |
6 |
6 |
7 #define MAIN_PART |
7 #define MAIN_PART |
8 |
8 |
9 std::vector <std::string> property_strings; |
9 std::vector <std::string> edge_property_strings; |
10 std::vector <double> property_defaults; |
10 std::vector <double> edge_property_defaults; |
|
11 std::vector <std::string> node_property_strings; |
|
12 std::vector <double> node_property_defaults; |
11 |
13 |
12 |
14 |
13 int main(int argc, char *argv[]) |
15 int main(int argc, char *argv[]) |
14 { |
16 { |
15 |
17 |
16 //initializing |
18 //initializing |
17 |
19 |
18 property_strings.resize(PROPERTY_NUM); |
20 edge_property_strings.resize(EDGE_PROPERTY_NUM); |
19 property_strings[WIDTH]="Width"; |
21 edge_property_strings[E_WIDTH]="Edge Width"; |
20 property_strings[COLOR]="Color"; |
22 edge_property_strings[E_COLOR]="Edge Color"; |
21 property_strings[TEXT]="Text"; |
23 edge_property_strings[E_TEXT]="Edge Text"; |
22 |
24 |
23 property_defaults.resize(PROPERTY_NUM); |
25 edge_property_defaults.resize(EDGE_PROPERTY_NUM); |
24 property_defaults[WIDTH]=10.0; |
26 edge_property_defaults[E_WIDTH]=10.0; |
25 property_defaults[COLOR]=100; |
27 edge_property_defaults[E_COLOR]=100; |
26 property_defaults[TEXT]=0; |
28 edge_property_defaults[E_TEXT]=0; |
|
29 |
|
30 node_property_strings.resize(NODE_PROPERTY_NUM); |
|
31 node_property_strings[N_RADIUS]="Node Radius"; |
|
32 node_property_strings[N_COLOR]="Node Color"; |
|
33 node_property_strings[N_TEXT]="Node Text"; |
|
34 |
|
35 node_property_defaults.resize(NODE_PROPERTY_NUM); |
|
36 node_property_defaults[N_RADIUS]=20.0; |
|
37 node_property_defaults[N_COLOR]=100; |
|
38 node_property_defaults[N_TEXT]=0; |
27 |
39 |
28 if(argc<2) |
40 if(argc<2) |
29 { |
41 { |
30 std::cerr << "USAGE: gd <input filename.lgf>" << std::endl; |
42 std::cerr << "USAGE: gd <input filename.lgf>" << std::endl; |
31 return 0; |
43 return 0; |