add 'templates' in listboxcontent, to split the layout from actual data content
[enigma2.git] / lib / gui / elistboxcontent.h
index 9c89c65863295e74a9b778f4769da1e8d06132dc..646990138fbead63b49aeb4ab9ab835a4c46d6ba 100644 (file)
@@ -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:
        ePyObject m_list;
        int m_cursor, m_saved_cursor;
        eSize m_itemsize;
+       int m_itemheight;
 #endif
 };
 
@@ -59,15 +62,25 @@ 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:
        eListboxPythonMultiContent();
        ~eListboxPythonMultiContent();
        enum { TYPE_TEXT, TYPE_PROGRESS, TYPE_PIXMAP, TYPE_PIXMAP_ALPHATEST };
        void paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected);
        int currentCursorSelectable();
-       
+       void setList(SWIG_PYOBJECT(ePyObject) list);
        void setFont(int fnt, gFont *fnt);
        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<int, ePtr<gFont> > m_font;
 };