gui/graph_displayer_canvas.h
changeset 1440 3d2e3cfb2a6c
parent 1435 8e85e6bbefdf
child 1441 fd4b6f6d592a
     1.1 --- a/gui/graph_displayer_canvas.h	Thu May 26 16:32:26 2005 +0000
     1.2 +++ b/gui/graph_displayer_canvas.h	Fri May 27 10:34:20 2005 +0000
     1.3 @@ -8,6 +8,7 @@
     1.4  #include <libgnomecanvasmm.h>
     1.5  #include <libgnomecanvasmm/polygon.h>
     1.6  
     1.7 +///This class is the canvas, on which the graph can be drawn.
     1.8  class GraphDisplayerCanvas : public Gnome::Canvas::CanvasAA
     1.9  {
    1.10    typedef Gnome::Canvas::CanvasAA Parent;
    1.11 @@ -16,25 +17,40 @@
    1.12    GraphDisplayerCanvas(Graph &, CoordinatesMap &, MapStorage &);
    1.13    virtual ~GraphDisplayerCanvas();
    1.14  
    1.15 +  ///Changes the linewidth attribute according to the given map.
    1.16 +  ///\param mapname is the name of the map which contains the new values
    1.17    int changeLineWidth (std::string mapname);
    1.18 +
    1.19 +  ///Changes the linecolor attribute according to the given map.
    1.20 +  ///\param mapname is the name of the map which contains the new values
    1.21    int changeColor (std::string mapname);
    1.22 +
    1.23 +  ///Changes the text of line attribute according to the given map.
    1.24 +  ///\param mapname is the name of the map which contains the new values
    1.25    int changeText (std::string mapname);
    1.26 +
    1.27 +  ///Changes the dot-pro-pixel to be able to show the whole graph.
    1.28    int rezoom();
    1.29  
    1.30  protected:
    1.31  
    1.32 +  //maximizing, minimizing, restoring window, etc. 
    1.33    virtual bool on_expose_event(GdkEventExpose *);
    1.34  
    1.35  private:
    1.36  
    1.37 -  ///Event handler function that handles dragging nodes of displayed_graph
    1.38 +  ///This function is responsible for the correct
    1.39 +  ///reaction of any action happened in the territory
    1.40 +  ///of the canvas
    1.41    bool event_handler(GdkEvent* e, Node n);
    1.42  
    1.43    ///The graph, on which we work
    1.44    Graph g;
    1.45 -  ///Map of nodes of planefigure
    1.46 +
    1.47 +  ///Map of nodes of graph
    1.48    Graph::NodeMap<Gnome::Canvas::Ellipse *> nodesmap;
    1.49 -  ///Map of edges of planefigure
    1.50 +
    1.51 +  ///Map of edges of graph
    1.52    Graph::EdgeMap<Gnome::Canvas::Line *> edgesmap;
    1.53  
    1.54    ///Map of texts to write on edges