X-Git-Url: http://git.tdb.fi/?p=libs%2Fgltk.git;a=blobdiff_plain;f=source%2Fdropdown.h;h=ecba9753cb5cace6957f74fa52162887703e202e;hp=1ff69be7c6150354983a736e64496b2e389f33fb;hb=3f4817441626e1abb5556ae53c16746634a57ad9;hpb=eac6b43052bb23418efb569e2238bde56c71c9bf diff --git a/source/dropdown.h b/source/dropdown.h index 1ff69be..ecba975 100644 --- a/source/dropdown.h +++ b/source/dropdown.h @@ -9,6 +9,7 @@ Distributed under the LGPL #define MSP_GLTK_DROPDOWN_H_ #include +#include "list.h" #include "widget.h" namespace Msp { @@ -28,7 +29,7 @@ public: }; private: - List *list; + List list; bool dropped; bool list_active; @@ -42,6 +43,7 @@ public: void insert(unsigned, const std::string &); void remove(unsigned); void clear(); + unsigned get_n_items() const; void set_selected_index(int); const std::string &get_selected() const; @@ -56,6 +58,7 @@ private: virtual void render_special(const Part &) const; virtual void on_geometry_change(); + void resize_list(); void list_item_selected(unsigned, const std::string &); };