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);
15 eListboxServiceContent();
16 void setRoot(const eServiceReference &ref);
17 void getCurrent(eServiceReference &ref);
19 /* support for marked services */
21 void addMarked(const eServiceReference &ref);
22 void removeMarked(const eServiceReference &ref);
23 int isMarked(const eServiceReference &ref);
25 /* this is NOT thread safe! */
26 void markedQueryStart();
27 int markedQueryNext(eServiceReference &ref);
29 int lookupService(const eServiceReference &ref);
30 void setCurrent(const eServiceReference &ref);
37 void setVisualMode(int mode);
39 /* only in complex mode: */
44 celServiceInfo, // "now" event
48 void setElementPosition(int element, eRect where);
49 void setElementFont(int element, gFont *font);
53 int setCurrentMarked(bool);
55 void setNumberOffset(int offset) { m_numberoffset = offset; }
59 int cursorMove(int count=1);
68 // void setOutputDevice ? (for allocating colors, ...) .. requires some work, though
69 void setSize(const eSize &size);
71 /* the following functions always refer to the selected item */
72 void paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected);
75 /* for complex mode */
76 eRect m_element_position[celElements];
77 ePtr<gFont> m_element_font[celElements];
79 typedef std::list<eServiceReference> list;
82 list::iterator m_cursor, m_saved_cursor;
84 int m_cursor_number, m_saved_cursor_number;
88 ePtr<iServiceHandler> m_service_center;
90 eServiceReference m_root;
92 /* support for marked services */
93 std::set<eServiceReference> m_marked;
94 std::set<eServiceReference>::const_iterator m_marked_iterator;
96 /* support for movemode */
97 bool m_current_marked;