Index: Makefile.am
===================================================================
--- Makefile.am	(revision 41)
+++ Makefile.am	(revision 48)
@@ -19,6 +19,4 @@
 	map_win.cc \
 	map_win.h \
-	edit_win.cc \
-	edit_win.h \
 	broken_edge.cc \
 	broken_edge.h \
Index: all_include.h
===================================================================
--- all_include.h	(revision 37)
+++ all_include.h	(revision 48)
@@ -23,5 +23,8 @@
 #define WIN_WIDTH 900
 #define WIN_HEIGHT 600
-#define ALMOST_ONE 0.9999999999
+#define MIN_EDGE_WIDTH 2
+#define MAX_EDGE_WIDTH 40
+#define MIN_NODE_RADIUS 2
+#define MAX_NODE_RADIUS 80
 
 #ifndef MAIN_PART
Index: graph_displayer_canvas-edge.cc
===================================================================
--- graph_displayer_canvas-edge.cc	(revision 47)
+++ graph_displayer_canvas-edge.cc	(revision 48)
@@ -7,10 +7,16 @@
 {
   Graph::EdgeMap<double> * actual_map;
+  double min, max;
+
   if(mapname=="Default")
     {
+      min=edge_property_defaults[E_WIDTH];
+      max=edge_property_defaults[E_WIDTH];
       actual_map=new Graph::EdgeMap<double>(g,edge_property_defaults[E_WIDTH]);
     }
   else
     {
+      min=mapstorage.minOfEdgeMap(mapname);
+      max=mapstorage.maxOfEdgeMap(mapname);
       actual_map=(mapstorage.edgemap_storage)[mapname];
     }
@@ -20,9 +26,15 @@
       for (EdgeIt i(g); i!=INVALID; ++i)
 	{
-	  int w=(int)(*actual_map)[i];
-	  if(w>=0)
+	  double v=abs((*actual_map)[i]);
+	  int w;
+	  if(min==max)
 	    {
-	      edgesmap[i]->property_width_units().set_value(w);
+	      w=(int)(edge_property_defaults[E_WIDTH]);
 	    }
+	  else
+	    {
+	      w=(int)(MIN_EDGE_WIDTH+(v-min)/(max-min)*(MAX_EDGE_WIDTH-MIN_EDGE_WIDTH));
+	    }
+	  edgesmap[i]->property_width_units().set_value(w);
 	}
     }
Index: graph_displayer_canvas-event.cc
===================================================================
--- graph_displayer_canvas-event.cc	(revision 47)
+++ graph_displayer_canvas-event.cc	(revision 48)
@@ -217,5 +217,5 @@
       //draw the new node in red at the clicked place
     case GDK_2BUTTON_PRESS:
-      std::cout << "double click" << std::endl;
+      //std::cout << "double click" << std::endl;
       break;
     case GDK_BUTTON_PRESS:
@@ -382,5 +382,5 @@
 		    {
 		      target_node=INVALID;
-		      std::cout << "Loop edge is not yet implemented!" << std::endl;
+		      std::cerr << "Loop edge is not yet implemented!" << std::endl;
 		    }
 		}
