13 //#include "element.h"
15 class ListBox: public Element
16 //class ListBox: public Window
19 // ListBox(uint32 x = 0, uint32 y = 0, uint32 w = 0, uint32 h = 0): Element(x, y, w, h),
20 ListBox(uint32 x = 0, uint32 y = 0, uint32 w = 0, uint32 h = 0);//: Window(x, y, w, h),
21 // windowPtr(0), cursor(0), limit(0), charWidth((w / 8) - 1), charHeight(h / 8),
22 // elementToTell(NULL), upArrow(w - 8, 0, upArrowBox),
23 // downArrow(w - 8, h - 8, downArrowBox), upArrow2(w - 8, h - 16, upArrowBox) {}
24 virtual void HandleKey(SDLKey key);
25 virtual void HandleMouseMove(uint32 x, uint32 y);
26 virtual void HandleMouseButton(uint32 x, uint32 y, bool mouseDown);
27 virtual void Draw(uint32 offsetX = 0, uint32 offsetY = 0);
28 virtual void Notify(Element * e);
29 void SetNotificationElement(Element * e);
30 void AddItem(std::string s);
31 std::string GetSelectedItem(void);
35 uint32 windowPtr, cursor, limit;
36 uint32 charWidth, charHeight; // Box width/height in characters
37 Element * elementToTell;
38 Button upArrow, downArrow, upArrow2;
39 std::vector<std::string> item;
42 uint32 yRelativePoint;
45 #endif // __LISTBOX_H__