hegyi@161
|
1 |
// -*- C++ -*- //
|
hegyi@161
|
2 |
|
hegyi@161
|
3 |
#ifndef DESWIN_H
|
hegyi@161
|
4 |
#define DESWIN_H
|
hegyi@161
|
5 |
|
hegyi@172
|
6 |
class DesignWin;
|
hegyi@172
|
7 |
|
hegyi@161
|
8 |
#include <all_include.h>
|
hegyi@172
|
9 |
#include <nbtab.h>
|
hegyi@161
|
10 |
#include <libgnomecanvasmm.h>
|
hegyi@161
|
11 |
#include <libgnomecanvasmm/polygon.h>
|
hegyi@161
|
12 |
|
hegyi@161
|
13 |
class DesignWin : public Gtk::Window
|
hegyi@161
|
14 |
{
|
hegyi@161
|
15 |
private:
|
hegyi@172
|
16 |
///\ref NoteBookTab to that the \ref MapWin belongs to.
|
hegyi@172
|
17 |
NoteBookTab & mytab;
|
hegyi@172
|
18 |
|
hegyi@161
|
19 |
Gtk::SpinButton * attraction;
|
hegyi@161
|
20 |
Gtk::SpinButton * propulsation;
|
hegyi@161
|
21 |
Gtk::SpinButton * iteration;
|
hegyi@161
|
22 |
Gtk::Table table;
|
hegyi@161
|
23 |
Gtk::Button * close_button;
|
hegyi@161
|
24 |
|
hegyi@161
|
25 |
sigc::signal<void, double> signal_attraction_ch;
|
hegyi@161
|
26 |
sigc::signal<void, double> signal_propulsation_ch;
|
hegyi@161
|
27 |
sigc::signal<void, int> signal_iteration_ch;
|
hegyi@161
|
28 |
sigc::signal<void> close_run_pr;
|
hegyi@161
|
29 |
|
hegyi@161
|
30 |
void emit_attraction();
|
hegyi@161
|
31 |
void emit_propulsation();
|
hegyi@161
|
32 |
void emit_iteration();
|
hegyi@161
|
33 |
void emit_closerun(){close_run_pr.emit();};
|
hegyi@161
|
34 |
|
hegyi@161
|
35 |
public:
|
hegyi@161
|
36 |
///Close window if escape key is pressed.
|
hegyi@161
|
37 |
bool closeIfEscapeIsPressed(GdkEventKey* e);
|
hegyi@161
|
38 |
|
hegyi@161
|
39 |
///Constructor
|
hegyi@161
|
40 |
|
hegyi@161
|
41 |
///It builds the window.
|
hegyi@172
|
42 |
DesignWin(const std::string&, double, double, int, NoteBookTab & mw);
|
hegyi@161
|
43 |
|
hegyi@161
|
44 |
sigc::signal<void, double> signal_attraction(){return signal_attraction_ch;};
|
hegyi@161
|
45 |
sigc::signal<void, double> signal_propulsation(){return signal_propulsation_ch;};
|
hegyi@161
|
46 |
sigc::signal<void, int> signal_iteration(){return signal_iteration_ch;};
|
hegyi@161
|
47 |
sigc::signal<void> close_run(){return close_run_pr;};
|
hegyi@172
|
48 |
|
hegyi@172
|
49 |
void set_title(std::string);
|
hegyi@161
|
50 |
};
|
hegyi@161
|
51 |
#endif //DESWIN_H
|