ultimatepp/bazaar/FormEditor/StaticImage.hpp
koldo ac7821deb8 Form: Form core package, Editor and sample from Sc0rch
git-svn-id: svn://ultimatepp.org/upp/trunk@2412 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2010-05-19 18:38:45 +00:00

30 lines
497 B
C++

#ifndef STATIC_IMAGE_HPP
#define STATIC_IMAGE_HPP
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
class StaticImage : public Ctrl
{
public:
StaticImage(){}
virtual inline void Paint(Draw& w);
virtual inline void SetImage(const Image& image);
private:
Image _image;
};
inline void StaticImage::Paint(Draw& w)
{
w.DrawImage(0, 0, _image);
}
inline void StaticImage::SetImage(const Image& image)
{
_image = image;
Refresh();
}
#endif // STATIC_IMAGE_HPP