// -*- C++ -*- // #ifndef MAP_WIN_H #define MAP_WIN_H class MapWin; #include #include #include #include ///This class is responsible for creating a window, ///on which the visualization attributes can be ///assigned to maps. class MapWin : public Gtk::Window { class MapSelector : public Gtk::HBox { protected: sigc::signal signal_cbt; sigc::signal signal_newmapwin; int id; bool itisedge; bool default_state; bool set_new_map; Gtk::ComboBoxText cbt; Gtk::Button * newbut, * defbut; Gtk::HBox hbox; Gtk::Label * label; public: MapSelector(std::vector, std::string, int, bool); sigc::signal signal_cbt_ch(); sigc::signal signal_newmapwin_needed(); void update_list( std::vector ); ///If a radiobutton is clicked, this function determines ///which button was that and after that calls the ///appropriate function of the \ref GraphDisplayerCanvas ///to change the visible values of that attribute. virtual void comboChanged(); virtual void new_but_pressed(); virtual void reset(); Glib::ustring get_active_text(); void set_active_text(Glib::ustring); void append_text(Glib::ustring); }; protected: MainWin & mainwin; Gtk::Table * table; MapSelector ** e_combo_array, ** n_combo_array; Gtk::Label * label; Gtk::VBox vbox; public: ///Constructor of MapWin creates the widgets shown in MapWin. MapWin(const std::string& title, std::vector, std::vector, MainWin & mw); ~MapWin(); virtual bool on_delete_event(GdkEventAny *); void nodeMapChanged(std::string, int); void edgeMapChanged(std::string, int); void newMapWinNeeded(bool, int); ///This function inserts name of the new edgemap in the list in the combo box void registerNewEdgeMap(std::string); ///This function inserts name of the new nodemap in the list in the combo box void registerNewNodeMap(std::string); virtual bool closeIfEscapeIsPressed(GdkEventKey*); void update(std::vector, std::vector); }; #endif //MAP_WIN_H