[Lemon-commits] [lemon_svn] hegyi: r2103 - hugo/trunk/gui

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 20:50:10 CET 2006


Author: hegyi
Date: Thu Jul 28 16:31:32 2005
New Revision: 2103

Modified:
   hugo/trunk/gui/graph_displayer_canvas-edge.cc
   hugo/trunk/gui/graph_displayer_canvas-event.cc
   hugo/trunk/gui/graph_displayer_canvas.cc
   hugo/trunk/gui/main_win.cc
   hugo/trunk/gui/main_win.h

Log:
Redundant functions from main_win disappeared, entry is now bigger, properties refresh upon edition, edgewidth is zoomable.

Modified: hugo/trunk/gui/graph_displayer_canvas-edge.cc
==============================================================================
--- hugo/trunk/gui/graph_displayer_canvas-edge.cc	(original)
+++ hugo/trunk/gui/graph_displayer_canvas-edge.cc	Thu Jul 28 16:31:32 2005
@@ -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;

Modified: hugo/trunk/gui/graph_displayer_canvas-event.cc
==============================================================================
--- hugo/trunk/gui/graph_displayer_canvas-event.cc	(original)
+++ hugo/trunk/gui/graph_displayer_canvas-event.cc	Thu Jul 28 16:31:32 2005
@@ -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;

Modified: hugo/trunk/gui/graph_displayer_canvas.cc
==============================================================================
--- hugo/trunk/gui/graph_displayer_canvas.cc	(original)
+++ hugo/trunk/gui/graph_displayer_canvas.cc	Thu Jul 28 16:31:32 2005
@@ -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
 

Modified: hugo/trunk/gui/main_win.cc
==============================================================================
--- hugo/trunk/gui/main_win.cc	(original)
+++ hugo/trunk/gui/main_win.cc	Thu Jul 28 16:31:32 2005
@@ -1,11 +1,8 @@
 #include <main_win.h>
 
 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 @@
       "    </menu>"
       "    <menu action='ShowMenu'>"
       "      <menuitem action='ShowMaps'/>"
-      "      <menuitem action='ShowEditorials'/>"
       "    </menu>"
       "  </menubar>"
       "  <toolbar name='ToolBar'>"
@@ -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;

Modified: hugo/trunk/gui/main_win.h
==============================================================================
--- hugo/trunk/gui/main_win.h	(original)
+++ hugo/trunk/gui/main_win.h	Thu Jul 28 16:31:32 2005
@@ -7,7 +7,6 @@
 #include <mapstorage.h>
 #include <map_win.h>
 #include <new_map_win.h>
-#include <edit_win.h>
 #include <libgnomecanvasmm.h>
 #include <libgnomecanvasmm/polygon.h>
 
@@ -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



More information about the Lemon-commits mailing list