algowin.h
author hegyi
Tue, 03 Jan 2006 17:30:22 +0000
branchgui
changeset 103 3a263e57e1d9
child 106 853dd852abc7
permissions -rw-r--r--
Coding of Algorithms has begun, but code is really-really ugly yet.
hegyi@103
     1
// -*- C++ -*- //
hegyi@103
     2
hegyi@103
     3
#ifndef ALGOWIN_H
hegyi@103
     4
#define ALGOWIN_H
hegyi@103
     5
hegyi@103
     6
class AlgoWin;
hegyi@103
     7
hegyi@103
     8
#include <all_include.h>
hegyi@103
     9
#include <algobox.h>
hegyi@103
    10
#include <libgnomecanvasmm.h>
hegyi@103
    11
#include <libgnomecanvasmm/polygon.h>
hegyi@103
    12
hegyi@103
    13
enum {GENERAL, ALGO_NUM}; // algorithm IDs;
hegyi@103
    14
hegyi@103
    15
class AlgoWin : public Gtk::Dialog
hegyi@103
    16
{
hegyi@103
    17
private:
hegyi@103
    18
  AlgoBox * ab;
hegyi@103
    19
hegyi@103
    20
protected:
hegyi@103
    21
  sigc::signal<void, AlgoWin *> signal_closed;  
hegyi@103
    22
hegyi@103
    23
public:
hegyi@103
    24
  sigc::signal<void, AlgoWin *> signal_closing()
hegyi@103
    25
  {
hegyi@103
    26
    return signal_closed;
hegyi@103
    27
  }
hegyi@103
    28
hegyi@103
    29
  AlgoWin(int algoid, std::vector<std::string> tabnames)
hegyi@103
    30
    {
hegyi@103
    31
      Gtk::VBox * vbox=get_vbox();
hegyi@103
    32
      
hegyi@103
    33
      ab=new AlgoBox(tabnames);
hegyi@103
    34
      
hegyi@103
    35
      vbox->pack_start(*ab);
hegyi@103
    36
      
hegyi@103
    37
      add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK);
hegyi@103
    38
      
hegyi@103
    39
      show_all_children();
hegyi@103
    40
    };
hegyi@103
    41
hegyi@103
    42
  void update_tablist(std::vector<std::string> tabnames)
hegyi@103
    43
  {
hegyi@103
    44
    ab->update_tablist(tabnames);
hegyi@103
    45
  }
hegyi@103
    46
hegyi@103
    47
  void on_hide()
hegyi@103
    48
  {
hegyi@103
    49
    signal_closed.emit(this);
hegyi@103
    50
    Gtk::Dialog::on_hide();
hegyi@103
    51
  }
hegyi@103
    52
};
hegyi@103
    53
#endif //ALGOWIN_H