Index: gui/Makefile.am
===================================================================
--- gui/Makefile.am	(revision 1510)
+++ gui/Makefile.am	(revision 1512)
@@ -8,4 +8,5 @@
 	graph_displayer_canvas.cc \
 	graph_displayer_canvas-edge.cc \
+	graph_displayer_canvas-node.cc \
 	graph_displayer_canvas-event.cc \
 	graph_displayer_canvas-zoom.cc \
Index: gui/all_include.h
===================================================================
--- gui/all_include.h	(revision 1503)
+++ gui/all_include.h	(revision 1512)
@@ -17,5 +17,6 @@
 #include <lemon/xy.h>
 
-enum {WIDTH, COLOR, TEXT, PROPERTY_NUM}; // edge properties;
+enum {E_WIDTH, E_COLOR, E_TEXT, EDGE_PROPERTY_NUM}; // edge properties;
+enum {N_RADIUS, N_COLOR, N_TEXT, NODE_PROPERTY_NUM}; // node properties;
 enum {MOVE, CREATE_NODE, CREATE_EDGE, ERASER, EDGE_MAP_EDIT, TOOL_NUM}; // tools;
 #define RANGE 3
@@ -25,6 +26,8 @@
 
 #ifndef MAIN_PART
-extern std::vector <std::string> property_strings;
-extern std::vector <double> property_defaults;
+extern std::vector <std::string> edge_property_strings;
+extern std::vector <double> edge_property_defaults;
+extern std::vector <std::string> node_property_strings;
+extern std::vector <double> node_property_defaults;
 #endif //MAIN_PART
 
Index: gui/graph-displayer.cc
===================================================================
--- gui/graph-displayer.cc	(revision 1504)
+++ gui/graph-displayer.cc	(revision 1512)
@@ -7,6 +7,8 @@
 #define MAIN_PART
 
-std::vector <std::string> property_strings;
-std::vector <double> property_defaults;
+std::vector <std::string> edge_property_strings;
+std::vector <double> edge_property_defaults;
+std::vector <std::string> node_property_strings;
+std::vector <double> node_property_defaults;
 
 
@@ -16,13 +18,23 @@
   //initializing
 
-  property_strings.resize(PROPERTY_NUM);
-  property_strings[WIDTH]="Width";
-  property_strings[COLOR]="Color";
-  property_strings[TEXT]="Text";
+  edge_property_strings.resize(EDGE_PROPERTY_NUM);
+  edge_property_strings[E_WIDTH]="Edge Width";
+  edge_property_strings[E_COLOR]="Edge Color";
+  edge_property_strings[E_TEXT]="Edge Text";
 
-  property_defaults.resize(PROPERTY_NUM);
-  property_defaults[WIDTH]=10.0;
-  property_defaults[COLOR]=100;
-  property_defaults[TEXT]=0;
+  edge_property_defaults.resize(EDGE_PROPERTY_NUM);
+  edge_property_defaults[E_WIDTH]=10.0;
+  edge_property_defaults[E_COLOR]=100;
+  edge_property_defaults[E_TEXT]=0;
+
+  node_property_strings.resize(NODE_PROPERTY_NUM);
+  node_property_strings[N_RADIUS]="Node Radius";
+  node_property_strings[N_COLOR]="Node Color";
+  node_property_strings[N_TEXT]="Node Text";
+
+  node_property_defaults.resize(NODE_PROPERTY_NUM);
+  node_property_defaults[N_RADIUS]=20.0;
+  node_property_defaults[N_COLOR]=100;
+  node_property_defaults[N_TEXT]=0;
 
   if(argc<2)
Index: gui/graph_displayer_canvas-edge.cc
===================================================================
--- gui/graph_displayer_canvas-edge.cc	(revision 1510)
+++ gui/graph_displayer_canvas-edge.cc	(revision 1512)
@@ -4,12 +4,23 @@
 
 
-int GraphDisplayerCanvas::changeLineWidth (std::string mapname)
+int GraphDisplayerCanvas::changeEdgeWidth (std::string mapname, Graph::Edge edge)
 {
-  for (EdgeIt i(g); i!=INVALID; ++i)
+  if(edge==INVALID)
     {
-      int w=(int)(*(mapstorage.edgemap_storage)[mapname])[i];
+      for (EdgeIt i(g); i!=INVALID; ++i)
+	{
+	  int w=(int)(*(mapstorage.edgemap_storage)[mapname])[i];
+	  if(w>=0)
+	    {
+	      edgesmap[i]->property_width_pixels().set_value(w);
+	    }
+	}
+    }
+  else
+    {
+      int w=(int)(*(mapstorage.edgemap_storage)[mapname])[edge];
       if(w>=0)
 	{
-	  edgesmap[i]->property_width_pixels().set_value(w);
+	  edgesmap[edge]->property_width_pixels().set_value(w);
 	}
     }
@@ -17,5 +28,5 @@
 };
 
