map_win.h
author alpar
Sat, 27 Aug 2005 09:32:34 +0000
branchgui
changeset 76 76f4f2ae0e7d
parent 38 9cab23d9b124
child 81 5ad61c33487c
permissions -rw-r--r--
Dependency problem (guipixbufs.h) is solved.
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@53
     8
#include "all_include.h"
ladanyi@53
     9
#include "graph_displayer_canvas.h"
ladanyi@53
    10
#include "mapstorage.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@30
    45
  virtual void eComboChanged(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@30
    50
  virtual void nComboChanged(int);
hegyi@28
    51
hegyi@28
    52
  ///This function is created to set the appropriate maps on the newly created node
hegyi@30
    53
  void updateNode(Graph::Node);
hegyi@28
    54
hegyi@28
    55
  ///This function is created to set the appropriate maps on the newly created edge
hegyi@30
    56
  void updateEdge(Graph::Edge);
hegyi@28
    57
hegyi@38
    58
  ///This function inserts name of the new edgemap in the list in the combo box
hegyi@38
    59
  void registerNewEdgeMap(std::string);
hegyi@38
    60
hegyi@38
    61
  ///This function inserts name of the new nodemap in the list in the combo box
hegyi@38
    62
  void registerNewNodeMap(std::string);
hegyi@38
    63
hegyi@30
    64
  virtual bool closeIfEscapeIsPressed(GdkEventKey*);
hegyi@38
    65
ladanyi@53
    66
  void update();
ladanyi@6
    67
};
ladanyi@6
    68
ladanyi@6
    69
#endif //MAP_WIN_H