1 #ifndef __lib_service_listboxservice_h
2 #define __lib_service_listboxservice_h
4 #include <lib/gui/elistbox.h>
5 #include <lib/service/iservice.h>
10 class eListboxServiceContent: public virtual iListboxContent
12 DECLARE_REF(eListboxServiceContent);
14 eListboxServiceContent();
15 void setRoot(const eServiceReference &ref);
16 void getCurrent(eServiceReference &ref);
18 /* support for marked services */
20 void addMarked(const eServiceReference &ref);
21 void removeMarked(const eServiceReference &ref);
22 int isMarked(const eServiceReference &ref);
24 /* this is NOT thread safe! */
25 void markedQueryStart();
26 int markedQueryNext(eServiceReference &ref);
28 int lookupService(const eServiceReference &ref);
33 int cursorMove(int count=1);
42 // void setOutputDevice ? (for allocating colors, ...) .. requires some work, though
43 void setSize(const eSize &size);
45 /* the following functions always refer to the selected item */
46 void paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected);
48 typedef std::list<eServiceReference> list;
51 list::iterator m_cursor, m_saved_cursor;
53 int m_cursor_number, m_saved_cursor_number;
57 ePtr<eServiceCenter> m_service_center;
59 eServiceReference m_root;
61 /* support for marked services */
62 std::set<eServiceReference> m_marked;
64 std::set<eServiceReference>::const_iterator m_marked_iterator;