-int GraphDisplayerCanvas::changeColor (std::string mapname)
+int GraphDisplayerCanvas::changeEdgeColor (std::string mapname, Graph::Edge edge)
 {  
 
@@ -23,28 +34,50 @@
   //the minimum of the nodemap to the range of
   //green in RGB
+  if(edge==INVALID)
+    {
 
-  for (EdgeIt i(g); i!=INVALID; ++i)
-  {
-    double w=(*(mapstorage.edgemap_storage)[mapname])[i];
-    double max=mapstorage.maxOfEdgeMap(mapname);
-    double min=mapstorage.minOfEdgeMap(mapname);
+      for (EdgeIt i(g); i!=INVALID; ++i)
+	{
+	  double w=(*(mapstorage.edgemap_storage)[mapname])[i];
+	  double max=mapstorage.maxOfEdgeMap(mapname);
+	  double min=mapstorage.minOfEdgeMap(mapname);
       
-    //std::cout<<w<<" "<<max<<" "<<min<<" "<<100*(w-min)/(max-min)<<std::endl;
-    Gdk::Color color;
-    if(max!=min)
+	  //std::cout<<w<<" "<<max<<" "<<min<<" "<<100*(w-min)/(max-min)<<std::endl;
+	  Gdk::Color color;
+	  if(max!=min)
+	    {
+	      color.set_rgb_p (0, 100*(w-min)/(max-min), 0);
+	    }
+	  else
+	    {
+	      color.set_rgb_p (0, 100, 0);
+	    }
+
+	  edgesmap[i]->property_fill_color_gdk().set_value(color);
+	}
+    }
+  else
     {
-      color.set_rgb_p (0, 100*(w-min)/(max-min), 0);
+      double w=(*(mapstorage.edgemap_storage)[mapname])[edge];
+      double max=mapstorage.maxOfEdgeMap(mapname);
+      double min=mapstorage.minOfEdgeMap(mapname);
+      
+      //std::cout<<w<<" "<<max<<" "<<min<<" "<<100*(w-min)/(max-min)<<std::endl;
+      Gdk::Color color;
+      if(max!=min)
+	{
+	  color.set_rgb_p (0, 100*(w-min)/(max-min), 0);
+	}
+      else
+	{
+	  color.set_rgb_p (0, 100, 0);
+	}
+
+      edgesmap[edge]->property_fill_color_gdk().set_value(color);
     }
-    else
-    {
-      color.set_rgb_p (0, 100, 0);
-    }
-
-    edgesmap[i]->property_fill_color_gdk().set_value(color);
-  }
   return 0;
 };
 
-int GraphDisplayerCanvas::changeText (std::string mapname)
+int GraphDisplayerCanvas::changeEdgeText (std::string mapname, Graph::Edge edge)
 {
 
@@ -55,9 +88,48 @@
   //\todo isn't it a bit woodcutter?
 
-  for (EdgeIt i(g); i!=INVALID; ++i)
+  if(edge==INVALID)
     {
-      if(mapname!="Text")
+      for (EdgeIt i(g); i!=INVALID; ++i)
 	{
-	  double number=(*(mapstorage.edgemap_storage)[mapname])[i];
+	  if(mapname!=edge_property_strings[E_TEXT])
+	    {
+	      double number=(*(mapstorage.edgemap_storage)[mapname])[i];
+	      int length=1;
+	      //if number is smaller than one, length would be negative, or invalid
+	      if(number>=1)
+		{
+		  length=(int)(floor(log(number)/log(10)))+1;
+		}
+	      int maxpos=(int)(pow(10,length-1));
+	      int strl=length+1+RANGE;
+	      char * str=new char[strl];
+	      str[length]='.';
+	      str[strl]='\0';
+      
+	      for(int j=0;j<strl;j++)
+		{
+		  if(j!=length)
+		    {
+		      int digit=(int)(number/maxpos);
+		      str[j]=(digit+'0');
+		      number-=digit*maxpos;
+		      number*=10;
+		    }
+		}
+      
+	      edgetextmap[i]->property_text().set_value(str);
+	    }
+	  else
+	    {
+	      edgetextmap[i]->property_text().set_value("");
+	    }
+	}
+
+    }
+  else
+    {
+      if(mapname!=edge_property_strings[E_TEXT])
+	{
+	  double number=(*(mapstorage.edgemap_storage)[mapname])[edge];
 	  int length=1;
 	  //if number is smaller than one, length would be negative, or invalid
@@ -83,11 +155,14 @@
 	    }
       
-	  edgetextmap[i]->property_text().set_value(str);
+	  edgetextmap[edge]->property_text().set_value(str);
 	}
       else
 	{
-	  edgetextmap[i]->property_text().set_value("");
+	  edgetextmap[edge]->property_text().set_value("");
 	}
+	  
     }
+
   return 0;
+
 };
Index: gui/graph_displayer_canvas-event.cc
===================================================================
--- gui/graph_displayer_canvas-event.cc	(revision 1510)
+++ gui/graph_displayer_canvas-event.cc	(revision 1512)
@@ -100,5 +100,7 @@
         double dy=e->motion.y-clicked_y;
 
+	//repositioning node and its text
         active_item->move(dx, dy);
+	nodetextmap[active_node]->move(dx, dy);
 
         clicked_x=e->motion.x;
@@ -130,4 +132,5 @@
 	      }
 
+	    //reposition of edgetext
 	    xy<double> text_pos=edgesmap[ei]->get_arrow_pos();
 	    text_pos+=(xy<double>(10,10));
