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