git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add possibility to set a callable check function
[enigma2.git]
/
lib
/
gui
/
elistboxcontent.h
diff --git
a/lib/gui/elistboxcontent.h
b/lib/gui/elistboxcontent.h
index f7e5d2b6e590be3a6c52c80b2797a5bca69b10d0..d3df3b143db3210b971013ada5d998754fc94377 100644
(file)
--- a/
lib/gui/elistboxcontent.h
+++ b/
lib/gui/elistboxcontent.h
@@
-11,7
+11,7
@@
public:
eListboxPythonStringContent();
~eListboxPythonStringContent();
eListboxPythonStringContent();
~eListboxPythonStringContent();
- void setList(
PyObject *
list);
+ void setList(
SWIG_PYOBJECT(ePyObject)
list);
PyObject *getCurrentSelection();
int getCurrentSelectionIndex() { return m_cursor; }
void invalidateEntry(int index);
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);
/* 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:
protected:
-
PyObject *
m_list;
+
ePyObject
m_list;
int m_cursor, m_saved_cursor;
eSize m_itemsize;
int m_cursor, m_saved_cursor;
eSize m_itemsize;
+ int m_itemheight;
#endif
};
#endif
};
@@
-58,7
+61,10
@@
private:
class eListboxPythonMultiContent: public eListboxPythonStringContent
{
class eListboxPythonMultiContent: public eListboxPythonStringContent
{
- PyObject *m_buildFunc;
+ ePyObject m_buildFunc;
+ ePyObject m_callableFunc;
+ eRect m_selection_clip;
+ gRegion m_temp_clip;
public:
eListboxPythonMultiContent();
~eListboxPythonMultiContent();
public:
eListboxPythonMultiContent();
~eListboxPythonMultiContent();
@@
-67,9
+73,23
@@
public:
int currentCursorSelectable();
void setFont(int fnt, gFont *fnt);
int currentCursorSelectable();
void setFont(int fnt, gFont *fnt);
- void setBuildFunc(PyObject *func);
+ void setBuildFunc(SWIG_PYOBJECT(ePyObject) func);
+ void setCallableFunc(SWIG_PYOBJECT(ePyObject) func);
+ void setItemHeight(int height);
+ void setSelectionClip(eRect &rect, bool update=false);
private:
std::map<int, ePtr<gFont> > m_font;
};
private:
std::map<int, ePtr<gFont> > 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
#endif