mapselector.h
author hegyi
Fri, 06 Jan 2006 23:16:51 +0000
branchgui
changeset 115 9e5196647a5a
child 122 96bfa82264c3
permissions -rw-r--r--
Forgotten file committed.
hegyi@115
     1
// -*- C++ -*- //
hegyi@115
     2
hegyi@115
     3
#ifndef MAPSELECTOR_H
hegyi@115
     4
#define MAPSELECTOR_H
hegyi@115
     5
hegyi@115
     6
class MapSelector;
hegyi@115
     7
hegyi@115
     8
#include <all_include.h>
hegyi@115
     9
#include <map_win.h>
hegyi@115
    10
#include <libgnomecanvasmm.h>
hegyi@115
    11
#include <libgnomecanvasmm/polygon.h>
hegyi@115
    12
hegyi@115
    13
class MapSelector : public Gtk::HBox
hegyi@115
    14
{
hegyi@115
    15
 protected:
hegyi@115
    16
  sigc::signal<void, std::string> signal_cbt;
hegyi@115
    17
  sigc::signal<void, bool> signal_newmapwin;
hegyi@115
    18
hegyi@115
    19
  bool def;
hegyi@115
    20
hegyi@115
    21
  bool itisedge;
hegyi@115
    22
hegyi@115
    23
  bool default_state;
hegyi@115
    24
hegyi@115
    25
  bool set_new_map;
hegyi@115
    26
hegyi@115
    27
  Gtk::ComboBoxText cbt;
hegyi@115
    28
hegyi@115
    29
  Gtk::Button * newbut, * defbut;
hegyi@115
    30
hegyi@115
    31
  Gtk::HBox hbox;
hegyi@115
    32
hegyi@115
    33
  Gtk::Label * label;
hegyi@115
    34
hegyi@115
    35
 public:
hegyi@115
    36
hegyi@115
    37
  MapSelector(std::vector<std::string>, std::string, std::string, bool, bool def=true);
hegyi@115
    38
hegyi@115
    39
  sigc::signal<void, std::string> signal_cbt_ch();
hegyi@115
    40
  sigc::signal<void, bool> signal_newmapwin_needed();
hegyi@115
    41
hegyi@115
    42
  void update_list( std::vector<std::string> );
hegyi@115
    43
hegyi@115
    44
  ///If a radiobutton is clicked, this function determines
hegyi@115
    45
  ///which button was that and after that calls the
hegyi@115
    46
  ///appropriate function of the \ref GraphDisplayerCanvas
hegyi@115
    47
  ///to change the visible values of that attribute.
hegyi@115
    48
  virtual void comboChanged();
hegyi@115
    49
hegyi@115
    50
  virtual void new_but_pressed();
hegyi@115
    51
hegyi@115
    52
  virtual void reset();
hegyi@115
    53
hegyi@115
    54
  Glib::ustring get_active_text();
hegyi@115
    55
  void set_active_text(Glib::ustring);
hegyi@115
    56
  void set_active(int index){cbt.set_active(index);};
hegyi@115
    57
  void clear(){cbt.clear();};
hegyi@115
    58
  void append_text(Glib::ustring);
hegyi@115
    59
};
hegyi@115
    60
#endif //MAPSELECTOR_H