1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/design_win.h Mon Jul 07 08:10:39 2008 -0500
1.3 @@ -0,0 +1,63 @@
1.4 +/* -*- C++ -*-
1.5 + *
1.6 + * This file is a part of LEMON, a generic C++ optimization library
1.7 + *
1.8 + * Copyright (C) 2003-2006
1.9 + * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
1.10 + * (Egervary Research Group on Combinatorial Optimization, EGRES).
1.11 + *
1.12 + * Permission to use, modify and distribute this software is granted
1.13 + * provided that this copyright notice appears in all copies. For
1.14 + * precise terms see the accompanying LICENSE file.
1.15 + *
1.16 + * This software is provided "AS IS" with no warranty of any kind,
1.17 + * express or implied, and with no claim as to its suitability for any
1.18 + * purpose.
1.19 + *
1.20 + */
1.21 +
1.22 +#ifndef DESWIN_H
1.23 +#define DESWIN_H
1.24 +
1.25 +#include <all_include.h>
1.26 +#include <libgnomecanvasmm.h>
1.27 +#include <libgnomecanvasmm/polygon.h>
1.28 +
1.29 +class DesignWin : public Gtk::Window
1.30 +{
1.31 +private:
1.32 + Gtk::SpinButton * attraction;
1.33 + Gtk::SpinButton * propulsation;
1.34 + Gtk::SpinButton * iteration;
1.35 + Gtk::Table table;
1.36 + Gtk::Button * close_button;
1.37 +
1.38 + sigc::signal<void, double> signal_attraction_ch;
1.39 + sigc::signal<void, double> signal_propulsation_ch;
1.40 + sigc::signal<void, int> signal_iteration_ch;
1.41 + sigc::signal<void> close_run_pr;
1.42 +
1.43 + void emit_attraction();
1.44 + void emit_propulsation();
1.45 + void emit_iteration();
1.46 + void emit_closerun(){close_run_pr.emit();};
1.47 +
1.48 +public:
1.49 + ///Close window if escape key is pressed.
1.50 + bool closeIfEscapeIsPressed(GdkEventKey* e);
1.51 +
1.52 + ///Constructor
1.53 +
1.54 + ///It builds the window.
1.55 + DesignWin(const std::string&, double, double, int);
1.56 +
1.57 + sigc::signal<void, double> signal_attraction(){return signal_attraction_ch;};
1.58 + sigc::signal<void, double> signal_propulsation(){return signal_propulsation_ch;};
1.59 + sigc::signal<void, int> signal_iteration(){return signal_iteration_ch;};
1.60 + sigc::signal<void> close_run(){return close_run_pr;};
1.61 +
1.62 + void set_title(std::string);
1.63 +
1.64 + void set_data(double, double, int);
1.65 +};
1.66 +#endif //DESWIN_H