+ else
+ {
+ if (selected)
+ {
+ style.setStyle(painter, eWindowStyle::styleListboxSelected);
+ if (pbackColorSelected)
+ {
+ int color = PyInt_AsLong(pbackColorSelected);
+ painter.setBackgroundColor(gRGB(color));
+ }
+ painter.clear();
+ }
+ else
+ {
+ bool clear=true;
+ style.setStyle(painter, eWindowStyle::styleListboxNormal);
+ if (pbackColor)
+ {
+ int color = PyInt_AsLong(pbackColor);
+ painter.setBackgroundColor(gRGB(color));
+ }/* if we have a local background color set, use that. */
+ else if (local_style)
+ {
+ if (local_style->m_transparent_background)
+ clear=false;
+ else if (local_style->m_background_color_set)
+ painter.setBackgroundColor(local_style->m_background_color);
+ }
+ /* if we have no transparent background */
+ if (clear)
+ painter.clear();
+ }
+ }
+ if (pforeColor)
+ {
+ int color = PyInt_AsLong(pforeColor);
+ painter.setForegroundColor(gRGB(color));
+ }/* if we have a local foreground color set, use that. */
+ else if (local_style && local_style->m_foreground_color_set)
+ painter.setForegroundColor(local_style->m_foreground_color);
+}
+
+void eListboxPythonMultiContent::paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected)
+{
+ gRegion itemregion(eRect(offset, m_itemsize));
+ eListboxStyle *local_style = 0;
+ eRect sel_clip(m_selection_clip);
+ if (sel_clip.valid())
+ sel_clip.moveBy(offset);
+
+ /* get local listbox style, if present */
+ if (m_listbox)
+ local_style = m_listbox->getLocalStyle();
+
+ painter.clip(itemregion);
+
+ clearRegion(painter, style, local_style, ePyObject(), ePyObject(), ePyObject(), selected, itemregion, sel_clip);