COIN-OR::LEMON - Graph Library

Changeset 62:80eefca04b1e in glemon-0.x for graph_displayer_canvas-event.cc


Ignore:
Timestamp:
08/18/05 15:33:49 (15 years ago)
Author:
Alpar Juttner
Branch:
gui
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk/gui@2156
Message:
  • The number of gcc-4.0 warnings has significantly decreases.
  • Some code clean-up in gui
File:
1 edited

Legend:

Unmodified
Added
Removed
  • graph_displayer_canvas-event.cc

    r59 r62  
    226226      isbutton=1;
    227227
    228       active_node=NodeIt(mapstorage.graph,mapstorage.graph.addNode());
     228      active_node=mapstorage.graph.addNode();
    229229
    230230      //initiating values corresponding to new node in maps
     
    340340              window_to_world (e->button.x, e->button.y, clicked_x, clicked_y);
    341341              target_item=(get_item_at(clicked_x, clicked_y));
    342               Graph::NodeIt target_node=INVALID;
     342              Node target_node=INVALID;
    343343              for (NodeIt i(mapstorage.graph); i!=INVALID; ++i)
    344344                {
     
    355355          mapstorage.modified = true;
    356356
    357                       *(nodesmap[target_node]) << Gnome::Canvas::Properties::fill_color("red");
     357                      *(nodesmap[target_node]) <<
     358                        Gnome::Canvas::Properties::fill_color("red");
    358359
    359360                      //creating new edge
    360                       active_edge=EdgeIt(mapstorage.graph,mapstorage.graph.addEdge(active_node, target_node));
     361                      active_edge=mapstorage.graph.addEdge(active_node,
     362                                                           target_node);
    361363
    362364                      //initiating values corresponding to new edge in maps
    363365                      mapstorage.initMapsForEdge(active_edge);
    364                       (*mapstorage.edgemap_storage["id"])[active_edge] = mapstorage.graph.id(active_edge);
     366                      (*mapstorage.edgemap_storage["id"])[active_edge] =
     367                        mapstorage.graph.id(active_edge);
    365368         
    366369                      //calculating coordinates of new edge
     
    556559          {
    557560            //for determine, whether it was an edge
    558             Graph::EdgeIt clicked_edge=INVALID;
     561            Edge clicked_edge=INVALID;
    559562
    560563            //find the activated item between texts
     
    678681          {
    679682            //for determine, whether it was a node
    680             Graph::NodeIt clicked_node=INVALID;
     683            Node clicked_node=INVALID;
    681684
    682685            //find the activated item between texts
     
    850853}
    851854
    852 void GraphDisplayerCanvas::deleteItem(NodeIt node_to_delete)
     855void GraphDisplayerCanvas::deleteItem(Node node_to_delete)
    853856{
    854857  delete(nodetextmap[node_to_delete]);
     
    857860}
    858861
    859 void GraphDisplayerCanvas::deleteItem(EdgeIt edge_to_delete)
     862void GraphDisplayerCanvas::deleteItem(Edge edge_to_delete)
    860863{
    861864  delete(edgetextmap[edge_to_delete]);
     
    864867}
    865868
    866 void GraphDisplayerCanvas::deleteItem(Graph::Edge edge_to_delete)
    867 {
    868   delete(edgetextmap[edge_to_delete]);
    869   delete(edgesmap[edge_to_delete]);
    870   mapstorage.graph.erase(edge_to_delete);
    871 }
    872 
    873869void GraphDisplayerCanvas::textReposition(xy<double> new_place)
    874870{
Note: See TracChangeset for help on using the changeset viewer.