Redundant functions from main_win disappeared, entry is now bigger, properties refresh upon edition, edgewidth is zoomable.
authorhegyi
Thu, 28 Jul 2005 14:31:32 +0000
changeset 1598739df601808d
parent 1597 15b51d278bf0
child 1599 c2f95eac652b
Redundant functions from main_win disappeared, entry is now bigger, properties refresh upon edition, edgewidth is zoomable.
gui/graph_displayer_canvas-edge.cc
gui/graph_displayer_canvas-event.cc
gui/graph_displayer_canvas.cc
gui/main_win.cc
gui/main_win.h
     1.1 --- a/gui/graph_displayer_canvas-edge.cc	Wed Jul 27 11:35:13 2005 +0000
     1.2 +++ b/gui/graph_displayer_canvas-edge.cc	Thu Jul 28 14:31:32 2005 +0000
     1.3 @@ -22,7 +22,7 @@
     1.4  	  int w=(int)(*actual_map)[i];
     1.5  	  if(w>=0)
     1.6  	    {
     1.7 -	      edgesmap[i]->property_width_pixels().set_value(w);
     1.8 +	      edgesmap[i]->property_width_units().set_value(w);
     1.9  	    }
    1.10  	}
    1.11      }
    1.12 @@ -31,7 +31,7 @@
    1.13        int w=(int)(*actual_map)[edge];
    1.14        if(w>=0)
    1.15  	{
    1.16 -	  edgesmap[edge]->property_width_pixels().set_value(w);
    1.17 +	  edgesmap[edge]->property_width_units().set_value(w);
    1.18  	}
    1.19      }
    1.20    return 0;
     2.1 --- a/gui/graph_displayer_canvas-event.cc	Wed Jul 27 11:35:13 2005 +0000
     2.2 +++ b/gui/graph_displayer_canvas-event.cc	Thu Jul 28 14:31:32 2005 +0000
     2.3 @@ -589,7 +589,7 @@
     2.4  		    entry_coos.y=(edgetextmap[active_edge])->property_y().get_value();
     2.5  		    entry_coos.y-=edgetextmap[active_edge]->property_text_height().get_value()*1.5/2;
     2.6  		    canvasentrywidget=new Gnome::Canvas::Widget(displayed_graph, entry_coos.x, entry_coos.y, entrywidget);
     2.7 -		    canvasentrywidget->property_width().set_value(edgetextmap[active_edge]->property_text_width().get_value()*1.5);
     2.8 +		    canvasentrywidget->property_width().set_value(edgetextmap[active_edge]->property_text_width().get_value()*4);
     2.9  		    canvasentrywidget->property_height().set_value(edgetextmap[active_edge]->property_text_height().get_value()*1.5);
    2.10  		  }
    2.11  	      }
    2.12 @@ -767,10 +767,12 @@
    2.13  		      case EDGE_MAP_EDIT:
    2.14  			edgetextmap[active_edge]->property_text().set_value(ostr.str());
    2.15  			(*(mapstorage.edgemap_storage)[edgemap_to_edit])[active_edge]=mapvalue_d;
    2.16 +			mapwin->updateEdge(active_edge);
    2.17  			break;
    2.18  		      case NODE_MAP_EDIT:
    2.19  			nodetextmap[active_node]->property_text().set_value(ostr.str());
    2.20  			(*(mapstorage.nodemap_storage)[nodemap_to_edit])[active_node]=mapvalue_d;
    2.21 +			mapwin->updateNode(active_node);
    2.22  			break;
    2.23  		      default:
    2.24  			break;
     3.1 --- a/gui/graph_displayer_canvas.cc	Wed Jul 27 11:35:13 2005 +0000
     3.2 +++ b/gui/graph_displayer_canvas.cc	Thu Jul 28 14:31:32 2005 +0000
     3.3 @@ -32,7 +32,7 @@
     3.4      
     3.5      edgesmap[i]=new BrokenEdge(displayed_graph, coos, *this);
     3.6      *(edgesmap[i]) << Gnome::Canvas::Properties::fill_color("green");
     3.7 -    edgesmap[i]->property_width_pixels().set_value(10);    
     3.8 +    edgesmap[i]->property_width_units().set_value(10);    
     3.9      
    3.10      //initializing edge-text as well, to empty string
    3.11  
     4.1 --- a/gui/main_win.cc	Wed Jul 27 11:35:13 2005 +0000
     4.2 +++ b/gui/main_win.cc	Thu Jul 28 14:31:32 2005 +0000
     4.3 @@ -1,11 +1,8 @@
     4.4  #include <main_win.h>
     4.5  
     4.6  MainWin::MainWin(const std::string& title, Graph & graph, CoordinatesMap & cm,
     4.7 -    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)
     4.8 +    MapStorage & ms):mapwin("Map Setup", ms, gd_canvas),newmapwin("Creating new map",gd_canvas),gd_canvas(graph, cm, ms, &mapwin)
     4.9  {
    4.10 -  //Creating a window for setting new maps.
    4.11 -//   newmapwin=new NewMapWi("Creating new map",*this);
    4.12 -
    4.13  
    4.14    set_title (title);
    4.15    set_default_size(WIN_WIDTH,WIN_HEIGHT);
    4.16 @@ -23,7 +20,7 @@
    4.17    ag->add( Gtk::Action::create("FileSaveAs", Gtk::Stock::SAVE_AS),
    4.18        sigc::mem_fun(*this, &MainWin::saveFileAs));
    4.19    ag->add( Gtk::Action::create("FileQuit", Gtk::Stock::QUIT),
    4.20 -      sigc::mem_fun(*this, &MainWin::quit));
    4.21 +      sigc::mem_fun(*this, &MainWin::hide));
    4.22  
    4.23    ag->add( Gtk::Action::create("ViewMenu", "_View") );
    4.24    ag->add( Gtk::Action::create("ViewZoomIn", Gtk::Stock::ZOOM_IN),
    4.25 @@ -37,9 +34,7 @@
    4.26    
    4.27    ag->add( Gtk::Action::create("ShowMenu", "_Show") );
    4.28    ag->add( Gtk::Action::create("ShowMaps", "_Maps"),
    4.29 -      sigc::mem_fun(*this, &MainWin::showMaps));
    4.30 -  ag->add( Gtk::Action::create("ShowEditorials", "_Editorials"),
    4.31 -      sigc::mem_fun(*this, &MainWin::showEditorials));
    4.32 +      sigc::mem_fun(this->mapwin, &MapWin::show));
    4.33  
    4.34    ag->add( Gtk::Action::create("CreateNode", Gtk::Stock::NO),
    4.35        sigc::bind( sigc::mem_fun ( this->gd_canvas, &GraphDisplayerCanvas::changeEditorialTool ), 1) );
    4.36 @@ -81,7 +76,6 @@
    4.37        "    </menu>"
    4.38        "    <menu action='ShowMenu'>"
    4.39        "      <menuitem action='ShowMaps'/>"
    4.40 -      "      <menuitem action='ShowEditorials'/>"
    4.41        "    </menu>"
    4.42        "  </menubar>"
    4.43        "  <toolbar name='ToolBar'>"
    4.44 @@ -132,21 +126,6 @@
    4.45    show_all_children();
    4.46  }
    4.47  
    4.48 -void MainWin::showMaps()
    4.49 -{
    4.50 -  mapwin.show();
    4.51 -}
    4.52 -
    4.53 -void MainWin::showEditorials()
    4.54 -{
    4.55 -  editwin.show();
    4.56 -}
    4.57 -
    4.58 -void MainWin::quit()
    4.59 -{
    4.60 -  hide();
    4.61 -}
    4.62 -
    4.63  void MainWin::newFile()
    4.64  {
    4.65    std::cerr << "MainWin::newFile(): not yet implemented" << std::endl;
     5.1 --- a/gui/main_win.h	Wed Jul 27 11:35:13 2005 +0000
     5.2 +++ b/gui/main_win.h	Thu Jul 28 14:31:32 2005 +0000
     5.3 @@ -7,7 +7,6 @@
     5.4  #include <mapstorage.h>
     5.5  #include <map_win.h>
     5.6  #include <new_map_win.h>
     5.7 -#include <edit_win.h>
     5.8  #include <libgnomecanvasmm.h>
     5.9  #include <libgnomecanvasmm/polygon.h>
    5.10  
    5.11 @@ -27,9 +26,6 @@
    5.12    ///Window of map-showing setup. Its type is \ref MapWin
    5.13    MapWin mapwin;
    5.14  
    5.15 -  ///Window of editorial tools. Its type is \ref EditWin
    5.16 -  EditWin editwin;
    5.17 -
    5.18    ///We need to store newmapwin, to be able to set the appropriate values for properties of new map.
    5.19    NewMapWin newmapwin;
    5.20  
    5.21 @@ -45,10 +41,6 @@
    5.22    ///Container
    5.23    Gtk::VBox vbox;
    5.24  
    5.25 -  ///This function makes map-setup window popped up.
    5.26 -  virtual void showMaps();
    5.27 -  ///This function makes editorial window popped up.
    5.28 -  virtual void showEditorials();
    5.29    ///Callback for 'FileNew' action.
    5.30    virtual void newFile();
    5.31    ///Callback for 'FileOpen' action.
    5.32 @@ -57,8 +49,6 @@
    5.33    virtual void saveFile();
    5.34    ///Callback for 'FileSaveAs' action.
    5.35    virtual void saveFileAs();
    5.36 -  ///Callback for 'Quit' action.
    5.37 -  virtual void quit();
    5.38  };
    5.39  
    5.40  #endif //MAIN_WIN_H