X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fimage.h;h=12e77f2a7f6df28f935bcf2c66dac9290913f33f;hb=81c4024fb6acf37df702a803dc4efdf82a81525a;hp=18556108b9ae3c67edf0766234111d4e5e946d42;hpb=8f888fddb056e4af2437a8996b8294112509bc31;p=libs%2Fgltk.git diff --git a/source/image.h b/source/image.h index 1855610..12e77f2 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,15 +11,22 @@ 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; + const GL::Texture2D *image = nullptr; std::string icon_name; - bool keep_aspect; + bool keep_aspect = true; public: - Image(const GL::Texture2D * = 0); + Image(const GL::Texture2D * = nullptr); virtual const char *get_class() const { return "image"; }