]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/dropdown.h
Make the List in Dropdown a normal member instead of pointer
[libs/gltk.git] / source / dropdown.h
index 1ff69be7c6150354983a736e64496b2e389f33fb..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,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 &);
 };