diff -r c7ae8642a8d8 -r 879e47e5b731 mapselector.h --- a/mapselector.h Wed May 02 20:33:58 2007 +0000 +++ b/mapselector.h Wed Jan 02 21:03:09 2008 +0000 @@ -22,6 +22,7 @@ #include #include #include +#include "map_value.h" ///A widget by which node and edgemaps can be selected, deselected and created. @@ -80,7 +81,7 @@ ///By pressing it ///\ref NewMapWin wilol pop-up - Gtk::Button * newbut; + Gtk::Button newbut; ///Reset button. @@ -88,25 +89,28 @@ ///set to 'Default' option. /// ///It is visible only if \ref def is true. - Gtk::Button * defbut; - - ///Container in which GUI elements are packed. - Gtk::HBox hbox; + Gtk::Button defbut; ///Shows purpose of \ref MapSelector piece. - Gtk::Label * label; + Gtk::Label label; + + /// Which types of maps (integer, string, ...) to display. + MapType map_type; public: ///Constructor of \ref MapSelector ///Creates the layout and binds signal to the correct place. - ///\param optionlist list of names to place in \ref cbt + ///\param mapstorage Pointer to the \ref MapStorage to get the map list from. ///\param act preselected option ///\param purpose text of label indicating purpose of \ref MapStorage ///\param itisedge do \ref MapSelector contains edgemap names or nodemapnames. ///\param def do we need 'Default' option. See \ref def. - MapSelector(std::vector optionlist, std::string act, std::string purpose, bool itisedge, bool def=true); + ///\param type Specifies which types of maps to display. + MapSelector(std::vector n_ml, + std::vector s_ml, std::string act, std::string labeltext, + bool edge, bool d = true, MapType type = ALL); ///Returns signal emitted if the user has changed the selection. (\ref signal_cbt) sigc::signal signal_cbt_ch(); @@ -119,7 +123,8 @@ ///Fills in \ref cbt with names, taking ///into account that the previously selected option ///has to be set back after the operation. - void update_list( std::vector ); + void update_list(std::vector n_ml, + std::vector s_ml); ///Handles changement in \ref cbt. @@ -168,6 +173,6 @@ ///from that the option to append is coming. In this case ///this function will set \ref cbt to the new option. ///\param new_option new option to append - void append_text(Glib::ustring new_option); + void append_text(Glib::ustring new_option, MapValue::Type); }; #endif //MAPSELECTOR_H