consistently use iServiceHandler instead of eServiceCenter to use properly wrapped...
[openblackhole/openblackhole-enigma2.git] / lib / service / listboxservice.h
index d524193..f560b62 100644 (file)
@@ -5,7 +5,6 @@
 #include <lib/service/iservice.h>
 
 #include <set>
-class eServiceCenter;
 
 class eListboxServiceContent: public virtual iListboxContent
 {
@@ -20,9 +19,32 @@ public:
        void addMarked(const eServiceReference &ref);
        void removeMarked(const eServiceReference &ref);
        int isMarked(const eServiceReference &ref);
-       int lookupService(const eServiceReference &ref);
-
+       
+               /* this is NOT thread safe! */
+       void markedQueryStart();
+       int markedQueryNext(eServiceReference &ref);
 
+       int lookupService(const eServiceReference &ref);
+       
+       enum {
+               visModeSimple,
+               visModeComplex
+       };
+       
+       void setVisualMode(int mode);
+       
+               /* only in complex mode: */
+       enum {
+               celServiceName,
+               celServiceNumber,
+               celIcon,
+               celServiceInfo, // "now" event
+               celElements
+       };
+       
+       void setElementPosition(int element, eRect where);
+       void setElementFont(int element, gFont *font);
+       
 protected:
        void cursorHome();
        void cursorEnd();
@@ -40,6 +62,11 @@ protected:
        
                /* the following functions always refer to the selected item */
        void paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected);
+       
+       int m_visual_mode;
+               /* for complex mode */
+       eRect m_element_position[celElements];
+       ePtr<gFont> m_element_font[celElements];
 private:
        typedef std::list<eServiceReference> list;
        
@@ -50,12 +77,14 @@ private:
        int m_size;
        
        eSize m_itemsize;
-       ePtr<eServiceCenter> m_service_center;
+       ePtr<iServiceHandler> m_service_center;
        
        eServiceReference m_root;
        
                /* support for marked services */
        std::set<eServiceReference> m_marked;
+       
+       std::set<eServiceReference>::const_iterator m_marked_iterator;
 };
 
 #endif