design_win.h
author hegyi
Wed, 28 Feb 2007 18:20:28 +0000
changeset 194 6b2b718420eb
parent 177 40f3006fba2e
child 196 c220f9de6545
permissions -rw-r--r--
Header reorganising
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@194
    22
class NoteBookTab;
hegyi@172
    23
hegyi@161
    24
#include <all_include.h>
hegyi@161
    25
#include <libgnomecanvasmm.h>
hegyi@161
    26
#include <libgnomecanvasmm/polygon.h>
hegyi@161
    27
hegyi@161
    28
class DesignWin : public Gtk::Window
hegyi@161
    29
{
hegyi@161
    30
private:
hegyi@172
    31
  ///\ref NoteBookTab to that the \ref MapWin belongs to.
hegyi@172
    32
  NoteBookTab & mytab;
hegyi@172
    33
hegyi@161
    34
  Gtk::SpinButton * attraction;
hegyi@161
    35
  Gtk::SpinButton * propulsation;
hegyi@161
    36
  Gtk::SpinButton * iteration;
hegyi@161
    37
  Gtk::Table table;
hegyi@161
    38
  Gtk::Button * close_button;
hegyi@161
    39
hegyi@161
    40
  sigc::signal<void, double> signal_attraction_ch;
hegyi@161
    41
  sigc::signal<void, double> signal_propulsation_ch;
hegyi@161
    42
  sigc::signal<void, int> signal_iteration_ch;
hegyi@161
    43
  sigc::signal<void> close_run_pr;
hegyi@161
    44
hegyi@161
    45
  void emit_attraction();
hegyi@161
    46
  void emit_propulsation();
hegyi@161
    47
  void emit_iteration();
hegyi@161
    48
  void emit_closerun(){close_run_pr.emit();};
hegyi@161
    49
hegyi@161
    50
public:
hegyi@161
    51
  ///Close window if escape key is pressed.
hegyi@161
    52
  bool closeIfEscapeIsPressed(GdkEventKey* e);
hegyi@161
    53
hegyi@161
    54
  ///Constructor
hegyi@161
    55
hegyi@161
    56
  ///It builds the window.
hegyi@172
    57
  DesignWin(const std::string&, double, double, int, NoteBookTab & mw);
hegyi@161
    58
hegyi@161
    59
  sigc::signal<void, double> signal_attraction(){return signal_attraction_ch;};
hegyi@161
    60
  sigc::signal<void, double> signal_propulsation(){return signal_propulsation_ch;};
hegyi@161
    61
  sigc::signal<void, int> signal_iteration(){return signal_iteration_ch;};
hegyi@161
    62
  sigc::signal<void> close_run(){return close_run_pr;};
hegyi@172
    63
hegyi@172
    64
  void set_title(std::string);
hegyi@177
    65
hegyi@177
    66
  void set_data(double, double, int);
hegyi@161
    67
};
hegyi@161
    68
#endif //DESWIN_H