@@ -190,4 +193,10 @@
       *(nodesmap[active_node]) << Gnome::Canvas::Properties::outline_color("black");
       (nodesmap[active_node])->show();
+
+      nodetextmap[active_node]=new Gnome::Canvas::Text(displayed_graph, clicked_x+node_property_defaults[N_RADIUS]+5, clicked_y+node_property_defaults[N_RADIUS]+5, "");
+      nodetextmap[active_node]->property_fill_color().set_value("darkblue");
+
+      mapwin->update_node(active_node);
+
       break;
 
@@ -273,37 +282,48 @@
 	      if(target_node!=INVALID)
 		{
-		  *(nodesmap[target_node]) << Gnome::Canvas::Properties::fill_color("red");
-
-		  //creating new edge
-		  active_edge=EdgeIt(g,g.addEdge(active_node, target_node));
-
-		  //initiating values corresponding to new edge in maps
-		  mapstorage.init_maps_for_edge(active_edge);
+		  if(target_node!=active_node)		
+		    {
+		      *(nodesmap[target_node]) << Gnome::Canvas::Properties::fill_color("red");
+
+		      //creating new edge
+		      active_edge=EdgeIt(g,g.addEdge(active_node, target_node));
+
+		      //initiating values corresponding to new edge in maps
+		      mapstorage.init_maps_for_edge(active_edge);
 	  
-		  //calculating coordinates of new edge
-		  Gnome::Canvas::Points coos;
-		  double x1, x2, y1, y2;
+		      //calculating coordinates of new edge
+		      Gnome::Canvas::Points coos;
+		      double x1, x2, y1, y2;
 	  
-		  active_item->get_bounds(x1, y1, x2, y2);
-		  coos.push_back(Gnome::Art::Point((x1+x2)/2,(y1+y2)/2));
-
-		  target_item->get_bounds(x1, y1, x2, y2);
-		  coos.push_back(Gnome::Art::Point((x1+x2)/2,(y1+y2)/2));
-
-		  //drawing new edge
-		  edgesmap[active_edge]=new BrokenEdge(displayed_graph, coos, *this);
-		  *(edgesmap[active_edge]) << Gnome::Canvas::Properties::fill_color("green");
-		  edgesmap[active_edge]->property_width_pixels().set_value(10);
-
-		  //redraw nodes to blank terminations of the new edge
-		  target_item->raise_to_top();
-		  active_item->raise_to_top();
-
-		  //initializing edge-text as well, to empty string
-		  xy<double> text_pos=edgesmap[active_edge]->get_arrow_pos();
-		  text_pos+=(xy<double>(10,10));
-
-		  edgetextmap[active_edge]=new Gnome::Canvas::Text(displayed_graph, text_pos.x, text_pos.y, "");
-		  edgetextmap[active_edge]->property_fill_color().set_value("black");
+		      active_item->get_bounds(x1, y1, x2, y2);
+		      coos.push_back(Gnome::Art::Point((x1+x2)/2,(y1+y2)/2));
+
+		      target_item->get_bounds(x1, y1, x2, y2);
+		      coos.push_back(Gnome::Art::Point((x1+x2)/2,(y1+y2)/2));
+
+		      //drawing new edge
+		      edgesmap[active_edge]=new BrokenEdge(displayed_graph, coos, *this);
+		      *(edgesmap[active_edge]) << Gnome::Canvas::Properties::fill_color("green");
+		      edgesmap[active_edge]->property_width_pixels().set_value(10);
+
+		      //redraw nodes to blank terminations of the new edge
+		      target_item->raise_to_top();
+		      active_item->raise_to_top();
+
+		      //initializing edge-text as well, to empty string
+		      xy<double> text_pos=edgesmap[active_edge]->get_arrow_pos();
+		      text_pos+=(xy<double>(10,10));
+
+		      edgetextmap[active_edge]=new Gnome::Canvas::Text(displayed_graph, text_pos.x, text_pos.y, "");
+		      edgetextmap[active_edge]->property_fill_color().set_value("darkgreen");
+
+		      //updating its properties
+		      mapwin->update_edge(active_edge);
+		    }
+		  else
+		    {
+		      target_node=INVALID;
+		      std::cout << "Loop edge is not yet implemented!" << std::endl;
+		    }
 		}
 	      //clicked item was not a node. it could be an e.g. edge. we do not deal with it furthermore.
