gui/mapselector.h
author alpar
Mon, 24 Oct 2005 08:09:59 +0000
changeset 1734 2fb5ceac10e7
parent 1731 616bc933c2bc
child 1737 dc821d2668c1
permissions -rw-r--r--
- dijkstraZero() added. (Until we conclude how to handle the related problem.)
- processed() query function added.
     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   Gtk::ComboBoxText cbt;
    30 
    31   Gtk::Button * newbut, * defbut;
    32 
    33   Gtk::HBox hbox;
    34 
    35   Gtk::Label * label;
    36 
    37   Node node_to_update;
    38   Edge edge_to_update;
    39 
    40 
    41 public:
    42 
    43   MapSelector(GraphDisplayerCanvas &, MapStorage &, NewMapWin &, int, bool);
    44 
    45   void update_list();
    46 
    47   ///If a radiobutton is clicked, this function determines
    48   ///which button was that and after that calls the
    49   ///appropriate function of the \ref GraphDisplayerCanvas
    50   ///to change the visible values of that attribute.
    51   virtual void comboChanged();
    52 
    53   virtual void reset();
    54 
    55   virtual void update(Node node);
    56   virtual void update(Edge edge);
    57 
    58   Glib::ustring get_active_text();
    59   void set_active_text(Glib::ustring);
    60   void append_text(Glib::ustring);
    61 };
    62 
    63 #endif