X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/cc6908402d34d4633d3b27297bdbde3b9a94e403..1dbaf81816d8994a84716bf1f8ca34645206ae22:/lib/gui/elistboxcontent.h diff --git a/lib/gui/elistboxcontent.h b/lib/gui/elistboxcontent.h index 11a9d080..f7e5d2b6 100644 --- a/lib/gui/elistboxcontent.h +++ b/lib/gui/elistboxcontent.h @@ -4,75 +4,6 @@ #include #include -class eListboxTestContent: public virtual iListboxContent -{ - DECLARE_REF(eListboxTestContent); -public: - -#ifndef SWIG -protected: - void cursorHome(); - void cursorEnd(); - int cursorMove(int count=1); - int cursorValid(); - int cursorSet(int n); - int cursorGet(); - - void cursorSave(); - void cursorRestore(); - int size(); - - RESULT connectItemChanged(const Slot0 &itemChanged, ePtr &connection); - - // void setOutputDevice ? (for allocating colors, ...) .. requires some work, though - void setSize(const eSize &size); - - /* the following functions always refer to the selected item */ - void paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected); -private: - int m_cursor, m_saved_cursor; - eSize m_size; -#endif -}; - -class eListboxStringContent: public virtual iListboxContent -{ - DECLARE_REF(eListboxStringContent); -public: - eListboxStringContent(); - void setList(std::list &list); -#ifndef SWI -protected: - - void cursorHome(); - void cursorEnd(); - int cursorMove(int count=1); - int cursorValid(); - int cursorSet(int n); - int cursorGet(); - - void cursorSave(); - void cursorRestore(); - int size(); - - // void setOutputDevice ? (for allocating colors, ...) .. requires some work, though - void setSize(const eSize &size); - - /* the following functions always refer to the selected item */ - void paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected); -private: - typedef std::list list; - - list m_list; - list::iterator m_cursor, m_saved_cursor; - - int m_cursor_number, m_saved_cursor_number; - int m_size; - - eSize m_itemsize; -#endif -}; - class eListboxPythonStringContent: public virtual iListboxContent { DECLARE_REF(eListboxPythonStringContent); @@ -85,6 +16,7 @@ public: int getCurrentSelectionIndex() { return m_cursor; } void invalidateEntry(int index); void invalidate(); + eSize getItemSize() { return m_itemsize; } #ifndef SWIG protected: void cursorHome(); @@ -93,7 +25,8 @@ protected: int cursorValid(); int cursorSet(int n); int cursorGet(); - + virtual int currentCursorSelectable(); + void cursorSave(); void cursorRestore(); int size(); @@ -118,16 +51,23 @@ class eListboxPythonConfigContent: public eListboxPythonStringContent public: void paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected); void setSeperation(int sep) { m_seperation = sep; } + int currentCursorSelectable(); private: int m_seperation; }; class eListboxPythonMultiContent: public eListboxPythonStringContent { + PyObject *m_buildFunc; 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 setFont(int fnt, gFont *fnt); + void setBuildFunc(PyObject *func); private: std::map > m_font; };