X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flist.h;h=1c7a65dc161e0eae62011cbad1a50a14b06014d7;hb=815194201203afd6fa59e650e1007a355c829544;hp=b6cae50c876071747945d01cd8f3d1ee3d7231c1;hpb=2bdaf4955fdb94e73704adcdcf0adc2b353f0ff0;p=libs%2Fgltk.git diff --git a/source/list.h b/source/list.h index b6cae50..1c7a65d 100644 --- a/source/list.h +++ b/source/list.h @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of libmspgltk -Copyright © 2007-2011 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #ifndef MSP_GLTK_LIST_H_ #define MSP_GLTK_LIST_H_ @@ -49,11 +42,16 @@ public: virtual const char *get_class() const { return "list"; } virtual void autosize(); + void autosize_rows(unsigned); + void autosize_all(); void append(const std::string &); void insert(unsigned, const std::string &); void remove(unsigned); void clear(); +private: + void items_changed(); +public: unsigned get_n_items() const { return items.size(); } void set_selected_index(int); @@ -61,7 +59,8 @@ public: int get_selected_index() const { return sel_index; } private: - virtual void render_special(const Part &) const; + virtual void rebuild_special(const Part &, CachedPart &); + virtual void render_special(const Part &, GL::Renderer &) const; public: virtual void button_press(int, int, unsigned);