hegyi@1: /* -*- C++ -*- hegyi@1: * hegyi@1: * This file is a part of LEMON, a generic C++ optimization library hegyi@1: * hegyi@1: * Copyright (C) 2003-2006 hegyi@1: * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport hegyi@1: * (Egervary Research Group on Combinatorial Optimization, EGRES). hegyi@1: * hegyi@1: * Permission to use, modify and distribute this software is granted hegyi@1: * provided that this copyright notice appears in all copies. For hegyi@1: * precise terms see the accompanying LICENSE file. hegyi@1: * hegyi@1: * This software is provided "AS IS" with no warranty of any kind, hegyi@1: * express or implied, and with no claim as to its suitability for any hegyi@1: * purpose. hegyi@1: * hegyi@1: */ hegyi@1: hegyi@1: #ifdef HAVE_CONFIG_H hegyi@1: #include hegyi@1: #endif hegyi@1: hegyi@1: #include "all_include.h" hegyi@1: #include "main_win.h" hegyi@1: #include hegyi@1: #include hegyi@1: ladanyi@5: #include "gettext.h" hegyi@1: hegyi@1: #define MAIN_PART hegyi@1: hegyi@1: std::vector arc_property_strings; hegyi@1: std::vector arc_property_defaults; hegyi@1: std::vector node_property_strings; hegyi@1: std::vector node_property_defaults; hegyi@1: int longest_property_string_length; hegyi@1: hegyi@1: int main(int argc, char *argv[]) hegyi@1: { hegyi@1: setlocale(LC_ALL, ""); hegyi@1: bindtextdomain(PACKAGE, LOCALEDIR); hegyi@1: bind_textdomain_codeset(PACKAGE, "UTF-8"); hegyi@1: textdomain(PACKAGE); hegyi@1: hegyi@1: //initializing hegyi@1: hegyi@1: arc_property_strings.resize(EDGE_PROPERTY_NUM); hegyi@1: arc_property_strings[E_WIDTH]="Arc Width"; hegyi@1: arc_property_strings[E_COLOR]="Arc Color"; hegyi@1: arc_property_strings[E_TEXT]="Arc Text"; hegyi@1: hegyi@1: arc_property_defaults.resize(EDGE_PROPERTY_NUM); hegyi@1: arc_property_defaults[E_WIDTH]=10.0; hegyi@1: arc_property_defaults[E_COLOR]=100; hegyi@1: arc_property_defaults[E_TEXT]=0; hegyi@1: hegyi@1: node_property_strings.resize(NODE_PROPERTY_NUM); hegyi@1: node_property_strings[N_RADIUS]="Node Radius"; hegyi@1: node_property_strings[N_COLOR]="Node Color"; hegyi@1: node_property_strings[N_TEXT]="Node Text"; hegyi@1: hegyi@1: node_property_defaults.resize(NODE_PROPERTY_NUM); hegyi@1: node_property_defaults[N_RADIUS]=20.0; hegyi@1: node_property_defaults[N_COLOR]=100; hegyi@1: node_property_defaults[N_TEXT]=0; hegyi@1: hegyi@1: longest_property_string_length=0; hegyi@1: for(int i=0;ilongest_property_string_length) hegyi@1: { hegyi@1: longest_property_string_length=j; hegyi@1: } hegyi@1: } hegyi@1: for(int i=0;ilongest_property_string_length) hegyi@1: { hegyi@1: longest_property_string_length=j; hegyi@1: } hegyi@1: } hegyi@1: hegyi@1: hegyi@1: //initializing GUI hegyi@1: hegyi@1: Gnome::Canvas::init(); hegyi@1: Gtk::Main app(argc, argv); hegyi@1: hegyi@1: MainWin mytab; hegyi@1: hegyi@1: // if ((argc == 2) && (Glib::file_test(argv[1], Glib::FILE_TEST_IS_REGULAR))) hegyi@1: // { hegyi@1: // mytab.readFile(argv[1]); hegyi@1: // } hegyi@1: if(argc>=2) hegyi@1: { hegyi@1: for(int i=1;i