COIN-OR::LEMON - Graph Library

source: glemon-0.x/map_win.h @ 71:bac3c363639e

gui
Last change on this file since 71:bac3c363639e was 53:e73d7540bd24, checked in by Akos Ladanyi, 19 years ago

added support for saving files

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