]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/list.h
Refresh list items one at a time
[libs/gltk.git] / source / list.h
index 561e388c77a25cd114abc8a4f3471ba79674b8ff..14d9eac291e3bb2b7daee7c9862a268108689182 100644 (file)
@@ -38,7 +38,7 @@ private:
                void item_added(unsigned);
                void item_removed(unsigned);
                void cleared();
-               void refresh_strings();
+               void refresh_item(unsigned);
        };
 
 protected:
@@ -47,7 +47,9 @@ protected:
        public:
                virtual const char *get_class() const { return "listitem"; }
 
-               virtual void autosize();
+       protected:
+               virtual void autosize_special(const Part &, Geometry &);
+       public:
                void set_active(bool);
 
                virtual void render_special(const Part &, GL::Renderer &) const;
@@ -76,6 +78,7 @@ private:
        int sel_index;
        unsigned first;
        unsigned max_scroll;
+       unsigned view_size;
 
        VSlider slider;
        std::vector<Item *> items;
@@ -90,10 +93,10 @@ public:
 
        virtual const char *get_class() const { return "list"; }
 
-       virtual void autosize();
-       void autosize_rows(unsigned);
-       void autosize_all();
+private:
+       virtual void autosize_special(const Part &, Geometry &);
 
+public:
        void set_data(ListData &);
        ListData &get_data() { return *data; }
        const ListData &get_data() const { return *data; }
@@ -101,7 +104,10 @@ private:
        void items_changed();
 protected:
        virtual Item *create_item(unsigned);
+
 public:
+       void set_view_size(unsigned);
+       void set_view_all();
 
        void set_selected_index(int);
        int get_selected_index() const { return sel_index; }