gui/map_win.h
author hegyi
Fri, 17 Jun 2005 15:41:48 +0000
changeset 1504 4b14c60ecb2b
parent 1442 1e3c69aa035b
child 1512 e54392395480
permissions -rw-r--r--
Sorry for my friday afternoon...
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
hegyi@1446
    27
  Gtk::Table table;
ladanyi@1442
    28
  
hegyi@1446
    29
  Gtk::HBox combos, * labelpluscombo;
hegyi@1446
    30
  Gtk::Combo * combo_array;
ladanyi@1442
    31
hegyi@1446
    32
  Gtk::VBox vbox_b, vbox_r1, vbox_r2;
ladanyi@1442
    33
hegyi@1446
    34
  Gtk::Label * label;
ladanyi@1442
    35
ladanyi@1442
    36
public:
ladanyi@1442
    37
  ///Constructor of MapWin creates the widgets shown in MapWin.
ladanyi@1442
    38
  MapWin(const std::string& title, MapStorage &, GraphDisplayerCanvas &);
ladanyi@1442
    39
ladanyi@1442
    40
  ///If a radiobutton is clicked, this function determines
ladanyi@1442
    41
  ///which button was that and after that calls the
ladanyi@1442
    42
  ///appropriate function of the \ref GraphDisplayerCanvas
ladanyi@1442
    43
  ///to change the visible values of that attribute.
hegyi@1446
    44
  virtual void combo_changed(int);
hegyi@1446
    45
  virtual bool close_if_escape_is_pressed(GdkEventKey*);
ladanyi@1442
    46
};
ladanyi@1442
    47
ladanyi@1442
    48
#endif //MAP_WIN_H