1.1 --- a/graph-displayer.cc Thu Oct 06 12:32:06 2005 +0000
1.2 +++ b/graph-displayer.cc Thu Oct 20 15:50:23 2005 +0000
1.3 @@ -10,7 +10,7 @@
1.4 std::vector <double> edge_property_defaults;
1.5 std::vector <std::string> node_property_strings;
1.6 std::vector <double> node_property_defaults;
1.7 -
1.8 +int longest_property_string_length;
1.9
1.10 int main(int argc, char *argv[])
1.11 {
1.12 @@ -37,6 +37,25 @@
1.13 node_property_defaults[N_COLOR]=100;
1.14 node_property_defaults[N_TEXT]=0;
1.15
1.16 + longest_property_string_length=0;
1.17 + for(int i=0;i<EDGE_PROPERTY_NUM;i++)
1.18 + {
1.19 + int j=edge_property_strings[i].size();
1.20 + if(j>longest_property_string_length)
1.21 + {
1.22 + longest_property_string_length=j;
1.23 + }
1.24 + }
1.25 + for(int i=0;i<NODE_PROPERTY_NUM;i++)
1.26 + {
1.27 + int j=node_property_strings[i].size();
1.28 + if(j>longest_property_string_length)
1.29 + {
1.30 + longest_property_string_length=j;
1.31 + }
1.32 + }
1.33 +
1.34 +
1.35 //initializing GUI
1.36
1.37 Gnome::Canvas::init();