@@ -436,4 +456,5 @@
 void GraphDisplayerCanvas::delete_item(NodeIt node_to_delete)
 {
+  delete(nodetextmap[node_to_delete]);
   delete(nodesmap[node_to_delete]);
   g.erase(node_to_delete);
@@ -442,4 +463,5 @@
 void GraphDisplayerCanvas::delete_item(EdgeIt edge_to_delete)
 {
+  delete(edgetextmap[edge_to_delete]);
   delete(edgesmap[edge_to_delete]);
   g.erase(edge_to_delete);
@@ -448,4 +470,5 @@
 void GraphDisplayerCanvas::delete_item(Graph::Edge edge_to_delete)
 {
+  delete(edgetextmap[edge_to_delete]);
   delete(edgesmap[edge_to_delete]);
   g.erase(edge_to_delete);
Index: gui/graph_displayer_canvas-node.cc
===================================================================
--- gui/graph_displayer_canvas-node.cc	(revision 1512)
+++ gui/graph_displayer_canvas-node.cc	(revision 1512)
@@ -0,0 +1,175 @@
+#include <graph_displayer_canvas.h>
+#include <broken_edge.h>
+#include <math.h>
+
+
+int GraphDisplayerCanvas::changeNodeRadius (std::string mapname, Graph::Node node)
+{
+  if(node==INVALID)
+    {
+      for (NodeIt i(g); i!=INVALID; ++i)
+	{
+	  int w=(int)(*(mapstorage.nodemap_storage)[mapname])[i];
+	  if(w>=0)
+	    {
+	      double x1, y1, x2, y2;
+	      nodesmap[i]->get_bounds(x1, y1, x2, y2);
+	      nodesmap[i]->property_x1().set_value((x1+x2)/2-w);
+	      nodesmap[i]->property_x2().set_value((x1+x2)/2+w);
+	      nodesmap[i]->property_y1().set_value((y1+y2)/2-w);
+	      nodesmap[i]->property_y2().set_value((y1+y2)/2+w);
+	    }
+	}
+    }
+  else
+    {
+      int w=(int)(*(mapstorage.nodemap_storage)[mapname])[node];
+      if(w>=0)
+	{
+	  double x1, y1, x2, y2;
+	  nodesmap[node]->get_bounds(x1, y1, x2, y2);
+	  nodesmap[node]->property_x1().set_value((x1+x2)/2-w);
+	  nodesmap[node]->property_x2().set_value((x1+x2)/2+w);
+	  nodesmap[node]->property_y1().set_value((y1+y2)/2-w);
+	  nodesmap[node]->property_y2().set_value((y1+y2)/2+w);
+	}
+    }
+  return 0;
+};
+
+int GraphDisplayerCanvas::changeNodeColor (std::string mapname, Graph::Node node)
+{  
+
+  //function maps the range of the maximum and
+  //the minimum of the nodemap to the range of
+  //green in RGB
+
+  if(node==INVALID)
+    {
+
+      for (NodeIt i(g); i!=INVALID; ++i)
+	{
+	  double w=(*(mapstorage.nodemap_storage)[mapname])[i];
+	  double max=mapstorage.maxOfNodeMap(mapname);
+	  double min=mapstorage.minOfNodeMap(mapname);
+      
+	  //std::cout<<w<<" "<<max<<" "<<min<<" "<<100*(w-min)/(max-min)<<std::endl;
+	  Gdk::Color color;
+	  if(max!=min)
+	    {
+	      color.set_rgb_p (0, 0, 100*(w-min)/(max-min));
+	    }
+	  else
+	    {
+	      color.set_rgb_p (0, 0, 100);
+	    }
+
+	  nodesmap[i]->property_fill_color_gdk().set_value(color);
+	}
+    }
+  else
+    {
+      double w=(*(mapstorage.nodemap_storage)[mapname])[node];
+      double max=mapstorage.maxOfNodeMap(mapname);
+      double min=mapstorage.minOfNodeMap(mapname);
+      
+      //std::cout<<w<<" "<<max<<" "<<min<<" "<<100*(w-min)/(max-min)<<std::endl;
+      Gdk::Color color;
+      if(max!=min)
+	{
+	  color.set_rgb_p (0, 0, 100*(w-min)/(max-min));
+	}
+      else
+	{
+	  color.set_rgb_p (0, 0, 100);
+	}
+
+      nodesmap[node]->property_fill_color_gdk().set_value(color);
+    }
+  return 0;
+};
+
+int GraphDisplayerCanvas::changeNodeText (std::string mapname, Graph::Node node)
+{
+
+  //the number in the map will be written on the node
+  //EXCEPT when the name of the map is Text, because
+  //in that case empty string will be written, because
+  //that is the deleter map
+  //\todo isn't it a bit woodcutter?
+
+  if(node==INVALID)
+    {
+      for (NodeIt i(g); i!=INVALID; ++i)
+	{
+	  if(mapname!=node_property_strings[N_TEXT])
+	    {
+	      double number=(*(mapstorage.nodemap_storage)[mapname])[i];
+	      int length=1;
+	      //if number is smaller than one, length would be negative, or invalid
+	      if(number>=1)
+		{
+		  length=(int)(floor(log(number)/log(10)))+1;
+		}
+	      int maxpos=(int)(pow(10,length-1));
+	      int strl=length+1+RANGE;
+	      char * str=new char[strl];
+	      str[length]='.';
+	      str[strl]='\0';
+      
+	      for(int j=0;j<strl;j++)
+		{
+		  if(j!=length)
+		    {
+		      int digit=(int)(number/maxpos);
+		      str[j]=(digit+'0');
+		      number-=digit*maxpos;
+		      number*=10;
+		    }
+		}
+      
+	      nodetextmap[i]->property_text().set_value(str);
+	    }
+	  else
+	    {
+	      nodetextmap[i]->property_text().set_value("");
+	    }
+	}
+    }
+  else
+    {
+      if(mapname!=node_property_strings[N_TEXT])
+	{
+	  double number=(*(mapstorage.nodemap_storage)[mapname])[node];
+	  int length=1;
+	  //if number is smaller than one, length would be negative, or invalid
+	  if(number>=1)
+	    {
+	      length=(int)(floor(log(number)/log(10)))+1;
+	    }
+	  int maxpos=(int)(pow(10,length-1));
+	  int strl=length+1+RANGE;
+	  char * str=new char[strl];
+	  str[length]='.';
+	  str[strl]='\0';
+      
+	  for(int j=0;j<strl;j++)
+	    {
+	      if(j!=length)
+		{
+		  int digit=(int)(number/maxpos);
+		  str[j]=(digit+'0');
+		  number-=digit*maxpos;
+		  number*=10;
+		}
+	    }
+      
+	  nodetextmap[node]->property_text().set_value(str);
+	}
+      else
+	{
+	  nodetextmap[node]->property_text().set_value("");
+	}
+    }
+  return 0;
+};
Index: gui/graph_displayer_canvas.cc
===================================================================
--- gui/graph_displayer_canvas.cc	(revision 1510)
+++ gui/graph_displayer_canvas.cc	(revision 1512)
@@ -3,5 +3,5 @@
 #include <math.h>
 
-GraphDisplayerCanvas::GraphDisplayerCanvas(Graph & gr, CoordinatesMap & cm, MapStorage & ms):g(gr),nodesmap(g),edgesmap(g),edgetextmap(g),displayed_graph(*(root()), 0, 0),mapstorage(ms),isbutton(0),active_item(NULL),target_item(NULL)
+GraphDisplayerCanvas::GraphDisplayerCanvas(Graph & gr, CoordinatesMap & cm, MapStorage & ms, MapWin * mw):g(gr),nodesmap(g),edgesmap(g),edgetextmap(g),nodetextmap(g),displayed_graph(*(root()), 0, 0),mapstorage(ms),isbutton(0),active_item(NULL),target_item(NULL),mapwin(mw)
 {
   
@@ -35,5 +35,5 @@
 
     edgetextmap[i]=new Gnome::Canvas::Text(displayed_graph, text_pos.x, text_pos.y, "");
-    edgetextmap[i]->property_fill_color().set_value("black");
+    edgetextmap[i]->property_fill_color().set_value("darkgreen");
   }
 
@@ -57,5 +57,11 @@
     *(nodesmap[i]) << Gnome::Canvas::Properties::fill_color("blue");
     *(nodesmap[i]) << Gnome::Canvas::Properties::outline_color("black");
-    //!!!!!!! (nodesmap[i])->signal_event().connect(sigc::bind(sigc::mem_fun(*this, &GraphDisplayerCanvas::event_handler),i));
+
+    //initializing edge-text as well, to empty string
+
+    xy<double> text_pos((cm[i].x+node_property_defaults[N_RADIUS]+5),(cm[i].y+node_property_defaults[N_RADIUS]+5));
+
+    nodetextmap[i]=new Gnome::Canvas::Text(displayed_graph, text_pos.x, text_pos.y, "");
+    nodetextmap[i]->property_fill_color().set_value("darkblue");
   }
 
Index: gui/graph_displayer_canvas.h
===================================================================
--- gui/graph_displayer_canvas.h	(revision 1505)
+++ gui/graph_displayer_canvas.h	(revision 1512)
@@ -7,4 +7,5 @@
 
 #include <all_include.h>
+#include <map_win.h>
 #include <mapstorage.h>
 #include <broken_edge.h>
@@ -18,18 +19,30 @@
 
 public:
-  GraphDisplayerCanvas(Graph &, CoordinatesMap &, MapStorage &);
+  GraphDisplayerCanvas(Graph &, CoordinatesMap &, MapStorage &, MapWin *);
   virtual ~GraphDisplayerCanvas();
 
   ///Changes the linewidth attribute according to the given map.
   ///\param mapname is the name of the map which contains the new values
-  int changeLineWidth (std::string mapname);
+  int changeEdgeWidth (std::string mapname, Graph::Edge new_item=INVALID);
 
   ///Changes the linecolor attribute according to the given map.
   ///\param mapname is the name of the map which contains the new values
-  int changeColor (std::string mapname);
+  int changeEdgeColor (std::string mapname, Graph::Edge new_item=INVALID);
 
   ///Changes the text of line attribute according to the given map.
   ///\param mapname is the name of the map which contains the new values
-  int changeText (std::string mapname);
+  int changeEdgeText (std::string mapname, Graph::Edge new_item=INVALID);
+
+  ///Changes the linewidth attribute according to the given map.
+  ///\param mapname is the name of the map which contains the new values
+  int changeNodeRadius (std::string mapname, Graph::Node new_item=INVALID);
+
+  ///Changes the linecolor attribute according to the given map.
+  ///\param mapname is the name of the map which contains the new values
+  int changeNodeColor (std::string mapname, Graph::Node new_item=INVALID);
+
+  ///Changes the text of line attribute according to the given map.
+  ///\param mapname is the name of the map which contains the new values
+  int changeNodeText (std::string mapname, Graph::Node new_item=INVALID);
 
   ///Callback for 'ViewZoomIn' action.
@@ -108,4 +121,7 @@
   Graph::EdgeMap<Gnome::Canvas::Text *> edgetextmap;
 
+  ///Map of texts to write on nodes
+  Graph::NodeMap<Gnome::Canvas::Text *> nodetextmap;
+
   ///Group of graphical elements of displayed_graph
   Gnome::Canvas::Group displayed_graph;
@@ -134,4 +150,7 @@
   static const int zoom_step = 5;
 
+  ///We need to store mapwin, to be able to ask the appropriate values for properties of new items.
+  MapWin * mapwin;
+
 };
 
Index: gui/main_win.cc
===================================================================
--- gui/main_win.cc	(revision 1502)
+++ gui/main_win.cc	(revision 1512)
@@ -2,5 +2,5 @@
 
 MainWin::MainWin(const std::string& title, Graph & graph, CoordinatesMap & cm,
-    MapStorage & ms):mapwin("Map Setup", ms, gd_canvas),editwin("Editorial Window", gd_canvas),gd_canvas(graph, cm, ms)
+    MapStorage & ms):mapwin("Map Setup", ms, gd_canvas),editwin("Editorial Window", gd_canvas),gd_canvas(graph, cm, ms, &mapwin)
 {
   set_title (title);
Index: gui/map_win.cc
===================================================================
--- gui/map_win.cc	(revision 1446)
+++ gui/map_win.cc	(revision 1512)
@@ -11,5 +11,5 @@
 }
 
