00001
00002 #ifndef __SDL_PANEL_HPP__
00003 #define __SDL_PANEL_HPP__
00004
00005 #include "wx_sdl.hpp"
00006 #include "vect2.hpp"
00007 #include "mapManager.hpp"
00008
00009
00010 class SDLPanel : public wxPanel {
00011 DECLARE_CLASS(SDLPanel)
00012 DECLARE_EVENT_TABLE()
00013
00014 private:
00015 SDL_Surface* screen;
00016
00017 void onPaint(wxPaintEvent &event);
00018 void onEraseBackground(wxEraseEvent &event){}
00019 void onIdle(wxIdleEvent &event);
00020 void createScreen();
00021
00022 void OnMouseEvent (wxMouseEvent& event);
00023
00024
00025 vect2 mousePosition;
00026 bool mouseLeftDown;
00027 bool mouseRightDown;
00028
00029 mapManager& mapManagement;
00030
00031 public:
00032 SDLPanel(wxWindow *parent, mapManager& mapManagement);
00033 ~SDLPanel();
00034 };
00035
00036 #endif // __SDL_PANEL_HPP__