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