-MapWin::MapWin(const std::string& title, MapStorage & mapst, GraphDisplayerCanvas & grdispc):gdc(grdispc),ms(mapst),table(PROPERTY_NUM, 2, false)
+MapWin::MapWin(const std::string& title, MapStorage & mapst, GraphDisplayerCanvas & grdispc):gdc(grdispc),ms(mapst)
 {
   set_title(title);
@@ -18,7 +18,9 @@
   signal_key_press_event().connect(sigc::mem_fun(*this, &MapWin::close_if_escape_is_pressed));
 
-  combo_array=new Gtk::Combo [PROPERTY_NUM];
-
-  for(int i=0;i<PROPERTY_NUM;i++)
+  e_combo_array=new Gtk::Combo [EDGE_PROPERTY_NUM];
+
+  table=new Gtk::Table(EDGE_PROPERTY_NUM, 2, false);
+
+  for(int i=0;i<EDGE_PROPERTY_NUM;i++)
   {
 
@@ -36,6 +38,6 @@
 	actprop=j;
       }
-      //this is the other maps to show for this property
-      for(int k=0;k<PROPERTY_NUM;k++)
+      //these are the maps NOT to show for this property
+      for(int k=0;k<EDGE_PROPERTY_NUM;k++)
       {
 	if(emsi->second==&(ms.default_edgemaps[k]))
@@ -46,6 +48,4 @@
       emsi++;
     }
-
-    //combo_array[i].set_group(group);
 
     //filling in combo box with choices
@@ -65,15 +65,15 @@
     }
 
