author | ladanyi |
Wed, 01 Jun 2005 23:30:13 +0000 | |
branch | gui |
changeset 5 | b7c36be1e35c |
parent 1 | c69fedfbb9b3 |
child 6 | 603b85626bc0 |
permissions | -rw-r--r-- |
ladanyi@1 | 1 |
// -*- C++ -*- // |
ladanyi@1 | 2 |
|
ladanyi@1 | 3 |
#ifndef MAP_WIN_H |
ladanyi@1 | 4 |
#define MAP_WIN_H |
ladanyi@1 | 5 |
|
ladanyi@1 | 6 |
#include <all_include.h> |
ladanyi@1 | 7 |
#include <mapstorage.h> |
ladanyi@1 | 8 |
#include <graph_displayer_canvas.h> |
ladanyi@1 | 9 |
#include <libgnomecanvasmm.h> |
ladanyi@1 | 10 |
#include <libgnomecanvasmm/polygon.h> |
ladanyi@1 | 11 |
|
hegyi@4 | 12 |
///This class is responsible for creating a window, |
hegyi@4 | 13 |
///on which the visualization attributes can be |
hegyi@4 | 14 |
///assigned to maps. |
ladanyi@1 | 15 |
class MapWin : public Gtk::Window |
ladanyi@1 | 16 |
{ |
ladanyi@1 | 17 |
protected: |
hegyi@4 | 18 |
///The \ref GraphDisplayerCanvas on which the graph will be drawn. |
hegyi@4 | 19 |
///It has to be known for this class, because |
hegyi@4 | 20 |
///when a map assigned to a certain attribute |
hegyi@4 | 21 |
///a function of the \ref GraphDisplayerCanvas will be called. |
ladanyi@1 | 22 |
GraphDisplayerCanvas & gdc; |
hegyi@4 | 23 |
|
hegyi@4 | 24 |
///The \ref MapStorage in which the visualizable maps are stored |
ladanyi@1 | 25 |
MapStorage & ms; |
ladanyi@1 | 26 |
|
hegyi@4 | 27 |
|
ladanyi@1 | 28 |
Gtk::HBox * radios; |
ladanyi@1 | 29 |
Gtk::RadioButton ** rb_array; |
ladanyi@1 | 30 |
|
ladanyi@1 | 31 |
Gtk::VBox vbox_b, * vbox_r1, * vbox_r2; |
hegyi@4 | 32 |
|
hegyi@4 | 33 |
///The notebook has different pages for each attribute. |
ladanyi@1 | 34 |
Gtk::Notebook notebook; |
hegyi@4 | 35 |
|
ladanyi@1 | 36 |
Gtk::Label * labels; |
ladanyi@1 | 37 |
|
ladanyi@1 | 38 |
public: |
hegyi@4 | 39 |
///Constructor of MapWin creates the widgets shown in MapWin. |
ladanyi@1 | 40 |
MapWin(const std::string& title, MapStorage &, GraphDisplayerCanvas &); |
hegyi@4 | 41 |
|
hegyi@4 | 42 |
///If a radiobutton is clicked, this function determines |
hegyi@4 | 43 |
///which button was that and after that calls the |
hegyi@4 | 44 |
///appropriate function of the \ref GraphDisplayerCanvas |
hegyi@4 | 45 |
///to change the visible values of that attribute. |
ladanyi@1 | 46 |
virtual void radio_click(int, int); |
ladanyi@1 | 47 |
}; |
ladanyi@1 | 48 |
|
ladanyi@1 | 49 |
#endif //MAP_WIN_H |