1 #ifndef MSP_GLTK_IMAGE_H_
2 #define MSP_GLTK_IMAGE_H_
4 #include <msp/gl/texture2d.h>
11 A widget for displaying images.
13 class Image: public Widget
16 class Loader: public Msp::DataFile::DerivedObjectLoader<Image, Widget::Loader>
23 const GL::Texture2D *image;
24 std::string icon_name;
28 Image(const GL::Texture2D * = 0);
30 virtual const char *get_class() const { return "image"; }
33 virtual void autosize_special(const Part &, Geometry &) const;
36 void set_image(const GL::Texture2D *);
37 void set_icon(const std::string &);
38 void set_keep_aspect(bool);
42 virtual void rebuild_special(const Part &);
43 virtual void on_style_change();
44 virtual void on_reparent();