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