X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fwidget.h;h=270d2a3f67eb2e1d890dbfc1426a8adac65fe0db;hb=815194201203afd6fa59e650e1007a355c829544;hp=9bdc2c0e13eba4a24eca88e585b577a2a706e996;hpb=2accd84fb2f8cc96efea8b3f27e381c2d2749160;p=libs%2Fgltk.git diff --git a/source/widget.h b/source/widget.h index 9bdc2c0..270d2a3 100644 --- a/source/widget.h +++ b/source/widget.h @@ -3,7 +3,9 @@ #include #include +#include #include "geometry.h" +#include "partcache.h" #include "state.h" namespace Msp { @@ -48,6 +50,7 @@ protected: bool focusable; Container *parent; std::string tooltip; + std::list cached_parts; Widget(); public: @@ -102,10 +105,13 @@ protected: void clear_state(State s) { set_state(s, NORMAL); } void set_state(State, State); + void rebuild(); + virtual void rebuild_special(const Part &, CachedPart &) { } + public: - void render() const; + void render(GL::Renderer &) const; protected: - virtual void render_special(const Part &) const { } + virtual void render_special(const Part &, GL::Renderer &) const { } public: // Events