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 DESWIN_H hegyi@1: #define DESWIN_H hegyi@1: hegyi@1: #include hegyi@1: #include hegyi@1: #include hegyi@1: hegyi@1: class DesignWin : public Gtk::Window hegyi@1: { hegyi@1: private: hegyi@1: Gtk::SpinButton * attraction; hegyi@1: Gtk::SpinButton * propulsation; hegyi@1: Gtk::SpinButton * iteration; hegyi@1: Gtk::Table table; hegyi@1: Gtk::Button * close_button; hegyi@1: hegyi@1: sigc::signal signal_attraction_ch; hegyi@1: sigc::signal signal_propulsation_ch; hegyi@1: sigc::signal signal_iteration_ch; hegyi@1: sigc::signal close_run_pr; hegyi@1: hegyi@1: void emit_attraction(); hegyi@1: void emit_propulsation(); hegyi@1: void emit_iteration(); hegyi@1: void emit_closerun(){close_run_pr.emit();}; hegyi@1: hegyi@1: public: hegyi@1: ///Close window if escape key is pressed. hegyi@1: bool closeIfEscapeIsPressed(GdkEventKey* e); hegyi@1: hegyi@1: ///Constructor hegyi@1: hegyi@1: ///It builds the window. hegyi@1: DesignWin(const std::string&, double, double, int); hegyi@1: hegyi@1: sigc::signal signal_attraction(){return signal_attraction_ch;}; hegyi@1: sigc::signal signal_propulsation(){return signal_propulsation_ch;}; hegyi@1: sigc::signal signal_iteration(){return signal_iteration_ch;}; hegyi@1: sigc::signal close_run(){return close_run_pr;}; hegyi@1: hegyi@1: void set_title(std::string); hegyi@1: hegyi@1: void set_data(double, double, int); hegyi@1: }; hegyi@1: #endif //DESWIN_H