hegyi@192: /* -*- C++ -*- hegyi@192: * hegyi@192: * This file is a part of LEMON, a generic C++ optimization library hegyi@192: * hegyi@192: * Copyright (C) 2003-2006 hegyi@192: * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport hegyi@192: * (Egervary Research Group on Combinatorial Optimization, EGRES). hegyi@192: * hegyi@192: * Permission to use, modify and distribute this software is granted hegyi@192: * provided that this copyright notice appears in all copies. For hegyi@192: * precise terms see the accompanying LICENSE file. hegyi@192: * hegyi@192: * This software is provided "AS IS" with no warranty of any kind, hegyi@192: * express or implied, and with no claim as to its suitability for any hegyi@192: * purpose. hegyi@192: * hegyi@192: */ hegyi@192: hegyi@192: #ifndef EPS_WIN_H hegyi@192: #define EPS_WIN_H hegyi@192: hegyi@198: class MapSelector; hegyi@198: hegyi@192: #include hegyi@192: #include hegyi@192: #include ladanyi@201: #include "map_value.h" hegyi@192: hegyi@192: ///Graph visualization setup window. hegyi@192: hegyi@192: ///This class is responsible for creating a window, hegyi@192: ///on which the visualization attributes can be hegyi@192: ///assigned to maps. hegyi@192: class EpsWin : public Gtk::Dialog hegyi@192: { hegyi@192: protected: hegyi@192: ///Designing element hegyi@192: Gtk::Table * table; hegyi@192: hegyi@192: ///Information holder hegyi@192: Gtk::Label * label; hegyi@192: hegyi@192: ///configuration hegyi@192: std::vector options; hegyi@192: hegyi@192: ///OK, Cancel hegyi@192: Gtk::Button * ok, * cancel; hegyi@192: hegyi@192: ///Container in which filename entry are organized. hegyi@192: Gtk::HBox hbox; hegyi@192: hegyi@192: ///Filename hegyi@192: Gtk::Entry name; hegyi@192: hegyi@198: MapSelector * mapselector; hegyi@192: public: hegyi@192: ///Constructor hegyi@192: hegyi@192: ///It creates the widgets shown in \ref EpsWin and hegyi@192: ///binds the needed signal to the correct place. hegyi@192: ///\param title title of window hegyi@192: ///\param eml edgemap list hegyi@192: ///\param nml nodemap list hegyi@192: ///\param mw the owner \ref NoteBookTab (\ref mytab) ladanyi@201: EpsWin(const std::string& title, std::vector, std::vector); hegyi@192: hegyi@192: ///Deregistrates \ref EpsWin in its \ref NoteBookTab (\ref mytab) hegyi@192: virtual bool on_delete_event(GdkEventAny *); hegyi@192: hegyi@192: ///Close window if Esc key pressed. hegyi@192: virtual bool closeIfEscapeIsPressed(GdkEventKey*); hegyi@192: hegyi@192: ///Callback function for OK button. It creates the map. hegyi@192: hegyi@192: ///If OK is pressed this function hegyi@192: ///transmits the collected data to hegyi@192: ///appropriate functions to be able hegyi@192: ///to create EPS hegyi@192: virtual void on_response(int response_id); hegyi@192: hegyi@196: ///indicates that user is ready to export EPS file hegyi@198: sigc::signal, std::string, std::string > signal_eps_details; hegyi@196: hegyi@196: ///returns \ref signal_eps_details hegyi@198: sigc::signal, std::string, std::string > signal_eps_details_ch(){return signal_eps_details;}; hegyi@196: hegyi@196: ///indicates that the windows can be closed hegyi@196: sigc::signal signal_eps_close; hegyi@196: hegyi@196: ///returns \ref signal_eps_close hegyi@196: sigc::signal signal_eps_close_ch(){return signal_eps_close;}; hegyi@196: hegyi@198: ///indicates that the windows can be closed hegyi@198: sigc::signal signal_new_map; hegyi@196: hegyi@198: ///returns \ref signal_eps_close hegyi@198: sigc::signal signal_new_map_ch(){return signal_new_map;}; hegyi@198: hegyi@198: ///Function is called when new map is required. hegyi@198: void newMapWinNeeded(bool); hegyi@198: hegyi@198: ///This function inserts name of the new nodemap in the name list in \ref MapSelector s hegyi@198: hegyi@198: ///\param new_name hegyi@198: ///name of new map ladanyi@201: void registerNewNodeMap(std::string new_name, MapValue::Type type); hegyi@192: }; hegyi@192: hegyi@192: #endif //EPS_WIN_H