Redesign parameters can now be saved and loaded.
3 * This file is a part of LEMON, a generic C++ optimization library
5 * Copyright (C) 2003-2006
6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
7 * (Egervary Research Group on Combinatorial Optimization, EGRES).
9 * Permission to use, modify and distribute this software is granted
10 * provided that this copyright notice appears in all copies. For
11 * precise terms see the accompanying LICENSE file.
13 * This software is provided "AS IS" with no warranty of any kind,
14 * express or implied, and with no claim as to its suitability for any
23 #include "all_include.h"
24 #include "mapstorage.h"
26 #include <libgnomecanvasmm.h>
27 #include <libgnomecanvasmm/polygon.h>
33 std::vector <std::string> edge_property_strings;
34 std::vector <double> edge_property_defaults;
35 std::vector <std::string> node_property_strings;
36 std::vector <double> node_property_defaults;
37 int longest_property_string_length;
39 int main(int argc, char *argv[])
41 setlocale(LC_ALL, "");
42 bindtextdomain(PACKAGE, LOCALEDIR);
43 bind_textdomain_codeset(PACKAGE, "UTF-8");
48 edge_property_strings.resize(EDGE_PROPERTY_NUM);
49 edge_property_strings[E_WIDTH]="Edge Width";
50 edge_property_strings[E_COLOR]="Edge Color";
51 edge_property_strings[E_TEXT]="Edge Text";
53 edge_property_defaults.resize(EDGE_PROPERTY_NUM);
54 edge_property_defaults[E_WIDTH]=10.0;
55 edge_property_defaults[E_COLOR]=100;
56 edge_property_defaults[E_TEXT]=0;
58 node_property_strings.resize(NODE_PROPERTY_NUM);
59 node_property_strings[N_RADIUS]="Node Radius";
60 node_property_strings[N_COLOR]="Node Color";
61 node_property_strings[N_TEXT]="Node Text";
63 node_property_defaults.resize(NODE_PROPERTY_NUM);
64 node_property_defaults[N_RADIUS]=20.0;
65 node_property_defaults[N_COLOR]=100;
66 node_property_defaults[N_TEXT]=0;
68 longest_property_string_length=0;
69 for(int i=0;i<EDGE_PROPERTY_NUM;i++)
71 int j=edge_property_strings[i].size();
72 if(j>longest_property_string_length)
74 longest_property_string_length=j;
77 for(int i=0;i<NODE_PROPERTY_NUM;i++)
79 int j=node_property_strings[i].size();
80 if(j>longest_property_string_length)
82 longest_property_string_length=j;
89 Gnome::Canvas::init();
90 Gtk::Main app(argc, argv);
94 // if ((argc == 2) && (Glib::file_test(argv[1], Glib::FILE_TEST_IS_REGULAR)))
96 // mytab.readFile(argv[1]);
100 for(int i=1;i<argc;i++)
102 if(Glib::file_test(argv[i], Glib::FILE_TEST_IS_REGULAR))
104 mytab.readFile(argv[i]);