-    combo_array[i].set_popdown_strings(listStrings);
+    e_combo_array[i].set_popdown_strings(listStrings);
 
     //Restrict it to these choices only:
-    combo_array[i].set_value_in_list();
-
-    //binding signal to thew actual entry
-    combo_array[i].get_entry()->signal_changed().connect
+    e_combo_array[i].set_value_in_list();
+
+    //binding signal to the actual entry
+    e_combo_array[i].get_entry()->signal_changed().connect
     (
      sigc::bind
      (
-      sigc::mem_fun(*this, &MapWin::combo_changed),
+      sigc::mem_fun(*this, &MapWin::e_combo_changed),
       i
      )
@@ -83,32 +83,96 @@
 
     label=new Gtk::Label;
-    label->set_text(property_strings[i]);
-
-    //    labelpluscombo=new Gtk::HBox;
-    //    labelpluscombo->pack_start(*label);
-    //    labelpluscombo->pack_start(combo_array[i]);
+    label->set_text(edge_property_strings[i]);
         
-    table.attach(*label,0,1,i,i+1,Gtk::SHRINK,Gtk::SHRINK,10,3);
-    table.attach(combo_array[i],1,2,i,i+1,Gtk::SHRINK,Gtk::SHRINK,10,3);
-
-    /*
-    if(actpos<(ms.numOfEdgeMaps()-PROPERTY_NUM+1)/2)
-    {
-      vbox_r1.pack_start(*labelpluscombo);
-    }
-    else
-    {
-      vbox_r2.pack_start(*labelpluscombo);
-    }
-    actpos++;
-    //*/
-
-  }
-
-  combos.pack_start(vbox_r1);
-  combos.pack_start(vbox_r2);
-
-  //add(combos);
-  add(table);
+    (*table).attach(*label,0,1,i,i+1,Gtk::SHRINK,Gtk::SHRINK,10,3);
+    (*table).attach(e_combo_array[i],1,2,i,i+1,Gtk::SHRINK,Gtk::SHRINK,10,3);
+
+
+  }
+
+  vbox.pack_start(*(new Gtk::Label("Edge properties")));
+
+  vbox.pack_start(*table);
+
+  vbox.pack_start(*(new Gtk::HSeparator));
+
+  n_combo_array=new Gtk::Combo [NODE_PROPERTY_NUM];
+
+  table=new Gtk::Table(NODE_PROPERTY_NUM, 2, false);
+
+  for(int i=0;i<NODE_PROPERTY_NUM;i++)
+  {
+
+    std::map< std::string,Graph::NodeMap<double> * >::iterator emsi=ms.beginOfNodeMaps();
+    std::set<int> props;
+
+    int actprop;
+
+    //here we find out, which map is the default in MapStorage for this property, which are not
+    for(int j=0;j<ms.numOfNodeMaps();j++)
+    {
+      //these are the maps NOT to show for this property
+      if(emsi->second==&(ms.default_nodemaps[i]))
+      {
+	actprop=j;
+      }
+      //this is the other maps to show for this property
+      for(int k=0;k<NODE_PROPERTY_NUM;k++)
+      {
+	if(emsi->second==&(ms.default_nodemaps[k]))
+	{
+	  props.insert(j);
+	}
+      }
+      emsi++;
+    }
+
+    //filling in combo box with choices
+    std::list<Glib::ustring> listStrings;
+
+    listStrings.push_back("Default");
+
+    emsi=ms.beginOfNodeMaps();
+
+    for(int j=0;j<ms.numOfNodeMaps();j++)
+    {
+      if( ( props.find(j) )==( props.end() ) )
+      {
+	listStrings.push_back(emsi->first);
+      }
+      emsi++;
+    }
+
+    n_combo_array[i].set_popdown_strings(listStrings);
+
+    //Restrict it to these choices only:
+    n_combo_array[i].set_value_in_list();
+
+    //binding signal to thew actual entry
+    n_combo_array[i].get_entry()->signal_changed().connect
+    (
+     sigc::bind
+     (
+      sigc::mem_fun(*this, &MapWin::n_combo_changed),
+      i
+     )
+    );
+
+    //placing actual entry in the right place
+
+    label=new Gtk::Label;
+    label->set_text(node_property_strings[i]);
+        
+    (*table).attach(*label,0,1,i,i+1,Gtk::SHRINK,Gtk::SHRINK,10,3);
+    (*table).attach(n_combo_array[i],1,2,i,i+1,Gtk::SHRINK,Gtk::SHRINK,10,3);
+
+
+  }
+
+  add(vbox);
+
+  vbox.pack_start(*(new Gtk::Label("Node properties")));
+
+  vbox.pack_start(*table);
 
   show_all_children();
