Merge branch 'bug_538_ignore_global_actions_in_standby'
[enigma2.git] / lib / service / listboxservice.h
index b2fc311..589afba 100644 (file)
@@ -1,9 +1,9 @@
 #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>
 
 class eListboxServiceContent: public virtual iListboxContent
@@ -11,21 +11,32 @@ class eListboxServiceContent: public virtual iListboxContent
        DECLARE_REF(eListboxServiceContent);
 public:
        eListboxServiceContent();
-       void setRoot(const eServiceReference &ref);
+
+       void addService(const eServiceReference &ref, bool beforeCurrent=false);
+       void removeCurrent();
+       void FillFinished();
+
+       void setIgnoreService( const eServiceReference &service );
+       void setRoot(const eServiceReference &ref, bool justSet=false);
        void getCurrent(eServiceReference &ref);
        
+       int getNextBeginningWithChar(char c);
+       int getPrevMarkerPos();
+       int getNextMarkerPos();
+       
                /* support for marked services */
        void initMarked();
        void addMarked(const eServiceReference &ref);
        void removeMarked(const eServiceReference &ref);
        int isMarked(const eServiceReference &ref);
-       
+
                /* this is NOT thread safe! */
        void markedQueryStart();
        int markedQueryNext(eServiceReference &ref);
 
        int lookupService(const eServiceReference &ref);
-       
+       void setCurrent(const eServiceReference &ref);
+
        enum {
                visModeSimple,
                visModeComplex
@@ -35,20 +46,56 @@ public:
        
                /* only in complex mode: */
        enum {
-               celServiceName,
                celServiceNumber,
-               celIcon,
+               celMarkerPixmap,
+               celFolderPixmap,
+               celServiceEventProgressbar,
+               celServiceName,
+               celServiceTypePixmap,
                celServiceInfo, // "now" event
                celElements
        };
-       
+
+       enum {
+               picDVB_S,
+               picDVB_T,
+               picDVB_C,
+               picServiceGroup,
+               picFolder,
+               picMarker,
+               picServiceEventProgressbar,
+               picElements
+       };
+
        void setElementPosition(int element, eRect where);
        void setElementFont(int element, gFont *font);
+       void setPixmap(int type, ePtr<gPixmap> &pic);
        
        void sort();
-       
+
        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,
+               serviceEventProgressbarColor,
+               serviceEventProgressbarColorSelected,
+               serviceEventProgressbarBorderColor,
+               serviceEventProgressbarBorderColorSelected,
+               serviceDescriptionColor,
+               serviceDescriptionColorSelected,
+               colorElements
+       };
        
+       void setColor(int color, gRGB &col);
 protected:
        void cursorHome();
        void cursorEnd();
@@ -56,7 +103,7 @@ protected:
        int cursorValid();
        int cursorSet(int n);
        int cursorGet();
-       
+
        void cursorSave();
        void cursorRestore();
        int size();
@@ -71,6 +118,9 @@ protected:
                /* for complex mode */
        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;
        
@@ -82,17 +132,22 @@ private:
        
        eSize m_itemsize;
        ePtr<iServiceHandler> m_service_center;
+       ePtr<iListableService> m_lst;
        
        eServiceReference m_root;
 
                /* support for marked services */
        std::set<eServiceReference> m_marked;
-       
        std::set<eServiceReference>::const_iterator m_marked_iterator;
 
                /* support for movemode */
        bool m_current_marked;
-       list::iterator m_swap;
+
+       int m_numberoffset;
+
+       eServiceReference m_is_playable_ignore;
+
+       int m_itemheight;
 };
 
 #endif