]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/dropdown.h
Add icon support to Button
[libs/gltk.git] / source / dropdown.h
index c9291f91e8d8c39929d0eca0b3bb829ca8e449a2..ecba9753cb5cace6957f74fa52162887703e202e 100644 (file)
@@ -9,6 +9,7 @@ Distributed under the LGPL
 #define MSP_GLTK_DROPDOWN_H_
 
 #include <sigc++/signal.h>
+#include "list.h"
 #include "widget.h"
 
 namespace Msp {
@@ -28,8 +29,7 @@ public:
        };
 
 private:
-       List *list;
-       std::string text;
+       List list;
        bool dropped;
        bool list_active;
 
@@ -43,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;
@@ -57,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 &);
 };