@@ -116,9 +180,7 @@
 }
 
-void MapWin::combo_changed(int prop)
-{
-
-  //most nem kommentezem fel, mert ugyis valtozik
-  Gtk::Entry* entry = combo_array[prop].get_entry();
+void MapWin::e_combo_changed(int prop)
+{
+  Gtk::Entry* entry = e_combo_array[prop].get_entry();
 
   if(entry)
@@ -129,5 +191,5 @@
       if(mapname=="Default")
       {
-	mapname=property_strings[prop];
+	mapname=edge_property_strings[prop];
       }
 
@@ -136,12 +198,12 @@
 	switch(prop)
 	{
-          case WIDTH:
-	    gdc.changeLineWidth(mapname);
-	    break;
-          case COLOR:
-	    gdc.changeColor(mapname);
-	    break;
-          case TEXT:
-	    gdc.changeText(mapname);
+          case E_WIDTH:
+	    gdc.changeEdgeWidth(mapname);
+	    break;
+          case E_COLOR:
+	    gdc.changeEdgeColor(mapname);
+	    break;
+          case E_TEXT:
+	    gdc.changeEdgeText(mapname);
 	    break;
           default:
@@ -152,2 +214,117 @@
   }
 };
+
+void MapWin::n_combo_changed(int prop)
+{
+
+  Gtk::Entry* entry = n_combo_array[prop].get_entry();
+
+  if(entry)
+  {
+    Glib::ustring mapname = entry->get_text();
+    if(!(mapname.empty())) //We seem to get 2 signals, one when the text is empty.
+    {
+      if(mapname=="Default")
+      {
+	mapname=node_property_strings[prop];
+      }
+
+      if( (ms.nodemap_storage).find(mapname) != (ms.nodemap_storage).end() )
+      {
+	switch(prop)
+	{
+          case N_RADIUS:
+	    gdc.changeNodeRadius(mapname);
+	    break;
+          case N_COLOR:
+	    gdc.changeNodeColor(mapname);
+	    break;
+          case N_TEXT:
+	    gdc.changeNodeText(mapname);
+	    break;
+          default:
+	    std::cout<<"Error\n";
+	}
+      }
+    }
+  }
+};
+
+void MapWin::update_node(Graph::Node node)
+{
+  for(int i=0;i<NODE_PROPERTY_NUM;i++)
+    {
+      Gtk::Entry* entry = n_combo_array[i].get_entry();
+
+      if(entry)
+	{
+	  Glib::ustring mapname = entry->get_text();
+	  if(!(mapname.empty())) //We seem to get 2 signals, one when the text is empty.
+	    {
+	      if(mapname=="Default")
+		{
+		  mapname=node_property_strings[i];
+		}
+
+	      if( (ms.nodemap_storage).find(mapname) != (ms.nodemap_storage).end() )
+		{
+		  switch(i)
+		    {
+		    case N_RADIUS:
+		      //gdc.changeNodeRadius(mapname, node);
+		      std::cout << "If default map-value problem is solved, uncomment line in MapWin::node_update!" << std::endl;
+		      break;
+		    case N_COLOR:
+		      gdc.changeNodeColor(mapname, node);
+		      break;
+		    case N_TEXT:
+		      gdc.changeNodeText(mapname, node);
+		      break;
+		    default:
+		      std::cout<<"Error\n";
+		    }
+		}
+	    }
+	}
+    }
+}
+
+void MapWin::update_edge(Graph::Edge edge)
+{
+  for(int i=0;i<EDGE_PROPERTY_NUM;i++)
+    {
+
+      Gtk::Entry* entry = e_combo_array[i].get_entry();
+
+      if(entry)
+	{
+	  Glib::ustring mapname = entry->get_text();
+	  if(!(mapname.empty())) //We seem to get 2 signals, one when the text is empty.
+	    {
+	      if(mapname=="Default")
+		{
+		  mapname=edge_property_strings[i];
+		}
+
+	      if( (ms.edgemap_storage).find(mapname) != (ms.edgemap_storage).end() )
+		{
+		  switch(i)
+		    {
+		    case E_WIDTH:
+		      //gdc.changeEdgeWidth(mapname, edge);
+		      std::cout << "If default map-value problem is solved, uncomment line in MapWin::edge_update!" << std::endl;
+		      break;
+		    case E_COLOR:
+		      gdc.changeEdgeColor(mapname, edge);
+		      break;
+		    case E_TEXT:
+		      gdc.changeEdgeText(mapname, edge);
+		      break;
+		    default:
+		      std::cout<<"Error\n";
+		    }
+		}
+	    }
+	}
+    }
+}
Index: gui/map_win.h
===================================================================
--- gui/map_win.h	(revision 1446)
+++ gui/map_win.h	(revision 1512)
@@ -3,4 +3,6 @@
 #ifndef MAP_WIN_H
 #define MAP_WIN_H
+
+class MapWin;
 
 #include <all_include.h>
@@ -25,12 +27,11 @@
   MapStorage & ms;
 
-  Gtk::Table table;
+  Gtk::Table * table;
   
-  Gtk::HBox combos, * labelpluscombo;
-  Gtk::Combo * combo_array;
-
-  Gtk::VBox vbox_b, vbox_r1, vbox_r2;
+  Gtk::Combo * e_combo_array, * n_combo_array;
 
   Gtk::Label * label;
+
+  Gtk::VBox vbox;
 
 public:
@@ -42,5 +43,17 @@
   ///appropriate function of the \ref GraphDisplayerCanvas
   ///to change the visible values of that attribute.
-  virtual void combo_changed(int);
+  virtual void e_combo_changed(int);
+  ///If a radiobutton is clicked, this function determines
+  ///which button was that and after that calls the
+  ///appropriate function of the \ref GraphDisplayerCanvas
+  ///to change the visible values of that attribute.
+  virtual void n_combo_changed(int);
+
+  ///This function is created to set the appropriate maps on the newly created node
+  void update_node(Graph::Node);
+
+  ///This function is created to set the appropriate maps on the newly created edge
+  void update_edge(Graph::Edge);
+
   virtual bool close_if_escape_is_pressed(GdkEventKey*);
 };
