map_win.h
author alpar
Mon, 24 Oct 2005 08:12:26 +0000
branchgui
changeset 84 09b09efab0a1
parent 81 5ad61c33487c
child 89 4042761b21e3
permissions -rw-r--r--
Doxyfile for documenting glemon's architecture.
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"
hegyi@82
    11
#include "new_map_win.h"
hegyi@81
    12
#include "mapselector.h"
ladanyi@6
    13
#include <libgnomecanvasmm.h>
ladanyi@6
    14
#include <libgnomecanvasmm/polygon.h>
ladanyi@6
    15
ladanyi@6
    16
///This class is responsible for creating a window,
ladanyi@6
    17
///on which the visualization attributes can be
ladanyi@6
    18
///assigned to maps.
ladanyi@6
    19
class MapWin : public Gtk::Window
ladanyi@6
    20
{
ladanyi@6
    21
protected:
ladanyi@6
    22
  ///The \ref GraphDisplayerCanvas on which the graph will be drawn.
ladanyi@6
    23
  ///It has to be known for this class, because
ladanyi@6
    24
  ///when a map assigned to a certain attribute
ladanyi@6
    25
  ///a function of the \ref GraphDisplayerCanvas will be called.
ladanyi@6
    26
  GraphDisplayerCanvas & gdc;
ladanyi@6
    27
ladanyi@6
    28
  ///The \ref MapStorage in which the visualizable maps are stored
ladanyi@6
    29
  MapStorage & ms;
ladanyi@6
    30
hegyi@82
    31
  NewMapWin & nmw;
hegyi@82
    32
hegyi@28
    33
  Gtk::Table * table;
ladanyi@6
    34
  
hegyi@81
    35
  MapSelector ** e_combo_array, ** n_combo_array;
ladanyi@6
    36
hegyi@8
    37
  Gtk::Label * label;
ladanyi@6
    38
hegyi@28
    39
  Gtk::VBox vbox;
hegyi@28
    40
ladanyi@6
    41
public:
ladanyi@6
    42
  ///Constructor of MapWin creates the widgets shown in MapWin.
hegyi@82
    43
  MapWin(const std::string& title, MapStorage &, GraphDisplayerCanvas &, NewMapWin &);
ladanyi@6
    44
hegyi@28
    45
  ///This function is created to set the appropriate maps on the newly created node
hegyi@30
    46
  void updateNode(Graph::Node);
hegyi@28
    47
hegyi@28
    48
  ///This function is created to set the appropriate maps on the newly created edge
hegyi@30
    49
  void updateEdge(Graph::Edge);
hegyi@28
    50
hegyi@38
    51
  ///This function inserts name of the new edgemap in the list in the combo box
hegyi@38
    52
  void registerNewEdgeMap(std::string);
hegyi@38
    53
hegyi@38
    54
  ///This function inserts name of the new nodemap in the list in the combo box
hegyi@38
    55
  void registerNewNodeMap(std::string);
hegyi@38
    56
hegyi@30
    57
  virtual bool closeIfEscapeIsPressed(GdkEventKey*);
hegyi@38
    58
ladanyi@53
    59
  void update();
ladanyi@6
    60
};
ladanyi@6
    61
ladanyi@6
    62
#endif //MAP_WIN_H