COIN-OR::LEMON - Graph Library

Changeset 30:f70bbee5350a in glemon-0.x for graph_displayer_canvas-event.cc


Ignore:
Timestamp:
06/29/05 17:41:33 (15 years ago)
Author:
Hegyi Péter
Branch:
gui
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk/gui@2010
Message:

Function names are corrected according to naming conventions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • graph_displayer_canvas-event.cc

    r28 r30  
    2121        generated->type=GDK_BUTTON_RELEASE;
    2222        generated->button.button=3;
    23         create_edge_event_handler(generated);     
     23        createEdgeEventHandler(generated);     
    2424    }
    2525
     
    2929    {
    3030    case MOVE:
    31       actual_handler=displayed_graph.signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::move_event_handler), false);
     31      actual_handler=displayed_graph.signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::moveEventHandler), false);
    3232      break;
    3333
    3434      //it has to assigned to canvas, because all the canvas has to be monitored, not only the elements of the already drawn group
    3535    case CREATE_NODE:
    36       actual_handler=signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::create_node_event_handler), false);
     36      actual_handler=signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::createNodeEventHandler), false);
    3737      break;
    3838
    3939    case CREATE_EDGE:
    40       actual_handler=displayed_graph.signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::create_edge_event_handler), false);
     40      actual_handler=displayed_graph.signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::createEdgeEventHandler), false);
    4141      break;
    4242
    4343    case ERASER:
    44       actual_handler=displayed_graph.signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::eraser_event_handler), false);
     44      actual_handler=displayed_graph.signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::eraserEventHandler), false);
    4545      break;
    4646
     
    5050}
    5151
    52 int GraphDisplayerCanvas::get_actual_tool()
     52int GraphDisplayerCanvas::getActualTool()
    5353{
    5454  return actual_tool;
    5555}
    5656
    57 bool GraphDisplayerCanvas::move_event_handler(GdkEvent* e)
     57bool GraphDisplayerCanvas::moveEventHandler(GdkEvent* e)
    5858{
    5959  switch(e->type)
     
    125125            if(isbutton==3)
    126126              {
    127                 edgesmap[ei]->set_points(coos);
     127                edgesmap[ei]->setPoints(coos);
    128128              }
    129129            else
    130130              {
    131                 edgesmap[ei]->set_points(coos,true);
     131                edgesmap[ei]->setPoints(coos,true);
    132132              }
    133133
    134134            //reposition of edgetext
    135             xy<double> text_pos=edgesmap[ei]->get_arrow_pos();
     135            xy<double> text_pos=edgesmap[ei]->getArrowPos();
    136136            text_pos+=(xy<double>(10,10));
    137137            edgetextmap[ei]->property_x().set_value(text_pos.x);
     
    153153            if(isbutton==3)
    154154              {
    155                 edgesmap[ei]->set_points(coos);
     155                edgesmap[ei]->setPoints(coos);
    156156              }
    157157            else
    158158              {
    159                 edgesmap[ei]->set_points(coos,true);
     159                edgesmap[ei]->setPoints(coos,true);
    160160              }
    161161
    162             xy<double> text_pos=edgesmap[ei]->get_arrow_pos();
     162            xy<double> text_pos=edgesmap[ei]->getArrowPos();
    163163            text_pos+=(xy<double>(10,10));
    164164            edgetextmap[ei]->property_x().set_value(text_pos.x);
     
    172172}
    173173
    174 bool GraphDisplayerCanvas::create_node_event_handler(GdkEvent* e)
     174bool GraphDisplayerCanvas::createNodeEventHandler(GdkEvent* e)
    175175{
    176176  switch(e->type)
     
    197197      nodetextmap[active_node]->property_fill_color().set_value("darkblue");
    198198
    199       mapwin->update_node(active_node);
     199      mapwin->updateNode(active_node);
    200200
    201201      break;
     
    210210        generated->motion.y=world_motion_y;
    211211        generated->type=GDK_MOTION_NOTIFY;
    212         move_event_handler(generated);     
     212        moveEventHandler(generated);     
    213213        break;
    214214      }
     
    228228}
    229229
    230 bool GraphDisplayerCanvas::create_edge_event_handler(GdkEvent* e)
     230bool GraphDisplayerCanvas::createEdgeEventHandler(GdkEvent* e)
    231231{
    232232  switch(e->type)
     
    290290
    291291                      //initiating values corresponding to new edge in maps
    292                       mapstorage.init_maps_for_edge(active_edge);
     292                      mapstorage.initMapsForEdge(active_edge);
    293293         
    294294                      //calculating coordinates of new edge
     
    312312
    313313                      //initializing edge-text as well, to empty string
    314                       xy<double> text_pos=edgesmap[active_edge]->get_arrow_pos();
     314                      xy<double> text_pos=edgesmap[active_edge]->getArrowPos();
    315315                      text_pos+=(xy<double>(10,10));
    316316
     
    319319
    320320                      //updating its properties
    321                       mapwin->update_edge(active_edge);
     321                      mapwin->updateEdge(active_edge);
    322322                    }
    323323                  else
     
    362362}
    363363
    364 bool GraphDisplayerCanvas::eraser_event_handler(GdkEvent* e)
     364bool GraphDisplayerCanvas::eraserEventHandler(GdkEvent* e)
    365365{
    366366  switch(e->type)
     
    415415              for(std::set<Graph::Edge>::iterator edge_set_it=edges_to_delete.begin();edge_set_it!=edges_to_delete.end();edge_set_it++)
    416416                {
    417                   delete_item(*edge_set_it);
    418                 }
    419               delete_item(active_node);
     417                  deleteItem(*edge_set_it);
     418                }
     419              deleteItem(active_node);
    420420            }
    421421          //a simple edge was chosen
    422422          else
    423423            {
    424               delete_item(active_edge);
     424              deleteItem(active_edge);
    425425            }
    426426
     
    454454}
    455455
    456 void GraphDisplayerCanvas::delete_item(NodeIt node_to_delete)
     456void GraphDisplayerCanvas::deleteItem(NodeIt node_to_delete)
    457457{
    458458  delete(nodetextmap[node_to_delete]);
     
    461461}
    462462
    463 void GraphDisplayerCanvas::delete_item(EdgeIt edge_to_delete)
     463void GraphDisplayerCanvas::deleteItem(EdgeIt edge_to_delete)
    464464{
    465465  delete(edgetextmap[edge_to_delete]);
     
    468468}
    469469
    470 void GraphDisplayerCanvas::delete_item(Graph::Edge edge_to_delete)
     470void GraphDisplayerCanvas::deleteItem(Graph::Edge edge_to_delete)
    471471{
    472472  delete(edgetextmap[edge_to_delete]);
     
    475475}
    476476
    477 void GraphDisplayerCanvas::text_reposition(xy<double> new_place)
     477void GraphDisplayerCanvas::textReposition(xy<double> new_place)
    478478{
    479479  new_place+=(xy<double>(10,10));
     
    482482}
    483483
    484 void GraphDisplayerCanvas::toggle_edge_activity(BrokenEdge* active_bre, bool on)
     484void GraphDisplayerCanvas::toggleEdgeActivity(BrokenEdge* active_bre, bool on)
    485485{
    486486  if(on)
Note: See TracChangeset for help on using the changeset viewer.