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