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 | |
| 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')
| -rw-r--r-- | lib/gui/Makefile.am | 3 | ||||
| -rw-r--r-- | lib/gui/epixmap.cpp | 37 | ||||
| -rw-r--r-- | lib/gui/epixmap.h | 22 |
3 files changed, 61 insertions, 1 deletions
diff --git a/lib/gui/Makefile.am b/lib/gui/Makefile.am index 375a9469..076ee36a 100644 --- a/lib/gui/Makefile.am +++ b/lib/gui/Makefile.am @@ -6,6 +6,7 @@ noinst_LIBRARIES = libenigma_gui.a libenigma_gui_a_SOURCES = \ ebutton.cpp elabel.cpp eslider.cpp ewidget.cpp ewidgetdesktop.cpp \ - ewindow.cpp ewindowstyle.cpp elistbox.cpp elistboxcontent.cpp + ewindow.cpp ewindowstyle.cpp elistbox.cpp elistboxcontent.cpp \ + epixmap.cpp 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); + } +} diff --git a/lib/gui/epixmap.h b/lib/gui/epixmap.h new file mode 100644 index 00000000..8a12e2e9 --- /dev/null +++ b/lib/gui/epixmap.h @@ -0,0 +1,22 @@ +#ifndef __lib_gui_epximap_h +#define __lib_gui_epixmap_h + +#include <lib/gui/ewidget.h> + +class ePixmap: public eWidget +{ +public: + ePixmap(eWidget *parent); + + void setPixmap(gPixmap *pixmap); +protected: + ePtr<gPixmap> m_pixmap; + int event(int event, void *data=0, void *data2=0); +private: + enum eLabelEvent + { + evtChangedPixmap = evtUserWidget, + }; +}; + +#endif |
