# HG changeset patch # User hegyi # Date 1122561092 0 # Node ID 739df601808d40a7c7517161aa74dd5e5aa4f33f # Parent 15b51d278bf0e9527ed3918e8b9283d066eb2abf Redundant functions from main_win disappeared, entry is now bigger, properties refresh upon edition, edgewidth is zoomable. diff -r 15b51d278bf0 -r 739df601808d gui/graph_displayer_canvas-edge.cc --- a/gui/graph_displayer_canvas-edge.cc Wed Jul 27 11:35:13 2005 +0000 +++ b/gui/graph_displayer_canvas-edge.cc Thu Jul 28 14:31:32 2005 +0000 @@ -22,7 +22,7 @@ int w=(int)(*actual_map)[i]; if(w>=0) { - edgesmap[i]->property_width_pixels().set_value(w); + edgesmap[i]->property_width_units().set_value(w); } } } @@ -31,7 +31,7 @@ int w=(int)(*actual_map)[edge]; if(w>=0) { - edgesmap[edge]->property_width_pixels().set_value(w); + edgesmap[edge]->property_width_units().set_value(w); } } return 0; diff -r 15b51d278bf0 -r 739df601808d gui/graph_displayer_canvas-event.cc --- a/gui/graph_displayer_canvas-event.cc Wed Jul 27 11:35:13 2005 +0000 +++ b/gui/graph_displayer_canvas-event.cc Thu Jul 28 14:31:32 2005 +0000 @@ -589,7 +589,7 @@ entry_coos.y=(edgetextmap[active_edge])->property_y().get_value(); entry_coos.y-=edgetextmap[active_edge]->property_text_height().get_value()*1.5/2; canvasentrywidget=new Gnome::Canvas::Widget(displayed_graph, entry_coos.x, entry_coos.y, entrywidget); - canvasentrywidget->property_width().set_value(edgetextmap[active_edge]->property_text_width().get_value()*1.5); + canvasentrywidget->property_width().set_value(edgetextmap[active_edge]->property_text_width().get_value()*4); canvasentrywidget->property_height().set_value(edgetextmap[active_edge]->property_text_height().get_value()*1.5); } } @@ -767,10 +767,12 @@ case EDGE_MAP_EDIT: edgetextmap[active_edge]->property_text().set_value(ostr.str()); (*(mapstorage.edgemap_storage)[edgemap_to_edit])[active_edge]=mapvalue_d; + mapwin->updateEdge(active_edge); break; case NODE_MAP_EDIT: nodetextmap[active_node]->property_text().set_value(ostr.str()); (*(mapstorage.nodemap_storage)[nodemap_to_edit])[active_node]=mapvalue_d; + mapwin->updateNode(active_node); break; default: break; diff -r 15b51d278bf0 -r 739df601808d gui/graph_displayer_canvas.cc --- a/gui/graph_displayer_canvas.cc Wed Jul 27 11:35:13 2005 +0000 +++ b/gui/graph_displayer_canvas.cc Thu Jul 28 14:31:32 2005 +0000 @@ -32,7 +32,7 @@ edgesmap[i]=new BrokenEdge(displayed_graph, coos, *this); *(edgesmap[i]) << Gnome::Canvas::Properties::fill_color("green"); - edgesmap[i]->property_width_pixels().set_value(10); + edgesmap[i]->property_width_units().set_value(10); //initializing edge-text as well, to empty string diff -r 15b51d278bf0 -r 739df601808d gui/main_win.cc --- a/gui/main_win.cc Wed Jul 27 11:35:13 2005 +0000 +++ b/gui/main_win.cc Thu Jul 28 14:31:32 2005 +0000 @@ -1,11 +1,8 @@ #include MainWin::MainWin(const std::string& title, Graph & graph, CoordinatesMap & cm, - MapStorage & ms):mapwin("Map Setup", ms, gd_canvas),editwin("Editorial Window", gd_canvas),newmapwin("Creating new map",gd_canvas),gd_canvas(graph, cm, ms, &mapwin) + MapStorage & ms):mapwin("Map Setup", ms, gd_canvas),newmapwin("Creating new map",gd_canvas),gd_canvas(graph, cm, ms, &mapwin) { - //Creating a window for setting new maps. -// newmapwin=new NewMapWi("Creating new map",*this); - set_title (title); set_default_size(WIN_WIDTH,WIN_HEIGHT); @@ -23,7 +20,7 @@ ag->add( Gtk::Action::create("FileSaveAs", Gtk::Stock::SAVE_AS), sigc::mem_fun(*this, &MainWin::saveFileAs)); ag->add( Gtk::Action::create("FileQuit", Gtk::Stock::QUIT), - sigc::mem_fun(*this, &MainWin::quit)); + sigc::mem_fun(*this, &MainWin::hide)); ag->add( Gtk::Action::create("ViewMenu", "_View") ); ag->add( Gtk::Action::create("ViewZoomIn", Gtk::Stock::ZOOM_IN), @@ -37,9 +34,7 @@ ag->add( Gtk::Action::create("ShowMenu", "_Show") ); ag->add( Gtk::Action::create("ShowMaps", "_Maps"), - sigc::mem_fun(*this, &MainWin::showMaps)); - ag->add( Gtk::Action::create("ShowEditorials", "_Editorials"), - sigc::mem_fun(*this, &MainWin::showEditorials)); + sigc::mem_fun(this->mapwin, &MapWin::show)); ag->add( Gtk::Action::create("CreateNode", Gtk::Stock::NO), sigc::bind( sigc::mem_fun ( this->gd_canvas, &GraphDisplayerCanvas::changeEditorialTool ), 1) ); @@ -81,7 +76,6 @@ " " " " " " - " " " " " " " " @@ -132,21 +126,6 @@ show_all_children(); } -void MainWin::showMaps() -{ - mapwin.show(); -} - -void MainWin::showEditorials() -{ - editwin.show(); -} - -void MainWin::quit() -{ - hide(); -} - void MainWin::newFile() { std::cerr << "MainWin::newFile(): not yet implemented" << std::endl; diff -r 15b51d278bf0 -r 739df601808d gui/main_win.h --- a/gui/main_win.h Wed Jul 27 11:35:13 2005 +0000 +++ b/gui/main_win.h Thu Jul 28 14:31:32 2005 +0000 @@ -7,7 +7,6 @@ #include #include #include -#include #include #include @@ -27,9 +26,6 @@ ///Window of map-showing setup. Its type is \ref MapWin MapWin mapwin; - ///Window of editorial tools. Its type is \ref EditWin - EditWin editwin; - ///We need to store newmapwin, to be able to set the appropriate values for properties of new map. NewMapWin newmapwin; @@ -45,10 +41,6 @@ ///Container Gtk::VBox vbox; - ///This function makes map-setup window popped up. - virtual void showMaps(); - ///This function makes editorial window popped up. - virtual void showEditorials(); ///Callback for 'FileNew' action. virtual void newFile(); ///Callback for 'FileOpen' action. @@ -57,8 +49,6 @@ virtual void saveFile(); ///Callback for 'FileSaveAs' action. virtual void saveFileAs(); - ///Callback for 'Quit' action. - virtual void quit(); }; #endif //MAIN_WIN_H