graph-displayer.cc
branchgui
changeset 89 4042761b21e3
parent 68 1a27576aa199
child 96 e664d8aa3f72
equal deleted inserted replaced
7:3d54f4ab7560 8:d5456bb394da
     8 
     8 
     9 std::vector <std::string> edge_property_strings;
     9 std::vector <std::string> edge_property_strings;
    10 std::vector <double> edge_property_defaults;
    10 std::vector <double> edge_property_defaults;
    11 std::vector <std::string> node_property_strings;
    11 std::vector <std::string> node_property_strings;
    12 std::vector <double> node_property_defaults;
    12 std::vector <double> node_property_defaults;
    13 
    13 int longest_property_string_length;
    14 
    14 
    15 int main(int argc, char *argv[])
    15 int main(int argc, char *argv[])
    16 {
    16 {
    17 
    17 
    18   //initializing
    18   //initializing
    35   node_property_defaults.resize(NODE_PROPERTY_NUM);
    35   node_property_defaults.resize(NODE_PROPERTY_NUM);
    36   node_property_defaults[N_RADIUS]=20.0;
    36   node_property_defaults[N_RADIUS]=20.0;
    37   node_property_defaults[N_COLOR]=100;
    37   node_property_defaults[N_COLOR]=100;
    38   node_property_defaults[N_TEXT]=0;
    38   node_property_defaults[N_TEXT]=0;
    39 
    39 
       
    40   longest_property_string_length=0;
       
    41   for(int i=0;i<EDGE_PROPERTY_NUM;i++)
       
    42     {
       
    43       int j=edge_property_strings[i].size();
       
    44       if(j>longest_property_string_length)
       
    45 	{
       
    46 	  longest_property_string_length=j;
       
    47 	}
       
    48     }
       
    49   for(int i=0;i<NODE_PROPERTY_NUM;i++)
       
    50     {
       
    51       int j=node_property_strings[i].size();
       
    52       if(j>longest_property_string_length)
       
    53 	{
       
    54 	  longest_property_string_length=j;
       
    55 	}
       
    56     }
       
    57 
       
    58 
    40   //initializing GUI
    59   //initializing GUI
    41 
    60 
    42   Gnome::Canvas::init();
    61   Gnome::Canvas::init();
    43   Gtk::Main app(argc, argv);
    62   Gtk::Main app(argc, argv);
    44 
    63