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