1.1 --- a/gui/algowin.h Wed Jan 04 13:31:59 2006 +0000
1.2 +++ b/gui/algowin.h Wed Jan 04 18:05:55 2006 +0000
1.3 @@ -10,44 +10,32 @@
1.4 #include <libgnomecanvasmm.h>
1.5 #include <libgnomecanvasmm/polygon.h>
1.6
1.7 -enum {GENERAL, ALGO_NUM}; // algorithm IDs;
1.8 +enum {GENERAL, KRUSKAL, ALGO_NUM}; // algorithm IDs;
1.9
1.10 -class AlgoWin : public Gtk::Dialog
1.11 +class AlgoWin : public Gtk::Window
1.12 {
1.13 private:
1.14 AlgoBox * ab;
1.15 + Gtk::Button * runbutton;
1.16 + Gtk::Button * closebutton;
1.17
1.18 protected:
1.19 sigc::signal<void, AlgoWin *> signal_closed;
1.20 + sigc::signal<void, AlgoWin *, std::string> signal_maplist_need;
1.21
1.22 public:
1.23 - sigc::signal<void, AlgoWin *> signal_closing()
1.24 - {
1.25 - return signal_closed;
1.26 - }
1.27 + bool closeIfEscapeIsPressed(GdkEventKey* e);
1.28
1.29 - AlgoWin(int algoid, std::vector<std::string> tabnames)
1.30 - {
1.31 - Gtk::VBox * vbox=get_vbox();
1.32 -
1.33 - ab=new AlgoBox(tabnames);
1.34 -
1.35 - vbox->pack_start(*ab);
1.36 -
1.37 - add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK);
1.38 -
1.39 - show_all_children();
1.40 - };
1.41 + sigc::signal<void, AlgoWin *> signal_closing();
1.42 + sigc::signal<void, AlgoWin *, std::string> signal_maplist_needed();
1.43
1.44 - void update_tablist(std::vector<std::string> tabnames)
1.45 - {
1.46 - ab->update_tablist(tabnames);
1.47 - }
1.48 + void emit_tab_change(std::string);
1.49
1.50 - void on_hide()
1.51 - {
1.52 - signal_closed.emit(this);
1.53 - Gtk::Dialog::on_hide();
1.54 - }
1.55 + AlgoWin(int, std::vector<std::string>, std::vector<std::string>, std::vector<std::string>);
1.56 +
1.57 + void update_tablist(std::vector<std::string> tabnames);
1.58 + void update_maplist(std::vector<std::string>, std::vector<std::string>);
1.59 +
1.60 + void on_hide();
1.61 };
1.62 #endif //ALGOWIN_H