Index: gui/graph-displayer.cc
===================================================================
--- gui/graph-displayer.cc	(revision 1435)
+++ gui/graph-displayer.cc	(revision 1440)
@@ -13,4 +13,7 @@
 int main(int argc, char *argv[])
 {
+
+  //initializing
+
   property_strings=new std::string[PROPERTY_NUM];
   property_strings[WIDTH]="Width";
@@ -35,11 +38,12 @@
   CoordinatesMap cm(g);
   Graph::EdgeMap<double> cap(g), map1(g), map2(g), map3(g), map4(g);
+  Graph::NodeMap<double> nodedata (g);
 
   //we create one object to read x coordinates
   //and one to read y coordinate of nodes and write them to cm NodeMap.
-
   XMap <CoordinatesMap> xreader (cm);
   YMap <CoordinatesMap> yreader (cm);
-  Graph::NodeMap<double> nodedata (g);
+
+  //reading in graph and its maps
 
   std::ifstream is(argv[1]);
@@ -56,4 +60,6 @@
   reader.run();
 
+  //initializing MapStorage with the read data
+
   MapStorage ms(g);
   ms.addNodeMap("data",&nodedata);
@@ -63,4 +69,6 @@
   ms.addEdgeMap("map3",&map3);
   ms.addEdgeMap("map4",&map4);
+
+  //initializing GUI
 
   Gnome::Canvas::init();
Index: gui/graph_displayer_canvas.cc
===================================================================
--- gui/graph_displayer_canvas.cc	(revision 1435)
+++ gui/graph_displayer_canvas.cc	(revision 1440)
@@ -1,9 +1,15 @@
 #include <graph_displayer_canvas.h>
+#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(false),active_item(NULL)
 {
 
+  //first edges are drawn, to hide joining with nodes later
+
   for (EdgeIt i(g); i!=INVALID; ++i)
   {
+
+    //drawing green lines, coordinates are from cm
+
     Gnome::Canvas::Points coos;
     coos.push_back(Gnome::Art::Point(cm[g.source(i)].x,cm[g.source(i)].y));
@@ -12,7 +18,8 @@
     edgesmap[i]=new Gnome::Canvas::Line(displayed_graph, coos);
     *(edgesmap[i]) << Gnome::Canvas::Properties::fill_color("green");
-    edgesmap[i]->property_width_pixels().set_value(10);
+    edgesmap[i]->property_width_pixels().set_value(10);    
     
-    
+    //initializing edge-text as well, to empty string
+
     double x1, x2, y1, y2;
     edgesmap[i]->get_bounds(x1, y1, x2, y2);
@@ -22,4 +29,6 @@
   }
 
+  //afterwards nodes come to be drawn
+
   NodeIt i(g);
   int maxx=0, maxy=0, minx=(int)cm[i].x, miny=(int)cm[i].y;
@@ -27,4 +36,6 @@
   for (; i!=INVALID; ++i)
   {
+    //minimum and maximum is gathered to be able to zoom to the graph correctly (whole figure should be seen)
+
     if(cm[i].x>maxx)maxx=(int)cm[i].x;
     if(cm[i].y>maxy)maxy=(int)cm[i].y;
@@ -32,4 +43,6 @@
     if(cm[i].y<miny)miny=(int)cm[i].y;
 
+    //drawing bule nodes, with black line around them
+
     nodesmap[i]=new Gnome::Canvas::Ellipse(displayed_graph, cm[i].x-20, cm[i].y-20, cm[i].x+20, cm[i].y+20);
     *(nodesmap[i]) << Gnome::Canvas::Properties::fill_color("blue");
@@ -38,4 +51,6 @@
   }
 
+  //setting zoom to be able to see the whole graph on the canvas
+
   double biggest_x=(abs(maxx)>abs(minx))?(abs(maxx)+80):(abs(minx)+80);
   double biggest_y=(abs(maxy)>abs(miny))?(abs(maxy)+80):(abs(miny)+80);
@@ -50,26 +65,30 @@
 GraphDisplayerCanvas::~GraphDisplayerCanvas()
 {
-    Graph::NodeMap <int> id(g);
-    Graph::NodeMap <double> xc(g);
-    Graph::NodeMap <double> yc(g);
-
-    int j=1;
-
-    for (NodeIt i(g); i!=INVALID; ++i)
-    {
-        double x1,y1,x2,y2;
-        nodesmap[i]->get_bounds(x1, y1, x2, y2);
-
-        id[i]=j++;
-        xc[i]=(x1+x2)/2;
-        yc[i]=(y1+y2)/2;
-    }
-
-    GraphWriter<Graph> writer(std::cout,g);
-
-    writer.writeNodeMap("id", id);
-    writer.writeNodeMap("coordinates_x", xc);
-    writer.writeNodeMap("coordinates_y", yc);
-    writer.run();
+
+  //writing out the end state of the graph
+  //\todo all the maps has to be write out!
+
+  Graph::NodeMap <int> id(g);
+  Graph::NodeMap <double> xc(g);
+  Graph::NodeMap <double> yc(g);
+  
+  int j=1;
+  
+  for (NodeIt i(g); i!=INVALID; ++i)
+  {
+    double x1,y1,x2,y2;
+    nodesmap[i]->get_bounds(x1, y1, x2, y2);
+    
+    id[i]=j++;
+    xc[i]=(x1+x2)/2;
+    yc[i]=(y1+y2)/2;
+  }
+
+  GraphWriter<Graph> writer(std::cout,g);
+  
+  writer.writeNodeMap("id", id);
+  writer.writeNodeMap("coordinates_x", xc);
+  writer.writeNodeMap("coordinates_y", yc);
+  writer.run();
 }
 
@@ -86,4 +105,9 @@
 int GraphDisplayerCanvas::changeColor (std::string mapname)
 {  
+
+  //function maps the range of the maximum and
+  //the minimum of the nodemap to the range of
+  //green in RGB
+
   for (EdgeIt i(g); i!=INVALID; ++i)
   {
@@ -110,4 +134,11 @@
 int GraphDisplayerCanvas::changeText (std::string mapname)
 {
+
+  //the number in the map will be written on the edge
+  //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?
+
   for (EdgeIt i(g); i!=INVALID; ++i)
   {
@@ -146,4 +177,11 @@
 int GraphDisplayerCanvas::rezoom ()
 {
+
+  //searches for the minimum and the maximum
+  //value of the coordinates of the nodes to
+  //set the pixel rpo unit to a value to be 
+  //able to see the whole graph in the canvas
+  //\todo does not work properly
+
   double x1, x2, y1, y2;
   int x,y;
@@ -178,7 +216,4 @@
 
 
-///This function moves only one node of displayed_graph,
-///but recalculate the location of weight point,
-///and also redraw the sides of the planefigure.
 bool GraphDisplayerCanvas::event_handler(GdkEvent* e, Node n)
 {
@@ -186,4 +221,5 @@
   {
     case GDK_BUTTON_PRESS:
+      //we mark the location of the event to be able to calculate parameters of dragging
       clicked_x=e->button.x;
       clicked_y=e->button.y;
@@ -196,6 +232,12 @@
       break;
     case GDK_MOTION_NOTIFY:
+      //we only have to do sg. if the mouse button is pressed
       if(isbutton)
       {
+	//new coordinates will be the old values,
+	//because the item will be moved to the
+	//new coordinate therefore the new movement
+	//has to be calculated from here
+
         double dx=e->motion.x-clicked_x;
         double dy=e->motion.y-clicked_y;
@@ -204,6 +246,7 @@
         clicked_y=e->motion.y;
 
+	//all the edges connected to the moved point has to be redrawn
+
         EdgeIt e;
-
         g.firstOut(e,n);
         for(;e!=INVALID;g.nextOut(e))
Index: gui/graph_displayer_canvas.h
===================================================================
--- gui/graph_displayer_canvas.h	(revision 1435)
+++ gui/graph_displayer_canvas.h	(revision 1440)
@@ -9,4 +9,5 @@
 #include <libgnomecanvasmm/polygon.h>
 
+///This class is the canvas, on which the graph can be drawn.
 class GraphDisplayerCanvas : public Gnome::Canvas::CanvasAA
 {
@@ -17,23 +18,38 @@
   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);
+
+  ///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);
+
+  ///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);
+
+  ///Changes the dot-pro-pixel to be able to show the whole graph.
   int rezoom();
 
 protected:
 
+  //maximizing, minimizing, restoring window, etc. 
   virtual bool on_expose_event(GdkEventExpose *);
 
 private:
 
-  ///Event handler function that handles dragging nodes of displayed_graph
+  ///This function is responsible for the correct
+  ///reaction of any action happened in the territory
+  ///of the canvas
   bool event_handler(GdkEvent* e, Node n);
 
   ///The graph, on which we work
   Graph g;
-  ///Map of nodes of planefigure
+
+  ///Map of nodes of graph
   Graph::NodeMap<Gnome::Canvas::Ellipse *> nodesmap;
-  ///Map of edges of planefigure
+
+  ///Map of edges of graph
   Graph::EdgeMap<Gnome::Canvas::Line *> edgesmap;
 
Index: gui/main_win.h
===================================================================
--- gui/main_win.h	(revision 1435)
+++ gui/main_win.h	(revision 1440)
@@ -10,32 +10,39 @@
 #include <libgnomecanvasmm/polygon.h>
 
+///This class is the main window of GUI.
+///It has menus, but the main part of it is the canvas.
 class MainWin : public Gtk::Window
 {
 public:
+  ///Constructor of the \ref MainWin. It creates the menu and the \ref GraphDisplayerCanvas on which the graph will be drawn.
+  ///\param title is the title of the window
+  ///\param graph is the graph that will be drawn here. It will be given further to the \ref GraphDisplayerCanvas
+  ///\param cm stores the coordinates of the nodes of the graph
+  ///\param ms is the \ref MapStorage in which the different visualizable maps are stored
   MainWin(const std::string& title, Graph &, CoordinatesMap &, MapStorage &);
 
 protected:
-  //Window of map-showing setup
+  ///Window of map-showing setup. Its type is \ref MapWin
   MapWin mapwin;
 
-  //Member widgets:
+  ///The graph will be drawn on this \ref GraphDisplayerCanvas
   GraphDisplayerCanvas gd_canvas;
 
-  //ActionGroup for menu
+  ///ActionGroup for menu
   Glib::RefPtr<Gtk::ActionGroup> ag;
 
-  //UIManager for menu
+  ///UIManager for menu
   Glib::RefPtr<Gtk::UIManager> uim;
 
-  //Container
+  ///Container
   Gtk::VBox vbox;
 
-  //Pops up map-setup window
+  ///This function makes map-setup window popped up.
   virtual void showMaps();
 
-  //Exit
+  ///Exit
   virtual void quit();
 
-  //Refit screen
+  ///Refit screen to be able to show the whole graph.
   virtual void rezoom();
 
Index: gui/map_win.cc
===================================================================
--- gui/map_win.cc	(revision 1435)
+++ gui/map_win.cc	(revision 1440)
@@ -4,4 +4,7 @@
 MapWin::MapWin(const std::string& title, MapStorage & mapst, GraphDisplayerCanvas & grdispc):gdc(grdispc),ms(mapst)
 {
+
+  //most nem kommentezem fel, mert ugyis valtozik
+
   set_title(title);
   set_default_size(400, 200);
@@ -89,4 +92,7 @@
 void MapWin::radio_click(int prop, int actpos)
 {
+
+  //most nem kommentezem fel, mert ugyis valtozik
+
   if(rb_array[prop][actpos].get_active())
   {
Index: gui/map_win.h
===================================================================
--- gui/map_win.h	(revision 1435)
+++ gui/map_win.h	(revision 1440)
@@ -10,19 +10,38 @@
 #include <libgnomecanvasmm/polygon.h>
 
+///This class is responsible for creating a window,
+///on which the visualization attributes can be
+///assigned to maps.
 class MapWin : public Gtk::Window
 {
 protected:
+  ///The \ref GraphDisplayerCanvas on which the graph will be drawn.
+  ///It has to be known for this class, because
+  ///when a map assigned to a certain attribute
+  ///a function of the \ref GraphDisplayerCanvas will be called.
   GraphDisplayerCanvas & gdc;
+
+  ///The \ref MapStorage in which the visualizable maps are stored
   MapStorage & ms;
 
+  
   Gtk::HBox * radios;
   Gtk::RadioButton ** rb_array;
 
   Gtk::VBox vbox_b, * vbox_r1, * vbox_r2;
+
+  ///The notebook has different pages for each attribute.
   Gtk::Notebook notebook;
+
   Gtk::Label * labels;
 
 public:
+  ///Constructor of MapWin creates the widgets shown in MapWin.
   MapWin(const std::string& title, MapStorage &, GraphDisplayerCanvas &);
+
+  ///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 radio_click(int, int);
 };
Index: gui/mapstorage.cc
===================================================================
--- gui/mapstorage.cc	(revision 1435)
+++ gui/mapstorage.cc	(revision 1440)
@@ -10,6 +10,4 @@
     default_nodemaps.push_back(nmd);
   }
-
-  //std::string defaultstr="Default ";
   for(int i=0;i<PROPERTY_NUM;i++)
   {
@@ -28,4 +26,5 @@
   return 0;
 }
+
 int MapStorage::addEdgeMap(const std::string & name, Graph::EdgeMap<double> *edgemap)
 {
Index: gui/mapstorage.h
===================================================================
--- gui/mapstorage.h	(revision 1435)
+++ gui/mapstorage.h	(revision 1440)
@@ -6,30 +6,78 @@
 #include <all_include.h>
 
+///Class MapStorage is responsible for storing
+///NodeMaps and EdgeMaps that can be shown later
+///on GUI. Therefore maps can be added to it,
+///and datas over the added maps can be queried.
+///The maps will be stored in an std::map,
+///referenced with their names. Unfortunately at
+///the moment it works only with double type maps
+///
+///\todo too many things are public!!
 class MapStorage
 {
+public:
 
-public: ///!!!!!!!!
   Graph g;
+
+  ///Stores double type NodeMaps
   std::map< std::string,Graph::NodeMap<double> * > nodemap_storage;
+
+  ///Stores double type EdgeMaps
   std::map< std::string,Graph::EdgeMap<double> * > edgemap_storage;
 
+  //Stores the default values for the different visualization node attributes
   std::vector<Graph::NodeMap<double> > default_nodemaps;
+
+  //Stores the default values for the different visualization edge attributes
   std::vector<Graph::EdgeMap<double> > default_edgemaps;
 
 public:
+  ///Constructor of MapStorage. Expects the Graph of
+  ///which maps will be stored in it.
+  ///Its all activity is initializing default values
+  ///for different visualization attributes
+  ///
+  ///\param graph is the graph for which the maps are stored in this object.
   MapStorage(Graph &);
+
+  ///Adds given map to storage. A name and the map itself has to be provided.
+  ///\param name is the name of map
+  ///\nodemap is the pointer of the given nodemap
+  ///\todo map should be given by reference!
   int addNodeMap(const std::string &,Graph::NodeMap<double> *);
+
+  ///Adds given map to storage. A name and the map itself has to be provided.
+  ///\param name is the name of map
+  ///\edgemap is the pointer of the given edgemap
+  ///\todo map should be given by reference!
   int addEdgeMap(const std::string &,Graph::EdgeMap<double> *);
 
+  ///Returns how much nodemaps is stored in \ref MapStorage
   int numOfNodeMaps() {return nodemap_storage.size();};
+
+  ///Returns how much edgemaps is stored in \ref MapStorage
   int numOfEdgeMaps() {return edgemap_storage.size();};
 
+  ///Returns the maximum value of the given NodeMap. NodeMap has to be given by its name.
+  ///\param name is the name of map of which maximum is searched
   double maxOfNodeMap(const std::string &);
+
+  ///Returns the maximum value of the given EdgeMap. EdgeMap has to be given by its name.
+  ///\param name is the name of map of which maximum is searched
   double maxOfEdgeMap(const std::string &);
 
+  ///Returns the minimum value of the given NodeMap. NodeMap has to be given by its name.
+  ///\param name is the name of map of which minimum is searched
   double minOfNodeMap(const std::string &);
+
+  ///Returns the minimum value of the given EdgeMap. EdgeMap has to be given by its name.
+  ///\param name is the name of map of which minimum is searched
   double minOfEdgeMap(const std::string &);
 
+  ///To be able to iterate through each maps this function returns an iterator pointing to the first nodemap in the storage.
   std::map< std::string,Graph::NodeMap<double> * >::iterator beginOfNodeMaps(){return nodemap_storage.begin();};
+
+  ///To be able to iterate through each maps this function returns an iterator pointing to the first edgemap in the storage.
   std::map< std::string,Graph::EdgeMap<double> * >::iterator beginOfEdgeMaps(){return edgemap_storage.begin();};
 };
