1 #ifndef MSP_GLTK_DROPDOWN_H_
2 #define MSP_GLTK_DROPDOWN_H_
4 #include <sigc++/signal.h>
13 class Dropdown: virtual public Widget, private Container
16 class Loader: public Widget::Loader
21 void item(const std::string &);
24 sigc::signal<void, int, const std::string &> signal_item_selected;
33 virtual const char *get_class() const { return "dropdown"; }
35 virtual void autosize();
37 void append(const std::string &);
38 void insert(unsigned, const std::string &);
39 void remove(unsigned);
41 unsigned get_n_items() const;
43 void set_selected_index(int);
44 const std::string &get_selected() const;
45 int get_selected_index() const;
48 virtual void rebuild_special(const Part &, CachedPart &);
49 virtual void render_special(const Part &, GL::Renderer &) const;
52 virtual void button_press(int, int, unsigned);
54 virtual void on_geometry_change();
55 virtual void on_style_change();
57 void list_autosize_changed();
59 void list_item_selected(unsigned, const std::string &);