1.1 --- a/mapselector.h Wed May 02 20:33:58 2007 +0000
1.2 +++ b/mapselector.h Wed Jan 02 21:03:09 2008 +0000
1.3 @@ -22,6 +22,7 @@
1.4 #include <all_include.h>
1.5 #include <libgnomecanvasmm.h>
1.6 #include <libgnomecanvasmm/polygon.h>
1.7 +#include "map_value.h"
1.8
1.9 ///A widget by which node and edgemaps can be selected, deselected and created.
1.10
1.11 @@ -80,7 +81,7 @@
1.12
1.13 ///By pressing it
1.14 ///\ref NewMapWin wilol pop-up
1.15 - Gtk::Button * newbut;
1.16 + Gtk::Button newbut;
1.17
1.18 ///Reset button.
1.19
1.20 @@ -88,25 +89,28 @@
1.21 ///set to 'Default' option.
1.22 ///
1.23 ///It is visible only if \ref def is true.
1.24 - Gtk::Button * defbut;
1.25 -
1.26 - ///Container in which GUI elements are packed.
1.27 - Gtk::HBox hbox;
1.28 + Gtk::Button defbut;
1.29
1.30 ///Shows purpose of \ref MapSelector piece.
1.31 - Gtk::Label * label;
1.32 + Gtk::Label label;
1.33 +
1.34 + /// Which types of maps (integer, string, ...) to display.
1.35 + MapType map_type;
1.36
1.37 public:
1.38
1.39 ///Constructor of \ref MapSelector
1.40
1.41 ///Creates the layout and binds signal to the correct place.
1.42 - ///\param optionlist list of names to place in \ref cbt
1.43 + ///\param mapstorage Pointer to the \ref MapStorage to get the map list from.
1.44 ///\param act preselected option
1.45 ///\param purpose text of label indicating purpose of \ref MapStorage
1.46 ///\param itisedge do \ref MapSelector contains edgemap names or nodemapnames.
1.47 ///\param def do we need 'Default' option. See \ref def.
1.48 - MapSelector(std::vector<std::string> optionlist, std::string act, std::string purpose, bool itisedge, bool def=true);
1.49 + ///\param type Specifies which types of maps to display.
1.50 + MapSelector(std::vector<std::string> n_ml,
1.51 + std::vector<std::string> s_ml, std::string act, std::string labeltext,
1.52 + bool edge, bool d = true, MapType type = ALL);
1.53
1.54 ///Returns signal emitted if the user has changed the selection. (\ref signal_cbt)
1.55 sigc::signal<void, std::string> signal_cbt_ch();
1.56 @@ -119,7 +123,8 @@
1.57 ///Fills in \ref cbt with names, taking
1.58 ///into account that the previously selected option
1.59 ///has to be set back after the operation.
1.60 - void update_list( std::vector<std::string> );
1.61 + void update_list(std::vector<std::string> n_ml,
1.62 + std::vector<std::string> s_ml);
1.63
1.64 ///Handles changement in \ref cbt.
1.65
1.66 @@ -168,6 +173,6 @@
1.67 ///from that the option to append is coming. In this case
1.68 ///this function will set \ref cbt to the new option.
1.69 ///\param new_option new option to append
1.70 - void append_text(Glib::ustring new_option);
1.71 + void append_text(Glib::ustring new_option, MapValue::Type);
1.72 };
1.73 #endif //MAPSELECTOR_H