alpar@174
|
1 |
/* -*- C++ -*-
|
alpar@174
|
2 |
*
|
alpar@174
|
3 |
* This file is a part of LEMON, a generic C++ optimization library
|
alpar@174
|
4 |
*
|
alpar@174
|
5 |
* Copyright (C) 2003-2006
|
alpar@174
|
6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
|
alpar@174
|
7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES).
|
alpar@174
|
8 |
*
|
alpar@174
|
9 |
* Permission to use, modify and distribute this software is granted
|
alpar@174
|
10 |
* provided that this copyright notice appears in all copies. For
|
alpar@174
|
11 |
* precise terms see the accompanying LICENSE file.
|
alpar@174
|
12 |
*
|
alpar@174
|
13 |
* This software is provided "AS IS" with no warranty of any kind,
|
alpar@174
|
14 |
* express or implied, and with no claim as to its suitability for any
|
alpar@174
|
15 |
* purpose.
|
alpar@174
|
16 |
*
|
alpar@174
|
17 |
*/
|
hegyi@161
|
18 |
|
hegyi@161
|
19 |
#ifndef DESWIN_H
|
hegyi@161
|
20 |
#define DESWIN_H
|
hegyi@161
|
21 |
|
hegyi@172
|
22 |
class DesignWin;
|
hegyi@172
|
23 |
|
hegyi@161
|
24 |
#include <all_include.h>
|
hegyi@172
|
25 |
#include <nbtab.h>
|
hegyi@161
|
26 |
#include <libgnomecanvasmm.h>
|
hegyi@161
|
27 |
#include <libgnomecanvasmm/polygon.h>
|
hegyi@161
|
28 |
|
hegyi@161
|
29 |
class DesignWin : public Gtk::Window
|
hegyi@161
|
30 |
{
|
hegyi@161
|
31 |
private:
|
hegyi@172
|
32 |
///\ref NoteBookTab to that the \ref MapWin belongs to.
|
hegyi@172
|
33 |
NoteBookTab & mytab;
|
hegyi@172
|
34 |
|
hegyi@161
|
35 |
Gtk::SpinButton * attraction;
|
hegyi@161
|
36 |
Gtk::SpinButton * propulsation;
|
hegyi@161
|
37 |
Gtk::SpinButton * iteration;
|
hegyi@161
|
38 |
Gtk::Table table;
|
hegyi@161
|
39 |
Gtk::Button * close_button;
|
hegyi@161
|
40 |
|
hegyi@161
|
41 |
sigc::signal<void, double> signal_attraction_ch;
|
hegyi@161
|
42 |
sigc::signal<void, double> signal_propulsation_ch;
|
hegyi@161
|
43 |
sigc::signal<void, int> signal_iteration_ch;
|
hegyi@161
|
44 |
sigc::signal<void> close_run_pr;
|
hegyi@161
|
45 |
|
hegyi@161
|
46 |
void emit_attraction();
|
hegyi@161
|
47 |
void emit_propulsation();
|
hegyi@161
|
48 |
void emit_iteration();
|
hegyi@161
|
49 |
void emit_closerun(){close_run_pr.emit();};
|
hegyi@161
|
50 |
|
hegyi@161
|
51 |
public:
|
hegyi@161
|
52 |
///Close window if escape key is pressed.
|
hegyi@161
|
53 |
bool closeIfEscapeIsPressed(GdkEventKey* e);
|
hegyi@161
|
54 |
|
hegyi@161
|
55 |
///Constructor
|
hegyi@161
|
56 |
|
hegyi@161
|
57 |
///It builds the window.
|
hegyi@172
|
58 |
DesignWin(const std::string&, double, double, int, NoteBookTab & mw);
|
hegyi@161
|
59 |
|
hegyi@161
|
60 |
sigc::signal<void, double> signal_attraction(){return signal_attraction_ch;};
|
hegyi@161
|
61 |
sigc::signal<void, double> signal_propulsation(){return signal_propulsation_ch;};
|
hegyi@161
|
62 |
sigc::signal<void, int> signal_iteration(){return signal_iteration_ch;};
|
hegyi@161
|
63 |
sigc::signal<void> close_run(){return close_run_pr;};
|
hegyi@172
|
64 |
|
hegyi@172
|
65 |
void set_title(std::string);
|
hegyi@177
|
66 |
|
hegyi@177
|
67 |
void set_data(double, double, int);
|
hegyi@161
|
68 |
};
|
hegyi@161
|
69 |
#endif //DESWIN_H
|