gui
Last change
on this file since 104:623ae8ed0877 was
103:3a263e57e1d9,
checked in by Hegyi Péter, 19 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 | |
---|
6 | class AlgoWin; |
---|
7 | |
---|
8 | #include <all_include.h> |
---|
9 | #include <algobox.h> |
---|
10 | #include <libgnomecanvasmm.h> |
---|
11 | #include <libgnomecanvasmm/polygon.h> |
---|
12 | |
---|
13 | enum {GENERAL, ALGO_NUM}; // algorithm IDs; |
---|
14 | |
---|
15 | class AlgoWin : public Gtk::Dialog |
---|
16 | { |
---|
17 | private: |
---|
18 | AlgoBox * ab; |
---|
19 | |
---|
20 | protected: |
---|
21 | sigc::signal<void, AlgoWin *> signal_closed; |
---|
22 | |
---|
23 | public: |
---|
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.