gui/graph_displayer_canvas-event.cc
changeset 1524 587a823bcdd0
parent 1512 e54392395480
child 1525 6d94de269ab1
     1.1 --- a/gui/graph_displayer_canvas-event.cc	Wed Jun 29 12:52:20 2005 +0000
     1.2 +++ b/gui/graph_displayer_canvas-event.cc	Wed Jun 29 15:41:33 2005 +0000
     1.3 @@ -20,7 +20,7 @@
     1.4  	GdkEvent * generated=new GdkEvent();
     1.5  	generated->type=GDK_BUTTON_RELEASE;
     1.6  	generated->button.button=3;
     1.7 -	create_edge_event_handler(generated);      
     1.8 +	createEdgeEventHandler(generated);      
     1.9      }
    1.10  
    1.11    actual_tool=newtool;
    1.12 @@ -28,20 +28,20 @@
    1.13    switch(newtool)
    1.14      {
    1.15      case MOVE:
    1.16 -      actual_handler=displayed_graph.signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::move_event_handler), false);
    1.17 +      actual_handler=displayed_graph.signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::moveEventHandler), false);
    1.18        break;
    1.19  
    1.20        //it has to assigned to canvas, because all the canvas has to be monitored, not only the elements of the already drawn group
    1.21      case CREATE_NODE:
    1.22 -      actual_handler=signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::create_node_event_handler), false);
    1.23 +      actual_handler=signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::createNodeEventHandler), false);
    1.24        break;
    1.25  
    1.26      case CREATE_EDGE:
    1.27 -      actual_handler=displayed_graph.signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::create_edge_event_handler), false);
    1.28 +      actual_handler=displayed_graph.signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::createEdgeEventHandler), false);
    1.29        break;
    1.30  
    1.31      case ERASER:
    1.32 -      actual_handler=displayed_graph.signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::eraser_event_handler), false);
    1.33 +      actual_handler=displayed_graph.signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::eraserEventHandler), false);
    1.34        break;
    1.35  
    1.36      default:
    1.37 @@ -49,12 +49,12 @@
    1.38      }
    1.39  }
    1.40  
    1.41 -int GraphDisplayerCanvas::get_actual_tool()
    1.42 +int GraphDisplayerCanvas::getActualTool()
    1.43  {
    1.44    return actual_tool;
    1.45  }
    1.46  
    1.47 -bool GraphDisplayerCanvas::move_event_handler(GdkEvent* e)
    1.48 +bool GraphDisplayerCanvas::moveEventHandler(GdkEvent* e)
    1.49  {
    1.50    switch(e->type)
    1.51    {
    1.52 @@ -124,15 +124,15 @@
    1.53  
    1.54  	    if(isbutton==3)
    1.55  	      {
    1.56 -		edgesmap[ei]->set_points(coos);
    1.57 +		edgesmap[ei]->setPoints(coos);
    1.58  	      }
    1.59  	    else
    1.60  	      {
    1.61 -		edgesmap[ei]->set_points(coos,true);
    1.62 +		edgesmap[ei]->setPoints(coos,true);
    1.63  	      }
    1.64  
    1.65  	    //reposition of edgetext
    1.66 -	    xy<double> text_pos=edgesmap[ei]->get_arrow_pos();
    1.67 +	    xy<double> text_pos=edgesmap[ei]->getArrowPos();
    1.68  	    text_pos+=(xy<double>(10,10));
    1.69  	    edgetextmap[ei]->property_x().set_value(text_pos.x);
    1.70  	    edgetextmap[ei]->property_y().set_value(text_pos.y);
    1.71 @@ -152,14 +152,14 @@
    1.72  
    1.73  	    if(isbutton==3)
    1.74  	      {
    1.75 -		edgesmap[ei]->set_points(coos);
    1.76 +		edgesmap[ei]->setPoints(coos);
    1.77  	      }
    1.78  	    else
    1.79  	      {
    1.80 -		edgesmap[ei]->set_points(coos,true);
    1.81 +		edgesmap[ei]->setPoints(coos,true);
    1.82  	      }
    1.83  
    1.84 -	    xy<double> text_pos=edgesmap[ei]->get_arrow_pos();
    1.85 +	    xy<double> text_pos=edgesmap[ei]->getArrowPos();
    1.86  	    text_pos+=(xy<double>(10,10));
    1.87  	    edgetextmap[ei]->property_x().set_value(text_pos.x);
    1.88  	    edgetextmap[ei]->property_y().set_value(text_pos.y);
    1.89 @@ -171,7 +171,7 @@
    1.90    return true;
    1.91  }
    1.92  
    1.93 -bool GraphDisplayerCanvas::create_node_event_handler(GdkEvent* e)
    1.94 +bool GraphDisplayerCanvas::createNodeEventHandler(GdkEvent* e)
    1.95  {
    1.96    switch(e->type)
    1.97      {
    1.98 @@ -196,7 +196,7 @@
    1.99        nodetextmap[active_node]=new Gnome::Canvas::Text(displayed_graph, clicked_x+node_property_defaults[N_RADIUS]+5, clicked_y+node_property_defaults[N_RADIUS]+5, "");
   1.100        nodetextmap[active_node]->property_fill_color().set_value("darkblue");
   1.101  
   1.102 -      mapwin->update_node(active_node);
   1.103 +      mapwin->updateNode(active_node);
   1.104  
   1.105        break;
   1.106  
   1.107 @@ -209,7 +209,7 @@
   1.108  	generated->motion.x=world_motion_x;
   1.109  	generated->motion.y=world_motion_y;
   1.110  	generated->type=GDK_MOTION_NOTIFY;
   1.111 -	move_event_handler(generated);      
   1.112 +	moveEventHandler(generated);      
   1.113  	break;
   1.114        }
   1.115  
   1.116 @@ -227,7 +227,7 @@
   1.117    return false;
   1.118  }
   1.119  
   1.120 -bool GraphDisplayerCanvas::create_edge_event_handler(GdkEvent* e)
   1.121 +bool GraphDisplayerCanvas::createEdgeEventHandler(GdkEvent* e)
   1.122  {
   1.123    switch(e->type)
   1.124      {
   1.125 @@ -289,7 +289,7 @@
   1.126  		      active_edge=EdgeIt(g,g.addEdge(active_node, target_node));
   1.127  
   1.128  		      //initiating values corresponding to new edge in maps
   1.129 -		      mapstorage.init_maps_for_edge(active_edge);
   1.130 +		      mapstorage.initMapsForEdge(active_edge);
   1.131  	  
   1.132  		      //calculating coordinates of new edge
   1.133  		      Gnome::Canvas::Points coos;
   1.134 @@ -311,14 +311,14 @@
   1.135  		      active_item->raise_to_top();
   1.136  
   1.137  		      //initializing edge-text as well, to empty string
   1.138 -		      xy<double> text_pos=edgesmap[active_edge]->get_arrow_pos();
   1.139 +		      xy<double> text_pos=edgesmap[active_edge]->getArrowPos();
   1.140  		      text_pos+=(xy<double>(10,10));
   1.141  
   1.142  		      edgetextmap[active_edge]=new Gnome::Canvas::Text(displayed_graph, text_pos.x, text_pos.y, "");
   1.143  		      edgetextmap[active_edge]->property_fill_color().set_value("darkgreen");
   1.144  
   1.145  		      //updating its properties
   1.146 -		      mapwin->update_edge(active_edge);
   1.147 +		      mapwin->updateEdge(active_edge);
   1.148  		    }
   1.149  		  else
   1.150  		    {
   1.151 @@ -361,7 +361,7 @@
   1.152    return false;
   1.153  }
   1.154  
   1.155 -bool GraphDisplayerCanvas::eraser_event_handler(GdkEvent* e)
   1.156 +bool GraphDisplayerCanvas::eraserEventHandler(GdkEvent* e)
   1.157  {
   1.158    switch(e->type)
   1.159      {
   1.160 @@ -414,14 +414,14 @@
   1.161  	      //deleting collected edges
   1.162  	      for(std::set<Graph::Edge>::iterator edge_set_it=edges_to_delete.begin();edge_set_it!=edges_to_delete.end();edge_set_it++)
   1.163  		{
   1.164 -		  delete_item(*edge_set_it);
   1.165 +		  deleteItem(*edge_set_it);
   1.166  		}
   1.167 -	      delete_item(active_node);
   1.168 +	      deleteItem(active_node);
   1.169  	    }
   1.170  	  //a simple edge was chosen
   1.171  	  else
   1.172  	    {
   1.173 -	      delete_item(active_edge);
   1.174 +	      deleteItem(active_edge);
   1.175  	    }
   1.176  
   1.177  	  
   1.178 @@ -453,35 +453,35 @@
   1.179    return true;
   1.180  }
   1.181  
   1.182 -void GraphDisplayerCanvas::delete_item(NodeIt node_to_delete)
   1.183 +void GraphDisplayerCanvas::deleteItem(NodeIt node_to_delete)
   1.184  {
   1.185    delete(nodetextmap[node_to_delete]);
   1.186    delete(nodesmap[node_to_delete]);
   1.187    g.erase(node_to_delete);
   1.188  }
   1.189  
   1.190 -void GraphDisplayerCanvas::delete_item(EdgeIt edge_to_delete)
   1.191 +void GraphDisplayerCanvas::deleteItem(EdgeIt edge_to_delete)
   1.192  {
   1.193    delete(edgetextmap[edge_to_delete]);
   1.194    delete(edgesmap[edge_to_delete]);
   1.195    g.erase(edge_to_delete);
   1.196  }
   1.197  
   1.198 -void GraphDisplayerCanvas::delete_item(Graph::Edge edge_to_delete)
   1.199 +void GraphDisplayerCanvas::deleteItem(Graph::Edge edge_to_delete)
   1.200  {
   1.201    delete(edgetextmap[edge_to_delete]);
   1.202    delete(edgesmap[edge_to_delete]);
   1.203    g.erase(edge_to_delete);
   1.204  }
   1.205  
   1.206 -void GraphDisplayerCanvas::text_reposition(xy<double> new_place)
   1.207 +void GraphDisplayerCanvas::textReposition(xy<double> new_place)
   1.208  {
   1.209    new_place+=(xy<double>(10,10));
   1.210    edgetextmap[active_edge]->property_x().set_value(new_place.x);
   1.211    edgetextmap[active_edge]->property_y().set_value(new_place.y);
   1.212  }
   1.213  
   1.214 -void GraphDisplayerCanvas::toggle_edge_activity(BrokenEdge* active_bre, bool on)
   1.215 +void GraphDisplayerCanvas::toggleEdgeActivity(BrokenEdge* active_bre, bool on)
   1.216  {
   1.217    if(on)
   1.218      {