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);
17 void setIgnoreService( const eServiceReference &service );
18 void setRoot(const eServiceReference &ref, bool justSet=false);
19 void getCurrent(eServiceReference &ref);
21 int getNextBeginningWithChar(char c);
23 /* support for marked services */
25 void addMarked(const eServiceReference &ref);
26 void removeMarked(const eServiceReference &ref);
27 int isMarked(const eServiceReference &ref);
29 /* this is NOT thread safe! */
30 void markedQueryStart();
31 int markedQueryNext(eServiceReference &ref);
33 int lookupService(const eServiceReference &ref);
34 void setCurrent(const eServiceReference &ref);
41 void setVisualMode(int mode);
43 /* only in complex mode: */
48 celServiceInfo, // "now" event
52 void setElementPosition(int element, eRect where);
53 void setElementFont(int element, gFont *font);
57 int setCurrentMarked(bool);
59 void setNumberOffset(int offset) { m_numberoffset = offset; }
63 int cursorMove(int count=1);
72 // void setOutputDevice ? (for allocating colors, ...) .. requires some work, though
73 void setSize(const eSize &size);
75 /* the following functions always refer to the selected item */
76 void paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected);
79 /* for complex mode */
80 eRect m_element_position[celElements];
81 ePtr<gFont> m_element_font[celElements];
83 typedef std::list<eServiceReference> list;
86 list::iterator m_cursor, m_saved_cursor;
88 int m_cursor_number, m_saved_cursor_number;
92 ePtr<iServiceHandler> m_service_center;
94 eServiceReference m_root;
96 /* support for marked services */
97 std::set<eServiceReference> m_marked;
98 std::set<eServiceReference>::const_iterator m_marked_iterator;
100 /* support for movemode */
101 bool m_current_marked;
105 eServiceReference m_is_playable_ignore;