algowin.h
author hegyi
Thu, 05 Jan 2006 16:54:34 +0000
branchgui
changeset 109 9f8dc346ac6e
parent 108 bf355fd6563e
child 114 0ace7edbb06f
permissions -rw-r--r--
Kruskal algorithm can be run from GUI from now on.
     1 // -*- C++ -*- //
     2 
     3 #ifndef ALGOWIN_H
     4 #define ALGOWIN_H
     5 
     6 class AlgoWin;
     7 
     8 #include <all_include.h>
     9 //#include <mapstorage.h>
    10 #include <algobox.h>
    11 #include <libgnomecanvasmm.h>
    12 #include <libgnomecanvasmm/polygon.h>
    13 
    14 class MapStorage;
    15 
    16 enum {GENERAL, KRUSKAL, ALGO_NUM}; // algorithm IDs;
    17 
    18 class AlgoWin : public Gtk::Window
    19 {
    20 private:
    21   AlgoBox * ab;
    22   Gtk::Button * runbutton;
    23   Gtk::Button * closebutton;
    24 
    25 protected:
    26   sigc::signal<void, AlgoWin *> signal_closed;  
    27   sigc::signal<void, AlgoWin *, std::string> signal_maplist_need;  
    28 
    29 public:
    30   bool closeIfEscapeIsPressed(GdkEventKey* e);
    31 
    32   sigc::signal<void, AlgoWin *> signal_closing();
    33   sigc::signal<void, AlgoWin *, std::string> signal_maplist_needed();
    34 
    35   void emit_tab_change(std::string);
    36 
    37   AlgoWin(int, std::vector<std::string>);
    38 
    39   void update_tablist(std::vector<std::string> tabnames);
    40   void update_maplist(MapStorage *);
    41 
    42   void on_hide();
    43 };
    44 #endif //ALGOWIN_H