gui/map_win.h
author klao
Mon, 27 Jun 2005 19:47:09 +0000
changeset 1519 17e367a93cbb
parent 1446 320f73c5cfc1
child 1524 587a823bcdd0
permissions -rw-r--r--
getstart improvements
ladanyi@1442
     1
// -*- C++ -*- //
ladanyi@1442
     2
ladanyi@1442
     3
#ifndef MAP_WIN_H
ladanyi@1442
     4
#define MAP_WIN_H
ladanyi@1442
     5
hegyi@1512
     6
class MapWin;
hegyi@1512
     7
ladanyi@1442
     8
#include <all_include.h>
ladanyi@1442
     9
#include <mapstorage.h>
ladanyi@1442
    10
#include <graph_displayer_canvas.h>
ladanyi@1442
    11
#include <libgnomecanvasmm.h>
ladanyi@1442
    12
#include <libgnomecanvasmm/polygon.h>
ladanyi@1442
    13
ladanyi@1442
    14
///This class is responsible for creating a window,
ladanyi@1442
    15
///on which the visualization attributes can be
ladanyi@1442
    16
///assigned to maps.
ladanyi@1442
    17
class MapWin : public Gtk::Window
ladanyi@1442
    18
{
ladanyi@1442
    19
protected:
ladanyi@1442
    20
  ///The \ref GraphDisplayerCanvas on which the graph will be drawn.
ladanyi@1442
    21
  ///It has to be known for this class, because
ladanyi@1442
    22
  ///when a map assigned to a certain attribute
ladanyi@1442
    23
  ///a function of the \ref GraphDisplayerCanvas will be called.
ladanyi@1442
    24
  GraphDisplayerCanvas & gdc;
ladanyi@1442
    25
ladanyi@1442
    26
  ///The \ref MapStorage in which the visualizable maps are stored
ladanyi@1442
    27
  MapStorage & ms;
ladanyi@1442
    28
hegyi@1512
    29
  Gtk::Table * table;
ladanyi@1442
    30
  
hegyi@1512
    31
  Gtk::Combo * e_combo_array, * n_combo_array;
ladanyi@1442
    32
hegyi@1446
    33
  Gtk::Label * label;
ladanyi@1442
    34
hegyi@1512
    35
  Gtk::VBox vbox;
hegyi@1512
    36
ladanyi@1442
    37
public:
ladanyi@1442
    38
  ///Constructor of MapWin creates the widgets shown in MapWin.
ladanyi@1442
    39
  MapWin(const std::string& title, MapStorage &, GraphDisplayerCanvas &);
ladanyi@1442
    40
ladanyi@1442
    41
  ///If a radiobutton is clicked, this function determines
ladanyi@1442
    42
  ///which button was that and after that calls the
ladanyi@1442
    43
  ///appropriate function of the \ref GraphDisplayerCanvas
ladanyi@1442
    44
  ///to change the visible values of that attribute.
hegyi@1512
    45
  virtual void e_combo_changed(int);
hegyi@1512
    46
  ///If a radiobutton is clicked, this function determines
hegyi@1512
    47
  ///which button was that and after that calls the
hegyi@1512
    48
  ///appropriate function of the \ref GraphDisplayerCanvas
hegyi@1512
    49
  ///to change the visible values of that attribute.
hegyi@1512
    50
  virtual void n_combo_changed(int);
hegyi@1512
    51
hegyi@1512
    52
  ///This function is created to set the appropriate maps on the newly created node
hegyi@1512
    53
  void update_node(Graph::Node);
hegyi@1512
    54
hegyi@1512
    55
  ///This function is created to set the appropriate maps on the newly created edge
hegyi@1512
    56
  void update_edge(Graph::Edge);
hegyi@1512
    57
hegyi@1446
    58
  virtual bool close_if_escape_is_pressed(GdkEventKey*);
ladanyi@1442
    59
};
ladanyi@1442
    60
ladanyi@1442
    61
#endif //MAP_WIN_H