ladanyi@53: #include "all_include.h" ladanyi@53: #include "mapstorage.h" ladanyi@53: #include "main_win.h" ladanyi@1: #include ladanyi@1: #include ladanyi@1: ladanyi@1: #define MAIN_PART ladanyi@1: hegyi@28: std::vector edge_property_strings; hegyi@28: std::vector edge_property_defaults; hegyi@28: std::vector node_property_strings; hegyi@28: std::vector node_property_defaults; ladanyi@1: ladanyi@1: ladanyi@1: int main(int argc, char *argv[]) ladanyi@1: { hegyi@4: hegyi@4: //initializing hegyi@4: hegyi@28: edge_property_strings.resize(EDGE_PROPERTY_NUM); hegyi@28: edge_property_strings[E_WIDTH]="Edge Width"; hegyi@28: edge_property_strings[E_COLOR]="Edge Color"; hegyi@28: edge_property_strings[E_TEXT]="Edge Text"; ladanyi@1: hegyi@28: edge_property_defaults.resize(EDGE_PROPERTY_NUM); hegyi@28: edge_property_defaults[E_WIDTH]=10.0; hegyi@28: edge_property_defaults[E_COLOR]=100; hegyi@28: edge_property_defaults[E_TEXT]=0; hegyi@28: hegyi@28: node_property_strings.resize(NODE_PROPERTY_NUM); hegyi@28: node_property_strings[N_RADIUS]="Node Radius"; hegyi@28: node_property_strings[N_COLOR]="Node Color"; hegyi@28: node_property_strings[N_TEXT]="Node Text"; hegyi@28: hegyi@28: node_property_defaults.resize(NODE_PROPERTY_NUM); hegyi@28: node_property_defaults[N_RADIUS]=20.0; hegyi@28: node_property_defaults[N_COLOR]=100; hegyi@28: node_property_defaults[N_TEXT]=0; ladanyi@1: hegyi@4: //initializing GUI hegyi@4: ladanyi@1: Gnome::Canvas::init(); ladanyi@1: Gtk::Main app(argc, argv); ladanyi@1: ladanyi@53: MainWin mainwin("Displayed Graph"); ladanyi@57: ladanyi@57: if ((argc == 2) && (Glib::file_test(argv[1], Glib::FILE_TEST_IS_REGULAR))) ladanyi@57: { ladanyi@57: mainwin.readFile(argv[1]); ladanyi@57: } ladanyi@57: ladanyi@1: app.run(mainwin); ladanyi@1: ladanyi@1: return 0; ladanyi@1: }