Slight changes in doc.
5 #include "all_include.h"
6 #include "mapstorage.h"
8 #include <libgnomecanvasmm.h>
9 #include <libgnomecanvasmm/polygon.h>
15 std::vector <std::string> edge_property_strings;
16 std::vector <double> edge_property_defaults;
17 std::vector <std::string> node_property_strings;
18 std::vector <double> node_property_defaults;
19 int longest_property_string_length;
21 int main(int argc, char *argv[])
23 setlocale(LC_ALL, "");
24 bindtextdomain(PACKAGE, LOCALEDIR);
25 bind_textdomain_codeset(PACKAGE, "UTF-8");
30 edge_property_strings.resize(EDGE_PROPERTY_NUM);
31 edge_property_strings[E_WIDTH]="Edge Width";
32 edge_property_strings[E_COLOR]="Edge Color";
33 edge_property_strings[E_TEXT]="Edge Text";
35 edge_property_defaults.resize(EDGE_PROPERTY_NUM);
36 edge_property_defaults[E_WIDTH]=10.0;
37 edge_property_defaults[E_COLOR]=100;
38 edge_property_defaults[E_TEXT]=0;
40 node_property_strings.resize(NODE_PROPERTY_NUM);
41 node_property_strings[N_RADIUS]="Node Radius";
42 node_property_strings[N_COLOR]="Node Color";
43 node_property_strings[N_TEXT]="Node Text";
45 node_property_defaults.resize(NODE_PROPERTY_NUM);
46 node_property_defaults[N_RADIUS]=20.0;
47 node_property_defaults[N_COLOR]=100;
48 node_property_defaults[N_TEXT]=0;
50 longest_property_string_length=0;
51 for(int i=0;i<EDGE_PROPERTY_NUM;i++)
53 int j=edge_property_strings[i].size();
54 if(j>longest_property_string_length)
56 longest_property_string_length=j;
59 for(int i=0;i<NODE_PROPERTY_NUM;i++)
61 int j=node_property_strings[i].size();
62 if(j>longest_property_string_length)
64 longest_property_string_length=j;
71 Gnome::Canvas::init();
72 Gtk::Main app(argc, argv);
76 // if ((argc == 2) && (Glib::file_test(argv[1], Glib::FILE_TEST_IS_REGULAR)))
78 // mytab.readFile(argv[1]);
82 for(int i=1;i<argc;i++)
84 if(Glib::file_test(argv[i], Glib::FILE_TEST_IS_REGULAR))
86 mytab.readFile(argv[i]);