COIN-OR::LEMON - Graph Library

Changeset 33:8dc87bc15ec5 in glemon-0.x


Ignore:
Timestamp:
07/12/05 23:45:39 (14 years ago)
Author:
Hegyi Péter
Branch:
gui
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk/gui@2047
Message:

Developing of edgemap editing is started.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • graph_displayer_canvas-event.cc

    r32 r33  
    2525
    2626  actual_tool=newtool;
     27
     28  active_item=NULL;
     29  target_item=NULL;
     30  active_edge=INVALID; 
     31  active_node=INVALID; 
    2732
    2833  switch(newtool)
     
    499504            }
    500505        }
    501       if(active_edge!=INVALID)
     506      if((active_edge!=INVALID)&&(edgetextmap[active_edge]->property_text().get_value()!=""))
    502507        {
    503508          if(canvasentrywidget)
     
    506511            }
    507512          entrywidget.show();
    508           entrywidget.set_text("Hello!");
    509           //      canvasentrywidget=new Gnome::Canvas::Widget(displayed_graph, clicked_x, clicked_y,entrywidget);
    510           canvasentrywidget=new Gnome::Canvas::Widget(displayed_graph, e->button.x, e->button.y, entrywidget);
    511           canvasentrywidget->property_width().set_value(70);
    512           canvasentrywidget->property_height().set_value(50);
    513           canvasentrywidget->show();
    514           *(edgesmap[active_edge]) << Gnome::Canvas::Properties::fill_color("red");
    515         }
    516       active_item=NULL;         // !!!!!!!!!!!!!!!!!!!!!!!!!!!
    517       active_edge=INVALID;      // !!!!!!!!!!!!!!!!!!!!!!!!!!!
     513          entrywidget.set_text(edgetextmap[active_edge]->property_text().get_value());
     514          xy<double> entry_coos;
     515          entry_coos.x=(edgetextmap[active_edge])->property_x().get_value();
     516          entry_coos.x-=edgetextmap[active_edge]->property_text_width().get_value()/2;
     517          entry_coos.y=(edgetextmap[active_edge])->property_y().get_value();
     518          entry_coos.y-=edgetextmap[active_edge]->property_text_height().get_value()*1.5/2;
     519          canvasentrywidget=new Gnome::Canvas::Widget(displayed_graph, entry_coos.x, entry_coos.y, entrywidget);
     520          canvasentrywidget->property_width().set_value(edgetextmap[active_edge]->property_text_width().get_value()*1.5);
     521          canvasentrywidget->property_height().set_value(edgetextmap[active_edge]->property_text_height().get_value()*1.5);
     522        }
    518523      break;
    519524    default:
Note: See TracChangeset for help on using the changeset viewer.