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 x = 0, uint32 y = 0, uint32 w = 0, uint32 h = 0,
19 void (* f)(Element *) = NULL);
20 ~DraggableWindow(); //Does this destructor need to be virtual? Not sure... Check!
21 virtual void HandleKey(SDLKey key);
22 virtual void HandleMouseMove(uint32 x, uint32 y);
23 virtual void HandleMouseButton(uint32 x, uint32 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 cbWidth, cbHeight;
37 SDL_Surface * cbUp, * cbDown, * cbHover;
41 #endif // __DRAGGABLEWINDOW_H__