gui
Last change
on this file since 81:5ad61c33487c was
81:5ad61c33487c,
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.2 KB
|
Line | |
---|
1 | // -*- C++ -*- // |
---|
2 | |
---|
3 | #ifndef MAP_SELECTOR_H |
---|
4 | #define MAP_SELECTOR_H |
---|
5 | |
---|
6 | class MapSelector; |
---|
7 | |
---|
8 | #include "all_include.h" |
---|
9 | #include "mapstorage.h" |
---|
10 | #include "map_win.h" |
---|
11 | #include "graph_displayer_canvas.h" |
---|
12 | #include <libgnomecanvasmm.h> |
---|
13 | #include <libgnomecanvasmm/polygon.h> |
---|
14 | |
---|
15 | class MapSelector : public Gtk::HBox |
---|
16 | { |
---|
17 | protected: |
---|
18 | GraphDisplayerCanvas & gdc; |
---|
19 | ///The \ref MapStorage in which the visualizable maps are stored |
---|
20 | MapStorage & ms; |
---|
21 | MapWin & mw; |
---|
22 | |
---|
23 | int id; |
---|
24 | |
---|
25 | bool itisedge; |
---|
26 | |
---|
27 | bool default_state; |
---|
28 | |
---|
29 | Gtk::ComboBoxText cbt; |
---|
30 | |
---|
31 | Gtk::Button * newbut, * defbut; |
---|
32 | |
---|
33 | Gtk::HBox hbox; |
---|
34 | |
---|
35 | Gtk::Label * label; |
---|
36 | |
---|
37 | Node node_to_update; |
---|
38 | Edge edge_to_update; |
---|
39 | |
---|
40 | |
---|
41 | public: |
---|
42 | |
---|
43 | MapSelector(GraphDisplayerCanvas &, MapStorage &, MapWin &, int, bool); |
---|
44 | |
---|
45 | void update_list(); |
---|
46 | |
---|
47 | ///If a radiobutton is clicked, this function determines |
---|
48 | ///which button was that and after that calls the |
---|
49 | ///appropriate function of the \ref GraphDisplayerCanvas |
---|
50 | ///to change the visible values of that attribute. |
---|
51 | virtual void comboChanged(); |
---|
52 | |
---|
53 | virtual void reset(); |
---|
54 | |
---|
55 | virtual void update(Node node); |
---|
56 | virtual void update(Edge edge); |
---|
57 | |
---|
58 | Glib::ustring get_active_text(); |
---|
59 | void set_active_text(Glib::ustring); |
---|
60 | void append_text(Glib::ustring); |
---|
61 | }; |
---|
62 | |
---|
63 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.