Merge branch 'translations' into experimental
[enigma2.git] / lib / service / listboxservice.h
index d26ee54520eaac4f8fc1e13fa9dc933c50782184..5228a2f212db7aa78046c5059f0ee4ba30e20ad3 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef __lib_service_listboxservice_h
 #define __lib_service_listboxservice_h
 
+#include <lib/gdi/gpixmap.h>
 #include <lib/gui/elistbox.h>
 #include <lib/service/iservice.h>
 #include <set>
@@ -11,7 +12,8 @@ class eListboxServiceContent: public virtual iListboxContent
 public:
        eListboxServiceContent();
 
-       void addService(const eServiceReference &ref);
+       void addService(const eServiceReference &ref, bool beforeCurrent=false);
+       void removeCurrent();
        void FillFinished();
 
        void setIgnoreService( const eServiceReference &service );
@@ -19,7 +21,9 @@ public:
        void getCurrent(eServiceReference &ref);
        
        int getNextBeginningWithChar(char c);
-
+       int getPrevMarkerPos();
+       int getNextMarkerPos();
+       
                /* support for marked services */
        void initMarked();
        void addMarked(const eServiceReference &ref);
@@ -43,6 +47,7 @@ public:
                /* only in complex mode: */
        enum {
                celServiceNumber,
+               celMarkerPixmap,
                celFolderPixmap,
                celServiceName,
                celServiceTypePixmap,
@@ -54,7 +59,9 @@ public:
                picDVB_S,
                picDVB_T,
                picDVB_C,
+               picServiceGroup,
                picFolder,
+               picMarker,
                picElements
        };
 
@@ -67,6 +74,20 @@ public:
        int setCurrentMarked(bool);
 
        void setNumberOffset(int offset) { m_numberoffset = offset; }
+       
+       int getItemHeight() { return m_itemheight; }
+       void setItemHeight(int height);
+
+       enum {
+               markedForeground,
+               markedForegroundSelected,
+               markedBackground,
+               markedBackgroundSelected,
+               serviceNotAvail,
+               colorElements
+       };
+       
+       void setColor(int color, gRGB &col);
 protected:
        void cursorHome();
        void cursorEnd();
@@ -90,6 +111,8 @@ protected:
        eRect m_element_position[celElements];
        ePtr<gFont> m_element_font[celElements];
        ePtr<gPixmap> m_pixmaps[picElements];
+       gRGB m_color[colorElements];
+       bool m_color_set[colorElements];
 private:
        typedef std::list<eServiceReference> list;
        
@@ -101,6 +124,7 @@ private:
        
        eSize m_itemsize;
        ePtr<iServiceHandler> m_service_center;
+       ePtr<iListableService> m_lst;
        
        eServiceReference m_root;
 
@@ -114,6 +138,8 @@ private:
        int m_numberoffset;
 
        eServiceReference m_is_playable_ignore;
+
+       int m_itemheight;
 };
 
 #endif