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