1 #ifndef MSP_GLTK_IMAGE_H_
2 #define MSP_GLTK_IMAGE_H_
4 #include <msp/gl/texture2d.h>
5 #include "mspgltk_api.h"
12 A widget for displaying images.
14 class MSPGLTK_API Image: public Widget
17 class Loader: public Msp::DataFile::DerivedObjectLoader<Image, Widget::Loader>
24 const GL::Texture2D *image;
25 std::string icon_name;
29 Image(const GL::Texture2D * = 0);
31 virtual const char *get_class() const { return "image"; }
34 virtual void autosize_special(const Part &, Geometry &) const;
37 void set_image(const GL::Texture2D *);
38 void set_icon(const std::string &);
39 void set_keep_aspect(bool);
43 virtual void rebuild_special(const Part &);
44 virtual void on_style_change();
45 virtual void on_reparent();