1.1 --- a/graph_displayer_canvas.h Fri Jun 24 07:58:18 2005 +0000
1.2 +++ b/graph_displayer_canvas.h Fri Jun 24 18:16:12 2005 +0000
1.3 @@ -6,6 +6,7 @@
1.4 class GraphDisplayerCanvas;
1.5
1.6 #include <all_include.h>
1.7 +#include <map_win.h>
1.8 #include <mapstorage.h>
1.9 #include <broken_edge.h>
1.10 #include <libgnomecanvasmm.h>
1.11 @@ -17,20 +18,32 @@
1.12 typedef Gnome::Canvas::CanvasAA Parent;
1.13
1.14 public:
1.15 - GraphDisplayerCanvas(Graph &, CoordinatesMap &, MapStorage &);
1.16 + GraphDisplayerCanvas(Graph &, CoordinatesMap &, MapStorage &, MapWin *);
1.17 virtual ~GraphDisplayerCanvas();
1.18
1.19 ///Changes the linewidth attribute according to the given map.
1.20 ///\param mapname is the name of the map which contains the new values
1.21 - int changeLineWidth (std::string mapname);
1.22 + int changeEdgeWidth (std::string mapname, Graph::Edge new_item=INVALID);
1.23
1.24 ///Changes the linecolor attribute according to the given map.
1.25 ///\param mapname is the name of the map which contains the new values
1.26 - int changeColor (std::string mapname);
1.27 + int changeEdgeColor (std::string mapname, Graph::Edge new_item=INVALID);
1.28
1.29 ///Changes the text of line attribute according to the given map.
1.30 ///\param mapname is the name of the map which contains the new values
1.31 - int changeText (std::string mapname);
1.32 + int changeEdgeText (std::string mapname, Graph::Edge new_item=INVALID);
1.33 +
1.34 + ///Changes the linewidth attribute according to the given map.
1.35 + ///\param mapname is the name of the map which contains the new values
1.36 + int changeNodeRadius (std::string mapname, Graph::Node new_item=INVALID);
1.37 +
1.38 + ///Changes the linecolor attribute according to the given map.
1.39 + ///\param mapname is the name of the map which contains the new values
1.40 + int changeNodeColor (std::string mapname, Graph::Node new_item=INVALID);
1.41 +
1.42 + ///Changes the text of line attribute according to the given map.
1.43 + ///\param mapname is the name of the map which contains the new values
1.44 + int changeNodeText (std::string mapname, Graph::Node new_item=INVALID);
1.45
1.46 ///Callback for 'ViewZoomIn' action.
1.47 virtual void zoomIn();
1.48 @@ -107,6 +120,9 @@
1.49 ///Map of texts to write on edges
1.50 Graph::EdgeMap<Gnome::Canvas::Text *> edgetextmap;
1.51
1.52 + ///Map of texts to write on nodes
1.53 + Graph::NodeMap<Gnome::Canvas::Text *> nodetextmap;
1.54 +
1.55 ///Group of graphical elements of displayed_graph
1.56 Gnome::Canvas::Group displayed_graph;
1.57
1.58 @@ -133,6 +149,9 @@
1.59
1.60 static const int zoom_step = 5;
1.61
1.62 + ///We need to store mapwin, to be able to ask the appropriate values for properties of new items.
1.63 + MapWin * mapwin;
1.64 +
1.65 };
1.66
1.67 #endif //GRAPH_DISPLAYER_CANVAS_H