1 #ifndef __lib_gui_elistboxcontent_h
2 #define __lib_gui_elistboxcontent_h
4 #include <lib/python/python.h>
5 #include <lib/gui/elistbox.h>
7 class eListboxTestContent: public virtual iListboxContent
9 DECLARE_REF(eListboxTestContent);
16 int cursorMove(int count=1);
25 RESULT connectItemChanged(const Slot0<void> &itemChanged, ePtr<eConnection> &connection);
27 // void setOutputDevice ? (for allocating colors, ...) .. requires some work, though
28 void setSize(const eSize &size);
30 /* the following functions always refer to the selected item */
31 void paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected);
33 int m_cursor, m_saved_cursor;
38 class eListboxStringContent: public virtual iListboxContent
40 DECLARE_REF(eListboxStringContent);
42 eListboxStringContent();
43 void setList(std::list<std::string> &list);
49 int cursorMove(int count=1);
58 // void setOutputDevice ? (for allocating colors, ...) .. requires some work, though
59 void setSize(const eSize &size);
61 /* the following functions always refer to the selected item */
62 void paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected);
64 typedef std::list<std::string> list;
67 list::iterator m_cursor, m_saved_cursor;
69 int m_cursor_number, m_saved_cursor_number;
76 class eListboxPythonStringContent: public virtual iListboxContent
78 DECLARE_REF(eListboxPythonStringContent);
80 eListboxPythonStringContent();
81 ~eListboxPythonStringContent();
83 void setList(PyObject *list);
84 PyObject *getCurrentSelection();
85 int getCurrentSelectionIndex() { return m_cursor; }
86 void invalidateEntry(int index);
88 eSize getItemSize() { return m_itemsize; }
93 int cursorMove(int count=1);
102 RESULT connectItemChanged(const Slot0<void> &itemChanged, ePtr<eConnection> &connection);
104 // void setOutputDevice ? (for allocating colors, ...) .. requires some work, though
105 void setSize(const eSize &size);
107 /* the following functions always refer to the selected item */
108 virtual void paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected);
112 int m_cursor, m_saved_cursor;
117 class eListboxPythonConfigContent: public eListboxPythonStringContent
120 void paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected);
121 void setSeperation(int sep) { m_seperation = sep; }
126 class eListboxPythonMultiContent: public eListboxPythonStringContent
129 void paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected);
131 void setFont(int fnt, gFont *fnt);
133 std::map<int, ePtr<gFont> > m_font;