gui/mapselector.h
changeset 1819 fd82adfbe905
parent 1733 5e0d97823ba2
equal deleted inserted replaced
2:4da8f90f90af -1:000000000000
     1 // -*- C++ -*- //
       
     2 
       
     3 #ifndef MAP_SELECTOR_H
       
     4 #define MAP_SELECTOR_H
       
     5 
       
     6 class MapSelector;
       
     7 
       
     8 #include "all_include.h"
       
     9 #include "mapstorage.h"
       
    10 #include "new_map_win.h"
       
    11 #include "graph_displayer_canvas.h"
       
    12 #include <libgnomecanvasmm.h>
       
    13 #include <libgnomecanvasmm/polygon.h>
       
    14 
       
    15 class MapSelector : public Gtk::HBox
       
    16 {
       
    17 protected:
       
    18   GraphDisplayerCanvas & gdc;
       
    19   ///The \ref MapStorage in which the visualizable maps are stored
       
    20   MapStorage & ms;
       
    21   NewMapWin & nmw;
       
    22 
       
    23   int id;
       
    24 
       
    25   bool itisedge;
       
    26 
       
    27   bool default_state;
       
    28 
       
    29   bool set_new_map;
       
    30 
       
    31   Gtk::ComboBoxText cbt;
       
    32 
       
    33   Gtk::Button * newbut, * defbut;
       
    34 
       
    35   Gtk::HBox hbox;
       
    36 
       
    37   Gtk::Label * label;
       
    38 
       
    39   Node node_to_update;
       
    40   Edge edge_to_update;
       
    41 
       
    42 
       
    43 public:
       
    44 
       
    45   MapSelector(GraphDisplayerCanvas &, MapStorage &, NewMapWin &, int, bool);
       
    46 
       
    47   void update_list();
       
    48 
       
    49   ///If a radiobutton is clicked, this function determines
       
    50   ///which button was that and after that calls the
       
    51   ///appropriate function of the \ref GraphDisplayerCanvas
       
    52   ///to change the visible values of that attribute.
       
    53   virtual void comboChanged();
       
    54 
       
    55   virtual void new_but_pressed();
       
    56 
       
    57   virtual void reset();
       
    58 
       
    59   virtual void update(Node node);
       
    60   virtual void update(Edge edge);
       
    61 
       
    62   Glib::ustring get_active_text();
       
    63   void set_active_text(Glib::ustring);
       
    64   void append_text(Glib::ustring);
       
    65 };
       
    66 
       
    67 #endif