X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/31688e1b8f028059a700a92a8276c97928abd260..6dbbf2167e1a8ca25dd2cd8e20bef82686b28f61:/lib/gui/elistboxcontent.h diff --git a/lib/gui/elistboxcontent.h b/lib/gui/elistboxcontent.h index 6219cec6..11a9d080 100644 --- a/lib/gui/elistboxcontent.h +++ b/lib/gui/elistboxcontent.h @@ -2,11 +2,15 @@ #define __lib_gui_elistboxcontent_h #include +#include class eListboxTestContent: public virtual iListboxContent { - DECLARE_REF; + DECLARE_REF(eListboxTestContent); public: + +#ifndef SWIG +protected: void cursorHome(); void cursorEnd(); int cursorMove(int count=1); @@ -28,13 +32,17 @@ public: private: int m_cursor, m_saved_cursor; eSize m_size; +#endif }; class eListboxStringContent: public virtual iListboxContent { - DECLARE_REF; + DECLARE_REF(eListboxStringContent); public: eListboxStringContent(); + void setList(std::list &list); +#ifndef SWI +protected: void cursorHome(); void cursorEnd(); @@ -47,15 +55,11 @@ public: 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); - - void setList(std::list &list); private: typedef std::list list; @@ -66,14 +70,23 @@ private: int m_size; eSize m_itemsize; +#endif }; class eListboxPythonStringContent: public virtual iListboxContent { - DECLARE_REF; + DECLARE_REF(eListboxPythonStringContent); public: eListboxPythonStringContent(); ~eListboxPythonStringContent(); + + void setList(PyObject *list); + PyObject *getCurrentSelection(); + int getCurrentSelectionIndex() { return m_cursor; } + void invalidateEntry(int index); + void invalidate(); +#ifndef SWIG +protected: void cursorHome(); void cursorEnd(); int cursorMove(int count=1); @@ -91,16 +104,32 @@ public: 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); - - void setList(PyObject *list); - - PyObject *getCurrentSelection(); - -private: + virtual void paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected); + +protected: PyObject *m_list; int m_cursor, m_saved_cursor; eSize m_itemsize; +#endif +}; + +class eListboxPythonConfigContent: public eListboxPythonStringContent +{ +public: + void paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected); + void setSeperation(int sep) { m_seperation = sep; } +private: + int m_seperation; +}; + +class eListboxPythonMultiContent: public eListboxPythonStringContent +{ +public: + void paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected); + + void setFont(int fnt, gFont *fnt); +private: + std::map > m_font; }; #endif