Changeset 62:80eefca04b1e in glemon-0.x
- Timestamp:
- 08/18/05 15:33:49 (20 years ago)
- Branch:
- gui
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk/gui@2156
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
all_include.h
r48 r62 41 41 typedef Graph::NodeMap<Coordinates> CoordinatesMap; 42 42 typedef Graph::Node Node; 43 typedef Graph::Edge Edge; 43 44 typedef Graph::EdgeIt EdgeIt; 44 45 typedef Graph::NodeIt NodeIt; -
graph_displayer_canvas-edge.cc
r59 r62 4 4 5 5 6 int GraphDisplayerCanvas::changeEdgeWidth (std::string mapname, Graph::Edge edge)6 int GraphDisplayerCanvas::changeEdgeWidth (std::string mapname, Edge edge) 7 7 { 8 8 Graph::EdgeMap<double> * actual_map; … … 50 50 }; 51 51 52 int GraphDisplayerCanvas::changeEdgeColor (std::string mapname, Graph::Edge edge)52 int GraphDisplayerCanvas::changeEdgeColor (std::string mapname, Edge edge) 53 53 { 54 54 … … 117 117 }; 118 118 119 int GraphDisplayerCanvas::changeEdgeText (std::string mapname, Graph::Edge edge)119 int GraphDisplayerCanvas::changeEdgeText (std::string mapname, Edge edge) 120 120 { 121 121 //the number in the map will be written on the edge -
graph_displayer_canvas-event.cc
r59 r62 226 226 isbutton=1; 227 227 228 active_node= NodeIt(mapstorage.graph,mapstorage.graph.addNode());228 active_node=mapstorage.graph.addNode(); 229 229 230 230 //initiating values corresponding to new node in maps … … 340 340 window_to_world (e->button.x, e->button.y, clicked_x, clicked_y); 341 341 target_item=(get_item_at(clicked_x, clicked_y)); 342 Graph::NodeIttarget_node=INVALID;342 Node target_node=INVALID; 343 343 for (NodeIt i(mapstorage.graph); i!=INVALID; ++i) 344 344 { … … 355 355 mapstorage.modified = true; 356 356 357 *(nodesmap[target_node]) << Gnome::Canvas::Properties::fill_color("red"); 357 *(nodesmap[target_node]) << 358 Gnome::Canvas::Properties::fill_color("red"); 358 359 359 360 //creating new edge 360 active_edge=EdgeIt(mapstorage.graph,mapstorage.graph.addEdge(active_node, target_node)); 361 active_edge=mapstorage.graph.addEdge(active_node, 362 target_node); 361 363 362 364 //initiating values corresponding to new edge in maps 363 365 mapstorage.initMapsForEdge(active_edge); 364 (*mapstorage.edgemap_storage["id"])[active_edge] = mapstorage.graph.id(active_edge); 366 (*mapstorage.edgemap_storage["id"])[active_edge] = 367 mapstorage.graph.id(active_edge); 365 368 366 369 //calculating coordinates of new edge … … 556 559 { 557 560 //for determine, whether it was an edge 558 Graph::EdgeItclicked_edge=INVALID;561 Edge clicked_edge=INVALID; 559 562 560 563 //find the activated item between texts … … 678 681 { 679 682 //for determine, whether it was a node 680 Graph::NodeItclicked_node=INVALID;683 Node clicked_node=INVALID; 681 684 682 685 //find the activated item between texts … … 850 853 } 851 854 852 void GraphDisplayerCanvas::deleteItem(Node Itnode_to_delete)855 void GraphDisplayerCanvas::deleteItem(Node node_to_delete) 853 856 { 854 857 delete(nodetextmap[node_to_delete]); … … 857 860 } 858 861 859 void GraphDisplayerCanvas::deleteItem(Edge Itedge_to_delete)862 void GraphDisplayerCanvas::deleteItem(Edge edge_to_delete) 860 863 { 861 864 delete(edgetextmap[edge_to_delete]); … … 864 867 } 865 868 866 void GraphDisplayerCanvas::deleteItem(Graph::Edge edge_to_delete)867 {868 delete(edgetextmap[edge_to_delete]);869 delete(edgesmap[edge_to_delete]);870 mapstorage.graph.erase(edge_to_delete);871 }872 873 869 void GraphDisplayerCanvas::textReposition(xy<double> new_place) 874 870 { -
graph_displayer_canvas-node.cc
r59 r62 4 4 5 5 6 int GraphDisplayerCanvas::changeNodeRadius (std::string mapname, Graph::Node node)6 int GraphDisplayerCanvas::changeNodeRadius (std::string mapname, Node node) 7 7 { 8 8 Graph::NodeMap<double> * actual_map; … … 70 70 }; 71 71 72 int GraphDisplayerCanvas::changeNodeColor (std::string mapname, Graph::Node node)72 int GraphDisplayerCanvas::changeNodeColor (std::string mapname, Node node) 73 73 { 74 74 … … 142 142 }; 143 143 144 int GraphDisplayerCanvas::changeNodeText (std::string mapname, Graph::Node node)144 int GraphDisplayerCanvas::changeNodeText (std::string mapname, Node node) 145 145 { 146 146 -
graph_displayer_canvas.h
r55 r62 24 24 ///Changes the linewidth attribute according to the given map. 25 25 ///\param mapname is the name of the map which contains the new values 26 int changeEdgeWidth (std::string mapname, Graph::Edge new_item=INVALID);26 int changeEdgeWidth (std::string mapname, Edge new_item=INVALID); 27 27 28 28 ///Changes the linecolor attribute according to the given map. 29 29 ///\param mapname is the name of the map which contains the new values 30 int changeEdgeColor (std::string mapname, Graph::Edge new_item=INVALID);30 int changeEdgeColor (std::string mapname, Edge new_item=INVALID); 31 31 32 32 ///Changes the text of line attribute according to the given map. 33 33 ///\param mapname is the name of the map which contains the new values 34 int changeEdgeText (std::string mapname, Graph::Edge new_item=INVALID);34 int changeEdgeText (std::string mapname, Edge new_item=INVALID); 35 35 36 36 ///Changes the linewidth attribute according to the given map. 37 37 ///\param mapname is the name of the map which contains the new values 38 int changeNodeRadius (std::string mapname, Graph::Node new_item=INVALID);38 int changeNodeRadius (std::string mapname, Node new_item=INVALID); 39 39 40 40 ///Changes the linecolor attribute according to the given map. 41 41 ///\param mapname is the name of the map which contains the new values 42 int changeNodeColor (std::string mapname, Graph::Node new_item=INVALID);42 int changeNodeColor (std::string mapname, Node new_item=INVALID); 43 43 44 44 ///Changes the text of line attribute according to the given map. 45 45 ///\param mapname is the name of the map which contains the new values 46 int changeNodeText (std::string mapname, Graph::Node new_item=INVALID);46 int changeNodeText (std::string mapname, Node new_item=INVALID); 47 47 48 48 ///Callback for 'ViewZoomIn' action. … … 120 120 private: 121 121 ///Deletes the given element. 122 void deleteItem(Node It);122 void deleteItem(Node); 123 123 ///Deletes the given element. 124 void deleteItem(EdgeIt); 125 ///Deletes the given element. 126 void deleteItem(Graph::Edge); 124 void deleteItem(Edge); 127 125 128 126 private: … … 167 165 ///2. we would like to handle only ony item per movement, therefore quering it is not a working solution 168 166 Gnome::Canvas::Item * active_item, * target_item; 169 Graph::NodeItactive_node;170 Graph::EdgeItactive_edge;171 Graph::EdgeItforming_edge;167 Node active_node; 168 Edge active_edge; 169 Edge forming_edge; 172 170 173 171 std::string nodemap_to_edit, edgemap_to_edit; -
map_win.cc
r53 r62 218 218 }; 219 219 220 void MapWin::updateNode( Graph::Node node)220 void MapWin::updateNode(Node node) 221 221 { 222 222 for(int i=0;i<NODE_PROPERTY_NUM;i++) … … 251 251 } 252 252 253 void MapWin::updateEdge( Graph::Edge edge)253 void MapWin::updateEdge(Edge edge) 254 254 { 255 255 for(int i=0;i<EDGE_PROPERTY_NUM;i++) -
mapstorage.cc
r60 r62 117 117 } 118 118 119 void MapStorage::initMapsForEdge( Graph::Edge e)119 void MapStorage::initMapsForEdge(Edge e) 120 120 { 121 121 std::map< std::string,Graph::EdgeMap<double> * >::iterator ems_it;
Note: See TracChangeset
for help on using the changeset viewer.