3 This file is part of libmspgltk
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_GLTK_DROPDOWN_H_
9 #define MSP_GLTK_DROPDOWN_H_
11 #include <sigc++/signal.h>
19 class Dropdown: public Widget
22 class Loader: public Widget::Loader
27 void item(const std::string &);
36 sigc::signal<void, int, const std::string &> signal_item_selected;
38 Dropdown(const Resources &);
41 void append(const std::string &);
42 void insert(unsigned, const std::string &);
43 void remove(unsigned);
46 void set_selected_index(int);
47 const std::string &get_selected() const;
48 int get_selected_index() const;
50 virtual void button_press(int, int, unsigned);
51 virtual void button_release(int, int, unsigned);
52 virtual void pointer_motion(int, int);
55 virtual const char *get_class() const { return "dropdown"; }
56 virtual void render_special(const Part &) const;
58 virtual void on_geometry_change();
60 void list_item_selected(unsigned, const std::string &);