4 // Graphical User Interface window class
7 #ifndef __DRAGGABLEWINDOW_H__
8 #define __DRAGGABLEWINDOW_H__
13 class Button; // Forward declaration
15 class DraggableWindow: public Element
18 DraggableWindow(uint32_t x = 0, uint32_t y = 0, uint32_t w = 0, uint32_t h = 0,
19 void (* f)(Element *) = NULL);
20 ~DraggableWindow(); //Does this destructor need to be virtual? Not sure... Check!
21 virtual void HandleKey(SDL_Scancode key);
22 virtual void HandleMouseMove(uint32_t x, uint32_t y);
23 virtual void HandleMouseButton(uint32_t x, uint32_t y, bool mouseDown);
24 virtual void Draw(void);
25 virtual void Notify(Element *);
26 void AddElement(Element * e);
29 void (* handler)(Element *);
31 std::vector<Element *> list;
36 uint16_t cbWidth, cbHeight;
37 SDL_Surface * cbUp, * cbDown, * cbHover;
41 #endif // __DRAGGABLEWINDOW_H__