Index: gui/mapstorage.cc
===================================================================
--- gui/mapstorage.cc	(revision 1509)
+++ gui/mapstorage.cc	(revision 1512)
@@ -3,18 +3,32 @@
 MapStorage::MapStorage(Graph & graph):g(graph)
 {
-  for(int i=0;i<PROPERTY_NUM;i++)
+  for(int i=0;i<EDGE_PROPERTY_NUM;i++)
   {
-    Graph::EdgeMap<double> emd(g);
+    Graph::EdgeMap<double> emd(g,edge_property_defaults[i]);
     default_edgemaps.push_back(emd);
-    Graph::NodeMap<double> nmd(g);
+  }
+
+  for(int i=0;i<NODE_PROPERTY_NUM;i++)
+  {
+    Graph::NodeMap<double> nmd(g,node_property_defaults[i]);
     default_nodemaps.push_back(nmd);
   }
-  for(int i=0;i<PROPERTY_NUM;i++)
+
+  for(int i=0;i<EDGE_PROPERTY_NUM;i++)
   {
       for (EdgeIt j(g); j!=INVALID; ++j)
       {
-	(default_edgemaps[i])[j]=property_defaults[i];
+	(default_edgemaps[i])[j]=edge_property_defaults[i];
       }
-      addEdgeMap(property_strings[i],&(default_edgemaps[i]));
+      addEdgeMap(edge_property_strings[i],&(default_edgemaps[i]));
+  }
+
+  for(int i=0;i<NODE_PROPERTY_NUM;i++)
+  {
+      for (NodeIt j(g); j!=INVALID; ++j)
+      {
+	(default_nodemaps[i])[j]=node_property_defaults[i];
+      }
+      addNodeMap(node_property_strings[i],&(default_nodemaps[i]));
   }
 
@@ -100,5 +114,5 @@
 
 // g_closure_invoke...
-//   for(int i=0;i<PROPERTY_NUM;i++)
+//   for(int i=0;i<EDGE_PROPERTY_NUM;i++)
 //     {
 //       (default_edgemaps[i])[e]=property_defaults[i];
