diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2005-03-31 19:55:46 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2005-03-31 19:55:46 +0000 |
| commit | 77c45c9d2cabd3c1dc028c41d26573ac62147a34 (patch) | |
| tree | d2264677d28a4220458f3269b2fadacdad3a9905 /lib/gui/epixmap.cpp | |
| parent | 29a034f2d2cc8e6b63632d6d959388b719f7c9fd (diff) | |
| download | enigma2-77c45c9d2cabd3c1dc028c41d26573ac62147a34.tar.gz enigma2-77c45c9d2cabd3c1dc028c41d26573ac62147a34.zip | |
- fixed blit in gRC
- enable use of loadPNG trough python (something is still broken, sorry)
- add ePixmap
- dummy widgets now possible as pixmaps
Diffstat (limited to 'lib/gui/epixmap.cpp')
| -rw-r--r-- | lib/gui/epixmap.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/gui/epixmap.cpp b/lib/gui/epixmap.cpp new file mode 100644 index 00000000..a0655aa9 --- /dev/null +++ b/lib/gui/epixmap.cpp @@ -0,0 +1,37 @@ +#include <lib/gui/epixmap.h> + +ePixmap::ePixmap(eWidget *parent): eWidget(parent) +{ +} + +void ePixmap::setPixmap(gPixmap *pixmap) +{ + m_pixmap = pixmap; + event(evtChangedPixmap); +} + +int ePixmap::event(int event, void *data, void *data2) +{ + switch (event) + { + case evtPaint: + { + ePtr<eWindowStyle> style; + + getStyle(style); + + eWidget::event(event, data, data2); + + gPainter &painter = *(gPainter*)data2; + if (m_pixmap) + painter.blit(m_pixmap, ePoint(0, 0)); + + return 0; + } + case evtChangedPixmap: + invalidate(); + return 0; + default: + return eWidget::event(event, data, data2); + } +} |
