2 // GUI element base class
16 Element(uint32 x = 0, uint32 y = 0, uint32 w = 0, uint32 h = 0)
17 { extents.x = x, extents.y = y, extents.w = w, extents.h = h; }
18 // These are "pure" virtual functions...
19 virtual void HandleKey(SDLKey key) = 0;
20 virtual void HandleMouseMove(uint32 x, uint32 y) = 0;
21 virtual void HandleMouseButton(uint32 x, uint32 y, bool mouseDown) = 0;
22 virtual void Draw(uint32, uint32) = 0;
23 virtual void Notify(Element *) = 0;
24 //Needed? virtual ~Element() = 0;
25 //We're not allocating anything in the base class, so the answer would be NO.
26 bool Inside(uint32 x, uint32 y);
29 static void SetScreenAndPitch(uint32 * s, uint32 p) { screenBuffer = s, pitch = p; }
36 static uint32 * screenBuffer;
40 #endif // __ELEMENT_H__