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