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