X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fdropdown.h;h=7cacf2205a496f389a4b7c869505b484eab90e7b;hb=b92c878a286036af106e969a29b2689876aa5f65;hp=2fe82d0a194c41421bfee2b057813b3d5cc01841;hpb=91997dd3189b93a67179822ec2fed5f2a7bddb74;p=libs%2Fgltk.git diff --git a/source/dropdown.h b/source/dropdown.h index 2fe82d0..7cacf22 100644 --- a/source/dropdown.h +++ b/source/dropdown.h @@ -1,7 +1,7 @@ /* $Id$ This file is part of libmspgltk -Copyright © 2007-2009 Mikko Rasa, Mikkosoft Productions +Copyright © 2007-2011 Mikko Rasa, Mikkosoft Productions Distributed under the LGPL */ @@ -28,15 +28,19 @@ public: void item(const std::string &); }; + sigc::signal signal_item_selected; + private: List list; bool dropped; public: - sigc::signal signal_item_selected; - Dropdown(); + virtual const char *get_class() const { return "dropdown"; } + + virtual void autosize(); + void append(const std::string &); void insert(unsigned, const std::string &); void remove(unsigned); @@ -47,16 +51,17 @@ public: const std::string &get_selected() const; int get_selected_index() const; - virtual void button_press(int, int, unsigned); - private: - virtual const char *get_class() const { return "dropdown"; } virtual void render_special(const Part &) const; +public: + virtual void button_press(int, int, unsigned); +private: virtual void on_geometry_change(); virtual void on_style_change(); - void resize_list(); + void list_autosize_changed(); + void resize_list(); void list_item_selected(unsigned, const std::string &); };