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 hegyi@112: #include ladanyi@6: #include ladanyi@6: #include ladanyi@6: hegyi@123: ///Graph visualization setup window. hegyi@123: 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: { ladanyi@6: protected: hegyi@123: ///\ref NoteBookTab to that the \ref MapWin belongs to. hegyi@96: NoteBookTab & mytab; ladanyi@6: hegyi@123: ///Designing element hegyi@28: Gtk::Table * table; ladanyi@6: hegyi@123: ///\ref MapSelectors for each property ladanyi@6: hegyi@123: ///Each property has an own \ref MapSelector through which hegyi@123: ///the map to visualize by the property van be set. hegyi@123: MapSelector ** e_combo_array; hegyi@123: hegyi@123: ///\ref MapSelectors for each property hegyi@123: hegyi@123: ///Each property has an own \ref MapSelector through which hegyi@123: ///the map to visualize by the property van be set. hegyi@123: MapSelector ** n_combo_array; hegyi@123: hegyi@123: ///Information holder hegyi@8: Gtk::Label * label; ladanyi@6: hegyi@123: ///Container in which elements are organized. hegyi@28: Gtk::VBox vbox; hegyi@28: ladanyi@6: public: hegyi@123: ///Constructor ladanyi@6: hegyi@123: ///It creates the widgets shown in \ref MapWin and hegyi@123: ///binds the needed signal to the correct place. hegyi@123: ///\param title title of window hegyi@123: ///\param eml edgemap list hegyi@123: ///\param nml nodemap list hegyi@123: ///\param mw the owner \ref NoteBookTab (\ref mytab) hegyi@123: MapWin(const std::string& title, std::vector eml, std::vector nml, NoteBookTab & mw); hegyi@95: hegyi@123: ///Deregistrates \ref MapWin in its \ref NoteBookTab (\ref mytab) hegyi@95: virtual bool on_delete_event(GdkEventAny *); hegyi@95: hegyi@123: ///Handles changement in nodemap selection hegyi@28: hegyi@123: ///If \ref MapSelector emits a signal that indicates hegyi@123: ///changement in nodemap selection this function will hegyi@123: ///be called. It calls the appropriate handler function, hegyi@123: ///\ref NoteBookTab::propertyChange with parameters describing the changement. hegyi@123: ///\param mapname the recently selected map hegyi@123: ///\param prop the changed property hegyi@123: void nodeMapChanged(std::string mapname, int prop); hegyi@94: hegyi@123: ///Handles changement in edgemap selection hegyi@28: hegyi@123: ///If \ref MapSelector emits a signal that indicates hegyi@123: ///changement in edgemap selection this function will hegyi@123: ///be called. It calls the appropriate handler function, hegyi@123: ///\ref NoteBookTab::propertyChange with parameters describing the changement. hegyi@123: ///\param mapname the recently selected map hegyi@123: ///\param prop the changed property hegyi@123: void edgeMapChanged(std::string mapname, int prop); hegyi@38: hegyi@123: ///Indicates to the owner \ref NoteBookTab that a \ref NewMapWin should be opened. hegyi@38: hegyi@123: ///This function is bound to the hegyi@123: ///signal emitted by the \ref MapSelector in case of hegyi@123: ///the user wants to create a new map. It only pass the hegyi@123: ///information further to the tab owning this \ref MapWin that is needed to open the hegyi@123: ///\ref NewMapWin. (\ref NoteBookTab::popupNewMapWin) hegyi@123: ///\param itisedge should the new map will be an edgemap? (or nodemap) hegyi@123: void newMapWinNeeded(bool itisedge); hegyi@123: hegyi@123: ///This function inserts name of the new edgemap in the name list in \ref MapSelector s hegyi@123: hegyi@123: ///\param new_name hegyi@123: ///name of new map hegyi@123: void registerNewEdgeMap(std::string new_name); hegyi@123: hegyi@123: ///This function inserts name of the new nodemap in the name list in \ref MapSelector s hegyi@123: hegyi@123: ///\param new_name hegyi@123: ///name of new map hegyi@123: void registerNewNodeMap(std::string new_name); hegyi@123: hegyi@123: ///Close window if Esc key pressed. hegyi@30: virtual bool closeIfEscapeIsPressed(GdkEventKey*); hegyi@38: hegyi@123: ///Updates list of maps in all \ref MapSelector hegyi@123: hegyi@123: ///This function is called by \ref NoteBookTab, when the file hegyi@123: ///showed in it has changed, therefore the contained maps hegyi@123: ///have changed as well. \ref NoteBookTab knows, whether it hegyi@123: ///has to call this function or not from the \ref NoteBookTab::mapwinexists hegyi@123: ///variable. hegyi@123: ///\param eml edge map list hegyi@123: ///\param nml node map list hegyi@123: void update(std::vector eml, std::vector nml); ladanyi@6: }; ladanyi@6: ladanyi@6: #endif //MAP_WIN_H