make local listbox styles working for text lists
[enigma2.git] / lib / gui / elistbox.cpp
index c21f363f4b9dd6a13b499e30687adfbeb63c77d9..b7b1e3ff595a6538e3d571f1a2bb3f532bebaf1e 100644 (file)
@@ -8,6 +8,7 @@ eListbox::eListbox(eWidget *parent) :
        m_content_changed(false), m_enabled_wrap_around(false), m_top(0), m_selected(0), m_itemheight(25),
        m_items_per_page(0), m_selection_enabled(1), m_scrollbar(NULL)
 {
+       memset(&m_style, 0, sizeof(m_style));
 //     setContent(new eListboxStringContent());
 
        ePtr<eActionMap> ptr;
@@ -471,3 +472,32 @@ void eListbox::entryReset(bool selectionHome)
        moveSelection(justCheck);
        invalidate();
 }
+
+void eListbox::setBackgroundColor(gRGB &col)
+{
+       m_style.m_background_color = col;
+       m_style.m_background_color_set = 1;
+}
+
+void eListbox::setForegroundColor(gRGB &col)
+{
+       m_style.m_foreground_color = col;
+       m_style.m_foreground_color_set = 1;
+}
+
+void eListbox::setBackgroundPicture(ePtr<gPixmap> &pm)
+{
+       m_style.m_background = pm;
+}
+
+void eListbox::setSelectionPicture(ePtr<gPixmap> &pm)
+{
+       m_style.m_selection = pm;
+}
+
+struct eListboxStyle *eListbox::getLocalStyle(void)
+{
+               /* transparency is set directly in the widget */
+       m_style.m_transparent_background = isTransparent();
+       return &m_style;
+}