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);
35 void setVisualMode(int mode);
37 /* only in complex mode: */
42 celServiceInfo, // "now" event
46 void setElementPosition(int element, eRect where);
47 void setElementFont(int element, gFont *font);
52 int cursorMove(int count=1);
61 // void setOutputDevice ? (for allocating colors, ...) .. requires some work, though
62 void setSize(const eSize &size);
64 /* the following functions always refer to the selected item */
65 void paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected);
68 /* for complex mode */
69 eRect m_element_position[celElements];
70 ePtr<gFont> m_element_font[celElements];
72 typedef std::list<eServiceReference> list;
75 list::iterator m_cursor, m_saved_cursor;
77 int m_cursor_number, m_saved_cursor_number;
81 ePtr<eServiceCenter> m_service_center;
83 eServiceReference m_root;
85 /* support for marked services */
86 std::set<eServiceReference> m_marked;
88 std::set<eServiceReference>::const_iterator m_marked_iterator;