gui/map_win.h
author deba
Fri, 14 Oct 2005 10:58:54 +0000
changeset 1724 b20777184ba8
parent 1586 1a8630f2e944
child 1731 616bc933c2bc
permissions -rw-r--r--
Heap not for the dijkstra

It will be used in the minCut algorithm
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@1606
     8
#include "all_include.h"
ladanyi@1606
     9
#include "graph_displayer_canvas.h"
ladanyi@1606
    10
#include "mapstorage.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@1524
    45
  virtual void eComboChanged(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@1524
    50
  virtual void nComboChanged(int);
hegyi@1512
    51
hegyi@1512
    52
  ///This function is created to set the appropriate maps on the newly created node
hegyi@1524
    53
  void updateNode(Graph::Node);
hegyi@1512
    54
hegyi@1512
    55
  ///This function is created to set the appropriate maps on the newly created edge
hegyi@1524
    56
  void updateEdge(Graph::Edge);
hegyi@1512
    57
hegyi@1586
    58
  ///This function inserts name of the new edgemap in the list in the combo box
hegyi@1586
    59
  void registerNewEdgeMap(std::string);
hegyi@1586
    60
hegyi@1586
    61
  ///This function inserts name of the new nodemap in the list in the combo box
hegyi@1586
    62
  void registerNewNodeMap(std::string);
hegyi@1586
    63
hegyi@1524
    64
  virtual bool closeIfEscapeIsPressed(GdkEventKey*);
hegyi@1586
    65
ladanyi@1606
    66
  void update();
ladanyi@1442
    67
};
ladanyi@1442
    68
ladanyi@1442
    69
#endif //MAP_WIN_H