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);
51 int cursorMove(int count=1);
60 // void setOutputDevice ? (for allocating colors, ...) .. requires some work, though
61 void setSize(const eSize &size);
63 /* the following functions always refer to the selected item */
64 void paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected);
67 /* for complex mode */
68 eRect m_element_position[celElements];
69 ePtr<gFont> m_element_font[celElements];
71 typedef std::list<eServiceReference> list;
74 list::iterator m_cursor, m_saved_cursor;
76 int m_cursor_number, m_saved_cursor_number;
80 ePtr<iServiceHandler> m_service_center;
82 eServiceReference m_root;
84 /* support for marked services */
85 std::set<eServiceReference> m_marked;
87 std::set<eServiceReference>::const_iterator m_marked_iterator;