1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/mapselector.h Thu Oct 20 15:50:23 2005 +0000
1.3 @@ -0,0 +1,63 @@
1.4 +// -*- C++ -*- //
1.5 +
1.6 +#ifndef MAP_SELECTOR_H
1.7 +#define MAP_SELECTOR_H
1.8 +
1.9 +class MapSelector;
1.10 +
1.11 +#include "all_include.h"
1.12 +#include "mapstorage.h"
1.13 +#include "map_win.h"
1.14 +#include "graph_displayer_canvas.h"
1.15 +#include <libgnomecanvasmm.h>
1.16 +#include <libgnomecanvasmm/polygon.h>
1.17 +
1.18 +class MapSelector : public Gtk::HBox
1.19 +{
1.20 +protected:
1.21 + GraphDisplayerCanvas & gdc;
1.22 + ///The \ref MapStorage in which the visualizable maps are stored
1.23 + MapStorage & ms;
1.24 + MapWin & mw;
1.25 +
1.26 + int id;
1.27 +
1.28 + bool itisedge;
1.29 +
1.30 + bool default_state;
1.31 +
1.32 + Gtk::ComboBoxText cbt;
1.33 +
1.34 + Gtk::Button * newbut, * defbut;
1.35 +
1.36 + Gtk::HBox hbox;
1.37 +
1.38 + Gtk::Label * label;
1.39 +
1.40 + Node node_to_update;
1.41 + Edge edge_to_update;
1.42 +
1.43 +
1.44 +public:
1.45 +
1.46 + MapSelector(GraphDisplayerCanvas &, MapStorage &, MapWin &, int, bool);
1.47 +
1.48 + void update_list();
1.49 +
1.50 + ///If a radiobutton is clicked, this function determines
1.51 + ///which button was that and after that calls the
1.52 + ///appropriate function of the \ref GraphDisplayerCanvas
1.53 + ///to change the visible values of that attribute.
1.54 + virtual void comboChanged();
1.55 +
1.56 + virtual void reset();
1.57 +
1.58 + virtual void update(Node node);
1.59 + virtual void update(Edge edge);
1.60 +
1.61 + Glib::ustring get_active_text();
1.62 + void set_active_text(Glib::ustring);
1.63 + void append_text(Glib::ustring);
1.64 +};
1.65 +
1.66 +#endif