author | hegyi |
Mon, 16 Oct 2006 13:05:25 +0000 | |
changeset 166 | 302d75b08b27 |
child 172 | fc1e478697d3 |
permissions | -rw-r--r-- |
hegyi@161 | 1 |
// -*- C++ -*- // |
hegyi@161 | 2 |
|
hegyi@161 | 3 |
#ifndef DESWIN_H |
hegyi@161 | 4 |
#define DESWIN_H |
hegyi@161 | 5 |
|
hegyi@161 | 6 |
#include <all_include.h> |
hegyi@161 | 7 |
#include <libgnomecanvasmm.h> |
hegyi@161 | 8 |
#include <libgnomecanvasmm/polygon.h> |
hegyi@161 | 9 |
|
hegyi@161 | 10 |
class DesignWin : public Gtk::Window |
hegyi@161 | 11 |
{ |
hegyi@161 | 12 |
private: |
hegyi@161 | 13 |
Gtk::SpinButton * attraction; |
hegyi@161 | 14 |
Gtk::SpinButton * propulsation; |
hegyi@161 | 15 |
Gtk::SpinButton * iteration; |
hegyi@161 | 16 |
Gtk::Table table; |
hegyi@161 | 17 |
Gtk::Button * close_button; |
hegyi@161 | 18 |
|
hegyi@161 | 19 |
sigc::signal<void, double> signal_attraction_ch; |
hegyi@161 | 20 |
sigc::signal<void, double> signal_propulsation_ch; |
hegyi@161 | 21 |
sigc::signal<void, int> signal_iteration_ch; |
hegyi@161 | 22 |
sigc::signal<void> close_run_pr; |
hegyi@161 | 23 |
|
hegyi@161 | 24 |
void emit_attraction(); |
hegyi@161 | 25 |
void emit_propulsation(); |
hegyi@161 | 26 |
void emit_iteration(); |
hegyi@161 | 27 |
void emit_closerun(){close_run_pr.emit();}; |
hegyi@161 | 28 |
|
hegyi@161 | 29 |
public: |
hegyi@161 | 30 |
///Close window if escape key is pressed. |
hegyi@161 | 31 |
bool closeIfEscapeIsPressed(GdkEventKey* e); |
hegyi@161 | 32 |
|
hegyi@161 | 33 |
///Constructor |
hegyi@161 | 34 |
|
hegyi@161 | 35 |
///It builds the window. |
hegyi@161 | 36 |
DesignWin(const std::string&, double, double, int); |
hegyi@161 | 37 |
|
hegyi@161 | 38 |
sigc::signal<void, double> signal_attraction(){return signal_attraction_ch;}; |
hegyi@161 | 39 |
sigc::signal<void, double> signal_propulsation(){return signal_propulsation_ch;}; |
hegyi@161 | 40 |
sigc::signal<void, int> signal_iteration(){return signal_iteration_ch;}; |
hegyi@161 | 41 |
sigc::signal<void> close_run(){return close_run_pr;}; |
hegyi@161 | 42 |
}; |
hegyi@161 | 43 |
#endif //DESWIN_H |