mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-16 06:05:58 -06:00
30 lines
497 B
C++
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
|