1.1 --- a/map_win.h Thu Jan 12 14:36:08 2006 +0000
1.2 +++ b/map_win.h Thu Jan 12 15:24:24 2006 +0000
1.3 @@ -11,45 +11,107 @@
1.4 #include <libgnomecanvasmm.h>
1.5 #include <libgnomecanvasmm/polygon.h>
1.6
1.7 +///Graph visualization setup window.
1.8 +
1.9 ///This class is responsible for creating a window,
1.10 ///on which the visualization attributes can be
1.11 ///assigned to maps.
1.12 class MapWin : public Gtk::Window
1.13 {
1.14 protected:
1.15 + ///\ref NoteBookTab to that the \ref MapWin belongs to.
1.16 NoteBookTab & mytab;
1.17
1.18 + ///Designing element
1.19 Gtk::Table * table;
1.20
1.21 - MapSelector ** e_combo_array, ** n_combo_array;
1.22 + ///\ref MapSelectors for each property
1.23
1.24 + ///Each property has an own \ref MapSelector through which
1.25 + ///the map to visualize by the property van be set.
1.26 + MapSelector ** e_combo_array;
1.27 +
1.28 + ///\ref MapSelectors for each property
1.29 +
1.30 + ///Each property has an own \ref MapSelector through which
1.31 + ///the map to visualize by the property van be set.
1.32 + MapSelector ** n_combo_array;
1.33 +
1.34 + ///Information holder
1.35 Gtk::Label * label;
1.36
1.37 + ///Container in which elements are organized.
1.38 Gtk::VBox vbox;
1.39
1.40 public:
1.41 - ///Constructor of MapWin creates the widgets shown in MapWin.
1.42 - MapWin(const std::string& title, std::vector<std::string>, std::vector<std::string>, NoteBookTab & mw);
1.43 + ///Constructor
1.44
1.45 - ~MapWin();
1.46 + ///It creates the widgets shown in \ref MapWin and
1.47 + ///binds the needed signal to the correct place.
1.48 + ///\param title title of window
1.49 + ///\param eml edgemap list
1.50 + ///\param nml nodemap list
1.51 + ///\param mw the owner \ref NoteBookTab (\ref mytab)
1.52 + MapWin(const std::string& title, std::vector<std::string> eml, std::vector<std::string> nml, NoteBookTab & mw);
1.53
1.54 + ///Deregistrates \ref MapWin in its \ref NoteBookTab (\ref mytab)
1.55 virtual bool on_delete_event(GdkEventAny *);
1.56
1.57 - void nodeMapChanged(std::string, int);
1.58 + ///Handles changement in nodemap selection
1.59
1.60 - void edgeMapChanged(std::string, int);
1.61 + ///If \ref MapSelector emits a signal that indicates
1.62 + ///changement in nodemap selection this function will
1.63 + ///be called. It calls the appropriate handler function,
1.64 + ///\ref NoteBookTab::propertyChange with parameters describing the changement.
1.65 + ///\param mapname the recently selected map
1.66 + ///\param prop the changed property
1.67 + void nodeMapChanged(std::string mapname, int prop);
1.68
1.69 - void newMapWinNeeded(bool);
1.70 + ///Handles changement in edgemap selection
1.71
1.72 - ///This function inserts name of the new edgemap in the list in the combo box
1.73 - void registerNewEdgeMap(std::string);
1.74 + ///If \ref MapSelector emits a signal that indicates
1.75 + ///changement in edgemap selection this function will
1.76 + ///be called. It calls the appropriate handler function,
1.77 + ///\ref NoteBookTab::propertyChange with parameters describing the changement.
1.78 + ///\param mapname the recently selected map
1.79 + ///\param prop the changed property
1.80 + void edgeMapChanged(std::string mapname, int prop);
1.81
1.82 - ///This function inserts name of the new nodemap in the list in the combo box
1.83 - void registerNewNodeMap(std::string);
1.84 + ///Indicates to the owner \ref NoteBookTab that a \ref NewMapWin should be opened.
1.85
1.86 + ///This function is bound to the
1.87 + ///signal emitted by the \ref MapSelector in case of
1.88 + ///the user wants to create a new map. It only pass the
1.89 + ///information further to the tab owning this \ref MapWin that is needed to open the
1.90 + ///\ref NewMapWin. (\ref NoteBookTab::popupNewMapWin)
1.91 + ///\param itisedge should the new map will be an edgemap? (or nodemap)
1.92 + void newMapWinNeeded(bool itisedge);
1.93 +
1.94 + ///This function inserts name of the new edgemap in the name list in \ref MapSelector s
1.95 +
1.96 + ///\param new_name
1.97 + ///name of new map
1.98 + void registerNewEdgeMap(std::string new_name);
1.99 +
1.100 + ///This function inserts name of the new nodemap in the name list in \ref MapSelector s
1.101 +
1.102 + ///\param new_name
1.103 + ///name of new map
1.104 + void registerNewNodeMap(std::string new_name);
1.105 +
1.106 + ///Close window if Esc key pressed.
1.107 virtual bool closeIfEscapeIsPressed(GdkEventKey*);
1.108
1.109 - void update(std::vector<std::string>, std::vector<std::string>);
1.110 + ///Updates list of maps in all \ref MapSelector
1.111 +
1.112 + ///This function is called by \ref NoteBookTab, when the file
1.113 + ///showed in it has changed, therefore the contained maps
1.114 + ///have changed as well. \ref NoteBookTab knows, whether it
1.115 + ///has to call this function or not from the \ref NoteBookTab::mapwinexists
1.116 + ///variable.
1.117 + ///\param eml edge map list
1.118 + ///\param nml node map list
1.119 + void update(std::vector<std::string> eml, std::vector<std::string> nml);
1.120 };
1.121
1.122 #endif //MAP_WIN_H