X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fdropdown.h;h=1ff69be7c6150354983a736e64496b2e389f33fb;hb=3db68f2604b657e79f1b2b317c19c41c2d5a985b;hp=825b8002d2427bfd6e8f426785fb91f61020d1ea;hpb=95210598ff214bbc8d05657aeffc4ce7801f211a;p=libs%2Fgltk.git diff --git a/source/dropdown.h b/source/dropdown.h index 825b800..1ff69be 100644 --- a/source/dropdown.h +++ b/source/dropdown.h @@ -18,9 +18,18 @@ class List; class Dropdown: public Widget { +public: + class Loader: public Widget::Loader + { + public: + Loader(Dropdown &); + private: + void item(const std::string &); + }; + private: List *list; - std::string text; + bool dropped; bool list_active; public: @@ -30,12 +39,18 @@ public: ~Dropdown(); void append(const std::string &); + void insert(unsigned, const std::string &); + void remove(unsigned); + void clear(); + + void set_selected_index(int); + const std::string &get_selected() const; + int get_selected_index() const; virtual void button_press(int, int, unsigned); virtual void button_release(int, int, unsigned); virtual void pointer_motion(int, int); - virtual void pointer_enter(); - virtual void pointer_leave(); + private: virtual const char *get_class() const { return "dropdown"; } virtual void render_special(const Part &) const;