gui/algobox.h
author hegyi
Thu, 05 Jan 2006 12:30:09 +0000
changeset 1878 409a31271efd
parent 1876 5ad84ad1b68f
child 1879 01d41844ef46
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@1871
     1
// -*- C++ -*- //
hegyi@1871
     2
hegyi@1871
     3
#ifndef ALGOBOX_H
hegyi@1871
     4
#define ALGOBOX_H
hegyi@1871
     5
hegyi@1871
     6
class AlgoBox;
hegyi@1871
     7
hegyi@1871
     8
#include <all_include.h>
hegyi@1878
     9
#include <mapstorage.h>
hegyi@1871
    10
#include <libgnomecanvasmm.h>
hegyi@1871
    11
#include <libgnomecanvasmm/polygon.h>
hegyi@1871
    12
hegyi@1871
    13
class AlgoBox : public Gtk::VBox
hegyi@1871
    14
{
hegyi@1876
    15
  sigc::signal<void, std::string> signal_maplist_need;  
hegyi@1871
    16
  
hegyi@1876
    17
  Gtk::ComboBoxText tabcbt;
hegyi@1876
    18
hegyi@1876
    19
protected:
hegyi@1871
    20
  Gtk::Label * label;
hegyi@1876
    21
  std::vector<Gtk::ComboBoxText *> nodemapcbts;
hegyi@1876
    22
  std::vector<Gtk::ComboBoxText *> edgemapcbts;
hegyi@1878
    23
hegyi@1878
    24
  MapStorage * mapstorage;
hegyi@1878
    25
hegyi@1876
    26
public:
hegyi@1876
    27
  AlgoBox(){};
hegyi@1878
    28
  AlgoBox(std::vector<std::string>);
hegyi@1871
    29
hegyi@1878
    30
  virtual void init(std::vector<std::string>);
hegyi@1871
    31
hegyi@1876
    32
  sigc::signal<void, std::string> signal_maplist_needed();  
hegyi@1876
    33
  void emit_tab_change();
hegyi@1871
    34
hegyi@1876
    35
  void update_tablist( std::vector< std::string > tl );
hegyi@1878
    36
  void update_maplist( void * );
hegyi@1878
    37
hegyi@1878
    38
  void nodemaplist_changed(std::string);
hegyi@1878
    39
  void edgemaplist_changed(std::string);
hegyi@1871
    40
hegyi@1876
    41
  void update_cbt( std::vector< std::string > tl, Gtk::ComboBoxText &);
hegyi@1876
    42
  
hegyi@1876
    43
  virtual void run();
hegyi@1876
    44
  
hegyi@1876
    45
  virtual void build_box();
hegyi@1871
    46
};
hegyi@1871
    47
#endif //ALGOBOX_H