1 #ifndef __lib_service_listboxservice_h
2 #define __lib_service_listboxservice_h
4 #include <lib/gui/elistbox.h>
5 #include <lib/service/iservice.h>
9 class eListboxServiceContent: public virtual iListboxContent
11 DECLARE_REF(eListboxServiceContent);
13 eListboxServiceContent();
14 void setRoot(const eServiceReference &ref);
15 void getCurrent(eServiceReference &ref);
17 /* support for marked services */
19 void addMarked(const eServiceReference &ref);
20 void removeMarked(const eServiceReference &ref);
21 int isMarked(const eServiceReference &ref);
23 /* this is NOT thread safe! */
24 void markedQueryStart();
25 int markedQueryNext(eServiceReference &ref);
27 int lookupService(const eServiceReference &ref);
34 void setVisualMode(int mode);
36 /* only in complex mode: */
41 celServiceInfo, // "now" event
45 void setElementPosition(int element, eRect where);
46 void setElementFont(int element, gFont *font);
53 int cursorMove(int count=1);
62 // void setOutputDevice ? (for allocating colors, ...) .. requires some work, though
63 void setSize(const eSize &size);
65 /* the following functions always refer to the selected item */
66 void paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected);
69 /* for complex mode */
70 eRect m_element_position[celElements];
71 ePtr<gFont> m_element_font[celElements];
73 typedef std::list<eServiceReference> list;
76 list::iterator m_cursor, m_saved_cursor;
78 int m_cursor_number, m_saved_cursor_number;
82 ePtr<iServiceHandler> m_service_center;
84 eServiceReference m_root;
86 /* support for marked services */
87 std::set<eServiceReference> m_marked;
89 std::set<eServiceReference>::const_iterator m_marked_iterator;