algobox.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 ALGOBOX_H
hegyi@103
     4
#define ALGOBOX_H
hegyi@103
     5
hegyi@103
     6
class AlgoBox;
hegyi@103
     7
hegyi@103
     8
#include <all_include.h>
hegyi@108
     9
#include <mapstorage.h>
hegyi@103
    10
#include <libgnomecanvasmm.h>
hegyi@103
    11
#include <libgnomecanvasmm/polygon.h>
hegyi@103
    12
hegyi@103
    13
class AlgoBox : public Gtk::VBox
hegyi@103
    14
{
hegyi@106
    15
  sigc::signal<void, std::string> signal_maplist_need;  
hegyi@103
    16
  
hegyi@106
    17
  Gtk::ComboBoxText tabcbt;
hegyi@106
    18
hegyi@106
    19
protected:
hegyi@103
    20
  Gtk::Label * label;
hegyi@106
    21
  std::vector<Gtk::ComboBoxText *> nodemapcbts;
hegyi@106
    22
  std::vector<Gtk::ComboBoxText *> edgemapcbts;
hegyi@108
    23
hegyi@108
    24
  MapStorage * mapstorage;
hegyi@108
    25
hegyi@106
    26
public:
hegyi@106
    27
  AlgoBox(){};
hegyi@108
    28
  AlgoBox(std::vector<std::string>);
hegyi@103
    29
hegyi@108
    30
  virtual void init(std::vector<std::string>);
hegyi@103
    31
hegyi@106
    32
  sigc::signal<void, std::string> signal_maplist_needed();  
hegyi@106
    33
  void emit_tab_change();
hegyi@103
    34
hegyi@106
    35
  void update_tablist( std::vector< std::string > tl );
hegyi@108
    36
  void update_maplist( void * );
hegyi@108
    37
hegyi@108
    38
  void nodemaplist_changed(std::string);
hegyi@108
    39
  void edgemaplist_changed(std::string);
hegyi@103
    40
hegyi@106
    41
  void update_cbt( std::vector< std::string > tl, Gtk::ComboBoxText &);
hegyi@106
    42
  
hegyi@106
    43
  virtual void run();
hegyi@106
    44
  
hegyi@106
    45
  virtual void build_box();
hegyi@103
    46
};
hegyi@103
    47
#endif //ALGOBOX_H