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