COIN-OR::LEMON - Graph Library

source: lemon-0.x/gui/algowin.h @ 1873:d73c7f115f53

Last change on this file since 1873:d73c7f115f53 was 1871:3905d347112c, checked in by Hegyi Péter, 18 years ago

Coding of Algorithms has begun, but code is really-really ugly yet.

File size: 927 bytes
Line 
1// -*- C++ -*- //
2
3#ifndef ALGOWIN_H
4#define ALGOWIN_H
5
6class AlgoWin;
7
8#include <all_include.h>
9#include <algobox.h>
10#include <libgnomecanvasmm.h>
11#include <libgnomecanvasmm/polygon.h>
12
13enum {GENERAL, ALGO_NUM}; // algorithm IDs;
14
15class AlgoWin : public Gtk::Dialog
16{
17private:
18  AlgoBox * ab;
19
20protected:
21  sigc::signal<void, AlgoWin *> signal_closed; 
22
23public:
24  sigc::signal<void, AlgoWin *> signal_closing()
25  {
26    return signal_closed;
27  }
28
29  AlgoWin(int algoid, std::vector<std::string> tabnames)
30    {
31      Gtk::VBox * vbox=get_vbox();
32     
33      ab=new AlgoBox(tabnames);
34     
35      vbox->pack_start(*ab);
36     
37      add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK);
38     
39      show_all_children();
40    };
41
42  void update_tablist(std::vector<std::string> tabnames)
43  {
44    ab->update_tablist(tabnames);
45  }
46
47  void on_hide()
48  {
49    signal_closed.emit(this);
50    Gtk::Dialog::on_hide();
51  }
52};
53#endif //ALGOWIN_H
Note: See TracBrowser for help on using the repository browser.