X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fimage.h;h=77357561ead0a54fc147681e580bd67fa80c989c;hb=56c41b294aa47a38ac3e1be70d4868f260cb4274;hp=3194216d8bff06b1b69cd7b04db12272d79d6b28;hpb=707b59d45ae50b69c94918f8f74313283b304597;p=libs%2Fgltk.git diff --git a/source/image.h b/source/image.h index 3194216..7735756 100644 --- a/source/image.h +++ b/source/image.h @@ -2,6 +2,7 @@ #define MSP_GLTK_IMAGE_H_ #include +#include "mspgltk_api.h" #include "widget.h" namespace Msp { @@ -10,10 +11,18 @@ namespace GLtk { /** A widget for displaying images. */ -class Image: public Widget +class MSPGLTK_API Image: public Widget { +public: + class Loader: public Msp::DataFile::DerivedObjectLoader + { + public: + Loader(Image &); + }; + private: const GL::Texture2D *image; + std::string icon_name; bool keep_aspect; public: @@ -26,10 +35,14 @@ private: public: void set_image(const GL::Texture2D *); + void set_icon(const std::string &); void set_keep_aspect(bool); private: + void update_icon(); virtual void rebuild_special(const Part &); + virtual void on_style_change(); + virtual void on_reparent(); }; } // namespace GLtk