gui/graph_displayer_canvas.h
changeset 1546 3fcb8ae9cea1
parent 1512 e54392395480
child 1550 4dcbb4ab1d7a
equal deleted inserted replaced
13:f5bfe071007c 14:83759a75962f
    68 
    68 
    69   ///This function is responsible for the correct
    69   ///This function is responsible for the correct
    70   ///reaction of any action happened in the territory
    70   ///reaction of any action happened in the territory
    71   ///of the canvas
    71   ///of the canvas
    72   ///DEPRECATED!!!!
    72   ///DEPRECATED!!!!
    73   bool event_handler(GdkEvent* e, Node n);
    73   bool eventHandler(GdkEvent* e, Node n);
    74 
    74 
    75   ///actual event handler
    75   ///actual event handler
    76   ///
    76   ///
    77   ///Actual event handler should be stored, to be able to disconnect it and later reconnect it.
    77   ///Actual event handler should be stored, to be able to disconnect it and later reconnect it.
    78   sigc::connection actual_handler;
    78   sigc::connection actual_handler;
    79 
    79 
    80   ///event handler for the case when move-tool is active
    80   ///event handler for the case when move-tool is active
    81   bool move_event_handler(GdkEvent*);
    81   bool moveEventHandler(GdkEvent*);
    82   ///event handler for the case when create_node-tool is active
    82   ///event handler for the case when create_node-tool is active
    83   bool create_node_event_handler(GdkEvent*);
    83   bool createNodeEventHandler(GdkEvent*);
    84   ///event handler for the case when create_edge-tool is active
    84   ///event handler for the case when create_edge-tool is active
    85   bool create_edge_event_handler(GdkEvent*);
    85   bool createEdgeEventHandler(GdkEvent*);
    86   ///event handler for the case when eraser-tool is active
    86   ///event handler for the case when eraser-tool is active
    87   bool eraser_event_handler(GdkEvent*);
    87   bool eraserEventHandler(GdkEvent*);
    88   ///event handler for the case when eraser-tool is active
    88   ///event handler for the case when eraser-tool is active
    89   bool edge_map_edit_event_handler(GdkEvent*);
    89   bool edgeMapEditEventHandler(GdkEvent*);
    90 
    90 
    91 public:
    91 public:
    92   ///Moves the text to new place
    92   ///Moves the text to new place
    93   void text_reposition(xy<double>);
    93   void textReposition(xy<double>);
    94   ///Activates an edge belonging to a BrokenEdge
    94   ///Activates an edge belonging to a BrokenEdge
    95   void toggle_edge_activity(BrokenEdge*, bool);
    95   void toggleEdgeActivity(BrokenEdge*, bool);
    96 
    96 
    97 public:
    97 public:
    98   ///\return the actual tool in hand
    98   ///\return the actual tool in hand
    99   int get_actual_tool();
    99   int getActualTool();
   100 
   100 
   101 private:
   101 private:
   102   ///Deletes the given element.
   102   ///Deletes the given element.
   103   void delete_item(NodeIt);
   103   void deleteItem(NodeIt);
   104   ///Deletes the given element.
   104   ///Deletes the given element.
   105   void delete_item(EdgeIt);
   105   void deleteItem(EdgeIt);
   106   ///Deletes the given element.
   106   ///Deletes the given element.
   107   void delete_item(Graph::Edge);
   107   void deleteItem(Graph::Edge);
   108 
   108 
   109 private:
   109 private:
   110 
   110 
   111   ///The graph, on which we work
   111   ///The graph, on which we work
   112   Graph g;
   112   Graph & g;
   113 
   113 
   114   ///Map of nodes of graph
   114   ///Map of nodes of graph
   115   Graph::NodeMap<Gnome::Canvas::Ellipse *> nodesmap;
   115   Graph::NodeMap<Gnome::Canvas::Ellipse *> nodesmap;
   116 
   116 
   117   ///Map of edges of graph
   117   ///Map of edges of graph