algowin.h
author hegyi
Thu, 05 Jan 2006 12:30:09 +0000
branchgui
changeset 108 bf355fd6563e
parent 106 853dd852abc7
child 109 9f8dc346ac6e
permissions -rw-r--r--
Several changes. \n If new map is added to mapstorage it emits signal with the name of the new map. This was important, because from now on not only tha mapwin should be updated. \n Furthermore algobox gets a pointer to mapstorage instead of only the mapnames from it. This is important because without it it would be complicated to pass all of the required maps to algobox.
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@106
    13
enum {GENERAL, KRUSKAL, ALGO_NUM}; // algorithm IDs;
hegyi@103
    14
hegyi@106
    15
class AlgoWin : public Gtk::Window
hegyi@103
    16
{
hegyi@103
    17
private:
hegyi@103
    18
  AlgoBox * ab;
hegyi@106
    19
  Gtk::Button * runbutton;
hegyi@106
    20
  Gtk::Button * closebutton;
hegyi@103
    21
hegyi@103
    22
protected:
hegyi@103
    23
  sigc::signal<void, AlgoWin *> signal_closed;  
hegyi@106
    24
  sigc::signal<void, AlgoWin *, std::string> signal_maplist_need;  
hegyi@103
    25
hegyi@103
    26
public:
hegyi@106
    27
  bool closeIfEscapeIsPressed(GdkEventKey* e);
hegyi@103
    28
hegyi@106
    29
  sigc::signal<void, AlgoWin *> signal_closing();
hegyi@106
    30
  sigc::signal<void, AlgoWin *, std::string> signal_maplist_needed();
hegyi@103
    31
hegyi@106
    32
  void emit_tab_change(std::string);
hegyi@103
    33
hegyi@108
    34
  AlgoWin(int, std::vector<std::string>);
hegyi@106
    35
hegyi@106
    36
  void update_tablist(std::vector<std::string> tabnames);
hegyi@108
    37
  void update_maplist( void *);
hegyi@106
    38
hegyi@106
    39
  void on_hide();
hegyi@103
    40
};
hegyi@103
    41
#endif //ALGOWIN_H