@@ -528,34 +528,94 @@
 bool GraphDisplayerCanvas::edgeMapEditEventHandler(GdkEvent* e)
 {
-  switch(e->type)
-    {
-    case GDK_KEY_PRESS:
-      //for Escape or Enter hide the displayed widget
-      {
-	nodeMapEditEventHandler(e);
-	break;
-      }
-    case GDK_BUTTON_PRESS:
-      //If the click happened on an edge we place the entrywidget there and fill in the value of the activated map at that edge.
-      {
-	//find the activated item
-	window_to_world (e->button.x, e->button.y, clicked_x, clicked_y);
-	active_item=(get_item_at(clicked_x, clicked_y));
-
-	//determine, whether it was an edge
-	Graph::EdgeIt clicked_edge=INVALID;
-	for (EdgeIt i(g); i!=INVALID; ++i)
+  if(actual_tool==EDGE_MAP_EDIT)
+    {
+      switch(e->type)
+	{
+	case GDK_KEY_PRESS:
+	  //for Escape or Enter hide the displayed widget
 	  {
-	    if(edgesmap[i]==active_item)
-	      {
-		clicked_edge=i;
-	      }
+	    nodeMapEditEventHandler(e);
+	    break;
 	  }
-	//if it was really an edge...
-	if(clicked_edge!=INVALID)
+	case GDK_BUTTON_PRESS:
+	  //If the click happened on an edge we place the entrywidget there and fill in the value of the activated map at that edge.
 	  {
-	    //If there is already edited edge, it has to be saved first
-	    if(entrywidget.is_visible())
-	      {
+	    //for determine, whether it was an edge
+	    Graph::EdgeIt clicked_edge=INVALID;
+
+	    //find the activated item between texts
+	    active_item=(get_item_at(e->button.x, e->button.y));
+	    for (EdgeIt i(g); i!=INVALID; ++i)
+	      {
+		if(edgetextmap[i]==active_item)
+		  {
+		    clicked_edge=i;
+		  }
+	      }
+
+	    //if it was not between texts, search for it between edges
+	    if(clicked_edge==INVALID)
+	      {
+		window_to_world (e->button.x, e->button.y, clicked_x, clicked_y);
+		active_item=(get_item_at(clicked_x, clicked_y));
+
+		for (EdgeIt i(g); i!=INVALID; ++i)
+		  {
+		    //at the same time only one can be active
+		    if((edgesmap[i]==active_item)||(edgetextmap[i]==active_item))
+		      {
+			clicked_edge=i;
+		      }
+		  }
+	      }
+	    //if it was really an edge...
+	    if(clicked_edge!=INVALID)
+	      {
+		//If there is already edited edge, it has to be saved first
+		if(entrywidget.is_visible())
+		  {
+		    GdkEvent * generated=new GdkEvent();
+		    generated->type=GDK_KEY_PRESS;
+		    ((GdkEventKey*)generated)->keyval=GDK_KP_Enter;
+		    entryWidgetChangeHandler(generated);
+		  }
+		//If the previous value could be saved, we can go further, otherwise not
+		if(!entrywidget.is_visible())
+		  {
+		    //and there is activated map
+		    if(edgetextmap[clicked_edge]->property_text().get_value()!="")
+		      {
+			//activate the general variable for it
+			active_edge=clicked_edge;
+			//delete visible widget if there is
+			if(canvasentrywidget)
+			  {
+			    delete(canvasentrywidget);
+			  }
+
+			//initialize the entry
+			entrywidget.show();
+
+			//fill in the correct value
+			entrywidget.set_text(edgetextmap[active_edge]->property_text().get_value());
+
+			//replace and resize the entry to the activated edge and put it in a Canvas::Widget to be able to display it on gdc
+			xy<double> entry_coos;
+			entry_coos.x=(edgetextmap[active_edge])->property_x().get_value();
+			entry_coos.x-=edgetextmap[active_edge]->property_text_width().get_value()/2;
+			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()*4);
+			canvasentrywidget->property_height().set_value(edgetextmap[active_edge]->property_text_height().get_value()*1.5);
+		      }
+		  }
+	      }
+	    //if it was not an edge...
+	    else
+	      {
+		//In this case the click did not happen on an edge
+		//if there is visible entry we save the value in it
+		//we pretend like an Enter was presse din the Entry widget
 		GdkEvent * generated=new GdkEvent();
 		generated->type=GDK_KEY_PRESS;
@@ -563,100 +623,118 @@
 		entryWidgetChangeHandler(generated);
 	      }
-	    //If the previous value could be saved, we can go further, otherwise not
-	    if(!entrywidget.is_visible())
-	      {
-		//and there is activated map
-		if(edgetextmap[clicked_edge]->property_text().get_value()!="")
-		  {
-		    //activate the general variable for it
-		    active_edge=clicked_edge;
-		    //delete visible widget if there is
-		    if(canvasentrywidget)
-		      {
-			delete(canvasentrywidget);
-		      }
-
-		    //initialize the entry
-		    entrywidget.show();
-
-		    //fill in the correct value
-		    entrywidget.set_text(edgetextmap[active_edge]->property_text().get_value());
-
-		    //replace and resize the entry to the activated edge and put it in a Canvas::Widget to be able to display it on gdc
-		    xy<double> entry_coos;
-		    entry_coos.x=(edgetextmap[active_edge])->property_x().get_value();
-		    entry_coos.x-=edgetextmap[active_edge]->property_text_width().get_value()/2;
-		    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()*4);
-		    canvasentrywidget->property_height().set_value(edgetextmap[active_edge]->property_text_height().get_value()*1.5);
-		  }
-	      }
-	  }
-	//if it was not an edge...
-	else
-	  {
-	    //In this case the click did not happen on an edge
-	    //if there is visible entry we save the value in it
-	    //we pretend like an Enter was presse din the Entry widget
-	    GdkEvent * generated=new GdkEvent();
-	    generated->type=GDK_KEY_PRESS;
-	    ((GdkEventKey*)generated)->keyval=GDK_KP_Enter;
-	    entryWidgetChangeHandler(generated);
-	  }
-	break;
-      }
-    default:
-      break;
-    }
-  return false;  
-}
-
-bool GraphDisplayerCanvas::nodeMapEditEventHandler(GdkEvent* e)
-{
-  switch(e->type)
-    {
-    case GDK_KEY_PRESS:
-      //for Escape or Enter hide the displayed widget
-      {
-	switch(((GdkEventKey*)e)->keyval)
-	  {
-	  case GDK_Escape:
-	    entrywidget.hide();
-	    break;
-	  case GDK_Return:
-	  case GDK_KP_Enter:
-	    entrywidget.hide();
-	    break;
-	  default:
 	    break;
 	  }
+	default:
+	  break;
+	}
+    }
+  return false;  
+}
+
+bool GraphDisplayerCanvas::nodeMapEditEventHandler(GdkEvent* e)
+{
+  if(actual_tool==NODE_MAP_EDIT)
+    {
+      switch(e->type)
+	{
+	case GDK_KEY_PRESS:
+	  //for Escape or Enter hide the displayed widget
+	  {
+	    switch(((GdkEventKey*)e)->keyval)
+	      {
+	      case GDK_Escape:
+		entrywidget.hide();
+		break;
+	      case GDK_Return:
+	      case GDK_KP_Enter:
+		entrywidget.hide();
+		break;
+	      default:
+		break;
+	      }
   
-	break;
-      }
-    case GDK_BUTTON_PRESS:
-      //If the click happened on an edge we place the entrywidget there and fill in the value of the activated map at that edge.
-      {
-	//find the activated item
-	window_to_world (e->button.x, e->button.y, clicked_x, clicked_y);
-	active_item=(get_item_at(clicked_x, clicked_y));
-
-	//determine, whether it was a node
-	Graph::NodeIt clicked_node=INVALID;
-	for (NodeIt i(g); i!=INVALID; ++i)
+	    break;
+	  }
+	case GDK_BUTTON_PRESS:
+	  //If the click happened on an edge we place the entrywidget there and fill in the value of the activated map at that edge.
 	  {
-	    if(nodesmap[i]==active_item)
-	      {
-		clicked_node=i;
-	      }
-	  }
-
-	//if it was really an edge...
-	if(clicked_node!=INVALID)
-	  {
-	    //If there is already edited edge, it has to be saved first
-	    if(entrywidget.is_visible())
-	      {
+	    //for determine, whether it was a node
+	    Graph::NodeIt clicked_node=INVALID;
+
+	    //find the activated item between texts
+	    active_item=(get_item_at(e->button.x, e->button.y));
+	    for (NodeIt i(g); i!=INVALID; ++i)
+	      {
+		//at the same time only one can be active
+		if(nodetextmap[i]==active_item)
+		  {
+		    clicked_node=i;
+		  }
+	      }
+
+	    //if there was not, search for it between nodes
+	    if(clicked_node==INVALID)
+	      {
+		window_to_world (e->button.x, e->button.y, clicked_x, clicked_y);
+		active_item=(get_item_at(clicked_x, clicked_y));
+
+		for (NodeIt i(g); i!=INVALID; ++i)
+		  {
+		    //at the same time only one can be active
+		    if(nodesmap[i]==active_item)
+		      {
+			clicked_node=i;
+		      }
+		  }
+	      }
+	    //if it was really an edge...
+	    if(clicked_node!=INVALID)
+	      {
+		//If there is already edited edge, it has to be saved first
+		if(entrywidget.is_visible())
+		  {
+		    GdkEvent * generated=new GdkEvent();
+		    generated->type=GDK_KEY_PRESS;
+		    ((GdkEventKey*)generated)->keyval=GDK_KP_Enter;
+		    entryWidgetChangeHandler(generated);
+		  }
+		//If the previous value could be saved, we can go further, otherwise not
+		if(!entrywidget.is_visible())
+		  {
+		    //and there is activated map
+		    if(nodetextmap[clicked_node]->property_text().get_value()!="")
+		      {
+			//activate the general variable for it
+			active_node=clicked_node;
+			//delete visible widget if there is
+			if(canvasentrywidget)
+			  {
+			    delete(canvasentrywidget);
+			  }
+
+			//initialize the entry
+			entrywidget.show();
+
+			//fill in the correct value
+			entrywidget.set_text(nodetextmap[active_node]->property_text().get_value());
+
+			//replace and resize the entry to the activated node and put it in a Canvas::Widget to be able to display it on gdc
+			xy<double> entry_coos;
+			entry_coos.x=(nodetextmap[active_node])->property_x().get_value();
+			entry_coos.x-=nodetextmap[active_node]->property_text_width().get_value()/2;
+			entry_coos.y=(nodetextmap[active_node])->property_y().get_value();
+			entry_coos.y-=nodetextmap[active_node]->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(nodetextmap[active_node]->property_text_width().get_value()*4);
+			canvasentrywidget->property_height().set_value(nodetextmap[active_node]->property_text_height().get_value()*1.5);
+		      }
+		  }
+	      }
+	    //if it was not an edge...
+	    else
+	      {
+		//In this case the click did not happen on an edge
+		//if there is visible entry we save the value in it
+		//we pretend like an Enter was presse din the Entry widget
 		GdkEvent * generated=new GdkEvent();
 		generated->type=GDK_KEY_PRESS;
@@ -664,51 +742,9 @@
 		entryWidgetChangeHandler(generated);
 	      }
-	    //If the previous value could be saved, we can go further, otherwise not
-	    if(!entrywidget.is_visible())
-	      {
-		//and there is activated map
-		if(nodetextmap[clicked_node]->property_text().get_value()!="")
-		  {
-		    //activate the general variable for it
-		    active_node=clicked_node;
-		    //delete visible widget if there is
-		    if(canvasentrywidget)
-		      {
-			delete(canvasentrywidget);
-		      }
-
-		    //initialize the entry
-		    entrywidget.show();
-
-		    //fill in the correct value
-		    entrywidget.set_text(nodetextmap[active_node]->property_text().get_value());
-
-		    //replace and resize the entry to the activated node and put it in a Canvas::Widget to be able to display it on gdc
-		    xy<double> entry_coos;
-		    entry_coos.x=(nodetextmap[active_node])->property_x().get_value();
-		    entry_coos.x-=nodetextmap[active_node]->property_text_width().get_value()/2;
-		    entry_coos.y=(nodetextmap[active_node])->property_y().get_value();
-		    entry_coos.y-=nodetextmap[active_node]->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(nodetextmap[active_node]->property_text_width().get_value()*1.5);
-		    canvasentrywidget->property_height().set_value(nodetextmap[active_node]->property_text_height().get_value()*1.5);
-		  }
-	      }
+	    break;
 	  }
-	//if it was not an edge...
-	else
-	  {
-	    //In this case the click did not happen on an edge
-	    //if there is visible entry we save the value in it
-	    //we pretend like an Enter was presse din the Entry widget
-	    GdkEvent * generated=new GdkEvent();
-	    generated->type=GDK_KEY_PRESS;
-	    ((GdkEventKey*)generated)->keyval=GDK_KP_Enter;
-	    entryWidgetChangeHandler(generated);
-	  }
-	break;
-      }
-    default:
-      break;
+	default:
+	  break;
+	}
     }
   return false;  
@@ -783,5 +819,5 @@
 		else
 		  {
-		    std::cout << "ERROR: only handling of double values is implemented yet!" << std::endl;
+		    std::cerr << "ERROR: only handling of double values is implemented yet!" << std::endl;
 		  }
 
@@ -830,5 +866,5 @@
       if(forming_edge!=INVALID)
 	{
-	  std::cout << "ERROR!!!! Valid edge found!" << std::endl;
+	  std::cerr << "ERROR!!!! Valid edge found!" << std::endl;
 	}
       else
@@ -851,5 +887,5 @@
       else
 	{
-	  std::cout << "ERROR!!!! Invalid edge found!" << std::endl;
+	  std::cerr << "ERROR!!!! Invalid edge found!" << std::endl;
 	}
     }
Index: graph_displayer_canvas-node.cc
===================================================================
--- graph_displayer_canvas-node.cc	(revision 45)
+++ graph_displayer_canvas-node.cc	(revision 48)
@@ -7,10 +7,15 @@
 {
   Graph::NodeMap<double> * actual_map;
+  double min, max;
   if(mapname=="Default")
     {
+      min=node_property_defaults[N_RADIUS];
+      max=node_property_defaults[N_RADIUS];
       actual_map=new Graph::NodeMap<double>(g,node_property_defaults[N_RADIUS]);
     }
   else
     {
+      min=mapstorage.minOfNodeMap(mapname);
+      max=mapstorage.maxOfNodeMap(mapname);
       actual_map=(mapstorage.nodemap_storage)[mapname];
     }
@@ -20,5 +25,14 @@
       for (NodeIt i(g); i!=INVALID; ++i)
 	{
-	  int w=(int)(*actual_map)[i];
+	  double v=abs((*actual_map)[i]);
+	  int w;
+	  if(min==max)
+	    {
+	      w=(int)(node_property_defaults[N_RADIUS]);
+	    }
+	  else
+	    {
+	      w=(int)(MIN_NODE_RADIUS+(v-min)/(max-min)*(MAX_NODE_RADIUS-MIN_NODE_RADIUS));
+	    }
 	  if(w>=0)
 	    {
Index: graph_displayer_canvas.cc
===================================================================
--- graph_displayer_canvas.cc	(revision 47)
+++ graph_displayer_canvas.cc	(revision 48)
@@ -42,4 +42,5 @@
     edgetextmap[i]=new Gnome::Canvas::Text(displayed_graph, text_pos.x, text_pos.y, "");
     edgetextmap[i]->property_fill_color().set_value("darkgreen");
+    edgetextmap[i]->signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::edgeMapEditEventHandler), false);
   }
 
@@ -70,4 +71,5 @@
     nodetextmap[i]=new Gnome::Canvas::Text(displayed_graph, text_pos.x, text_pos.y, "");
     nodetextmap[i]->property_fill_color().set_value("darkblue");
+    nodetextmap[i]->signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::nodeMapEditEventHandler), false);
   }
 
Index: map_win.cc
===================================================================
--- map_win.cc	(revision 43)
+++ map_win.cc	(revision 48)
@@ -145,5 +145,5 @@
 	    break;
           default:
-	    std::cout<<"Error\n";
+	    std::cerr<<"Error\n";
 	}
       }
@@ -176,5 +176,5 @@
 	    break;
           default:
-	    std::cout<<"Error\n";
+	    std::cerr<<"Error\n";
 	}
       }
@@ -208,5 +208,5 @@
 		      break;
 		    default:
-		      std::cout<<"Error\n";
+		      std::cerr<<"Error\n";
 		    }
 		}
@@ -243,5 +243,5 @@
 		      break;
 		    default:
-		      std::cout<<"Error\n";
+		      std::cerr<<"Error\n";
 		    }
 		}
