gui/graph-displayer.cc
changeset 1440 3d2e3cfb2a6c
parent 1435 8e85e6bbefdf
child 1503 97836166605d
     1.1 --- a/gui/graph-displayer.cc	Thu May 26 16:32:26 2005 +0000
     1.2 +++ b/gui/graph-displayer.cc	Fri May 27 10:34:20 2005 +0000
     1.3 @@ -12,6 +12,9 @@
     1.4  
     1.5  int main(int argc, char *argv[])
     1.6  {
     1.7 +
     1.8 +  //initializing
     1.9 +
    1.10    property_strings=new std::string[PROPERTY_NUM];
    1.11    property_strings[WIDTH]="Width";
    1.12    property_strings[COLOR]="Color";
    1.13 @@ -34,13 +37,14 @@
    1.14  
    1.15    CoordinatesMap cm(g);
    1.16    Graph::EdgeMap<double> cap(g), map1(g), map2(g), map3(g), map4(g);
    1.17 +  Graph::NodeMap<double> nodedata (g);
    1.18  
    1.19    //we create one object to read x coordinates
    1.20    //and one to read y coordinate of nodes and write them to cm NodeMap.
    1.21 -
    1.22    XMap <CoordinatesMap> xreader (cm);
    1.23    YMap <CoordinatesMap> yreader (cm);
    1.24 -  Graph::NodeMap<double> nodedata (g);
    1.25 +
    1.26 +  //reading in graph and its maps
    1.27  
    1.28    std::ifstream is(argv[1]);
    1.29  
    1.30 @@ -55,6 +59,8 @@
    1.31    reader.readEdgeMap("map4", map4);
    1.32    reader.run();
    1.33  
    1.34 +  //initializing MapStorage with the read data
    1.35 +
    1.36    MapStorage ms(g);
    1.37    ms.addNodeMap("data",&nodedata);
    1.38    ms.addEdgeMap("cap",&cap);
    1.39 @@ -63,6 +69,8 @@
    1.40    ms.addEdgeMap("map3",&map3);
    1.41    ms.addEdgeMap("map4",&map4);
    1.42  
    1.43 +  //initializing GUI
    1.44 +
    1.45    Gnome::Canvas::init();
    1.46    Gtk::Main app(argc, argv);
    1.47