COIN-OR::LEMON - Graph Library

source: lemon-0.x/gui/map_win.h @ 1731:616bc933c2bc

Last change on this file since 1731:616bc933c2bc was 1731:616bc933c2bc, checked in by Hegyi Péter, 19 years ago

Mapselector widget reached its first release, but there are still work to do on it, I know...

File size: 1.6 KB
Line 
1// -*- C++ -*- //
2
3#ifndef MAP_WIN_H
4#define MAP_WIN_H
5
6class MapWin;
7
8#include "all_include.h"
9#include "graph_displayer_canvas.h"
10#include "mapstorage.h"
11#include "mapselector.h"
12#include <libgnomecanvasmm.h>
13#include <libgnomecanvasmm/polygon.h>
14
15///This class is responsible for creating a window,
16///on which the visualization attributes can be
17///assigned to maps.
18class MapWin : public Gtk::Window
19{
20protected:
21  ///The \ref GraphDisplayerCanvas on which the graph will be drawn.
22  ///It has to be known for this class, because
23  ///when a map assigned to a certain attribute
24  ///a function of the \ref GraphDisplayerCanvas will be called.
25  GraphDisplayerCanvas & gdc;
26
27  ///The \ref MapStorage in which the visualizable maps are stored
28  MapStorage & ms;
29
30  Gtk::Table * table;
31 
32  MapSelector ** e_combo_array, ** n_combo_array;
33
34  Gtk::Label * label;
35
36  Gtk::VBox vbox;
37
38public:
39  ///Constructor of MapWin creates the widgets shown in MapWin.
40  MapWin(const std::string& title, MapStorage &, GraphDisplayerCanvas &);
41
42  ///This function is created to set the appropriate maps on the newly created node
43  void updateNode(Graph::Node);
44
45  ///This function is created to set the appropriate maps on the newly created edge
46  void updateEdge(Graph::Edge);
47
48  ///This function inserts name of the new edgemap in the list in the combo box
49  void registerNewEdgeMap(std::string);
50
51  ///This function inserts name of the new nodemap in the list in the combo box
52  void registerNewNodeMap(std::string);
53
54  virtual bool closeIfEscapeIsPressed(GdkEventKey*);
55
56  void update();
57};
58
59#endif //MAP_WIN_H
Note: See TracBrowser for help on using the repository browser.