1 #ifndef __lib_service_listboxservice_h
2 #define __lib_service_listboxservice_h
4 #include <lib/gui/elistbox.h>
5 #include <lib/service/iservice.h>
8 class eListboxServiceContent: public virtual iListboxContent
10 DECLARE_REF(eListboxServiceContent);
12 eListboxServiceContent();
14 void addService(const eServiceReference &ref, bool beforeCurrent=false);
18 void setIgnoreService( const eServiceReference &service );
19 void setRoot(const eServiceReference &ref, bool justSet=false);
20 void getCurrent(eServiceReference &ref);
22 int getNextBeginningWithChar(char c);
23 int getPrevMarkerPos();
24 int getNextMarkerPos();
26 /* support for marked services */
28 void addMarked(const eServiceReference &ref);
29 void removeMarked(const eServiceReference &ref);
30 int isMarked(const eServiceReference &ref);
32 /* this is NOT thread safe! */
33 void markedQueryStart();
34 int markedQueryNext(eServiceReference &ref);
36 int lookupService(const eServiceReference &ref);
37 void setCurrent(const eServiceReference &ref);
44 void setVisualMode(int mode);
46 /* only in complex mode: */
53 celServiceInfo, // "now" event
66 void setElementPosition(int element, eRect where);
67 void setElementFont(int element, gFont *font);
68 void setPixmap(int type, ePtr<gPixmap> &pic);
72 int setCurrentMarked(bool);
74 void setNumberOffset(int offset) { m_numberoffset = offset; }
78 int cursorMove(int count=1);
87 // void setOutputDevice ? (for allocating colors, ...) .. requires some work, though
88 void setSize(const eSize &size);
90 /* the following functions always refer to the selected item */
91 void paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected);
94 /* for complex mode */
95 eRect m_element_position[celElements];
96 ePtr<gFont> m_element_font[celElements];
97 ePtr<gPixmap> m_pixmaps[picElements];
99 typedef std::list<eServiceReference> list;
102 list::iterator m_cursor, m_saved_cursor;
104 int m_cursor_number, m_saved_cursor_number;
108 ePtr<iServiceHandler> m_service_center;
110 eServiceReference m_root;
112 /* support for marked services */
113 std::set<eServiceReference> m_marked;
114 std::set<eServiceReference>::const_iterator m_marked_iterator;
116 /* support for movemode */
117 bool m_current_marked;
121 eServiceReference m_is_playable_ignore;