{
}
+iListboxContent::iListboxContent(): m_listbox(0)
+{
+}
+
+void iListboxContent::setListbox(eListbox *lb)
+{
+ m_listbox = lb;
+}
DEFINE_REF(eListboxTestContent);
return m_size;
}
-RESULT eListboxStringContent::connectItemChanged(const Slot0<void> &itemChanged, ePtr<eConnection> &connection)
-{
- return 0;
-}
-
void eListboxStringContent::setSize(const eSize &size)
{
m_itemsize = size;
return PyList_Size(m_list);
}
-RESULT eListboxPythonStringContent::connectItemChanged(const Slot0<void> &itemChanged, ePtr<eConnection> &connection)
-{
- return 0;
-}
-
void eListboxPythonStringContent::setSize(const eSize &size)
{
m_itemsize = size;
{
PyObject *item = PyList_GetItem(m_list, m_cursor); // borrowed reference!
painter.setFont(fnt);
+
+ /* the user can supply tuples, in this case the first one will be displayed. */
+ if (PyTuple_Check(item))
+ item = PyTuple_GetItem(item, 0);
const char *string = PyString_Check(item) ? PyString_AsString(item) : "<not-a-string>";