X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fgui%2Felistboxcontent.h;h=2649c097c7f23bcfbb8ba281adf242219e92041f;hb=096e5476ffe567b3a22b8838c28a45dff4e10c5d;hp=acf6525b92824d571ac24bf7f9da4c14dc2f4423;hpb=8d1f62f6525ccfdbcb83c64f701dbbc325c37dbd;p=vuplus_dvbapp diff --git a/lib/gui/elistboxcontent.h b/lib/gui/elistboxcontent.h index acf6525..2649c09 100644 --- a/lib/gui/elistboxcontent.h +++ b/lib/gui/elistboxcontent.h @@ -11,7 +11,7 @@ public: eListboxPythonStringContent(); ~eListboxPythonStringContent(); - void setList(PyObject *list); + void setList(SWIG_PYOBJECT(ePyObject) list); PyObject *getCurrentSelection(); int getCurrentSelectionIndex() { return m_cursor; } void invalidateEntry(int index); @@ -38,11 +38,14 @@ protected: /* the following functions always refer to the selected item */ virtual void paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected); + + int getItemHeight() { return m_itemheight; } protected: - PyObject *m_list; + ePyObject m_list; int m_cursor, m_saved_cursor; eSize m_itemsize; + int m_itemheight; #endif }; @@ -58,14 +61,39 @@ private: class eListboxPythonMultiContent: public eListboxPythonStringContent { + ePyObject m_buildFunc; + ePyObject m_selectableFunc; + ePyObject m_template; + eRect m_selection_clip; + gRegion m_clip, m_old_clip; public: - enum { TYPE_TEXT, TYPE_PROGRESS, TYPE_PIXMAP, TYPE_PIXMAP_ALPHATEST }; + eListboxPythonMultiContent(); + ~eListboxPythonMultiContent(); + enum { TYPE_TEXT, TYPE_PROGRESS, TYPE_PIXMAP, TYPE_PIXMAP_ALPHATEST, TYPE_PIXMAP_ALPHABLEND, TYPE_PROGRESS_PIXMAP }; void paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected); int currentCursorSelectable(); - - void setFont(int fnt, gFont *fnt); + void setList(SWIG_PYOBJECT(ePyObject) list); + void setFont(int fnt, gFont *font); + void setBuildFunc(SWIG_PYOBJECT(ePyObject) func); + void setSelectableFunc(SWIG_PYOBJECT(ePyObject) func); + void setItemHeight(int height); + void setSelectionClip(eRect &rect, bool update=false); + void updateClip(gRegion &); + void entryRemoved(int idx); + void setTemplate(SWIG_PYOBJECT(ePyObject) tmplate); private: std::map > m_font; }; +#ifdef SWIG +#define RT_HALIGN_LEFT 0 +#define RT_HALIGN_RIGHT 1 +#define RT_HALIGN_CENTER 2 +#define RT_HALIGN_BLOCK 4 +#define RT_VALIGN_TOP 0 +#define RT_VALIGN_CENTER 8 +#define RT_VALIGN_BOTTOM 16 +#define RT_WRAP 32 +#endif // SWIG + #endif