Advertisement
Guest User

wxSFML.h

a guest
Jul 4th, 2015
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.59 KB | None | 0 0
  1. #ifndef __WXSFML__
  2. #define __WXSFML__
  3.  
  4. #include <SFML/Graphics.hpp>
  5. #include <wx/wx.h>
  6.  
  7. class wxSFMLCanvas : public wxControl, public sf::RenderWindow {
  8. public:
  9.     wxSFMLCanvas(wxWindow* Parent = NULL, wxWindowID Id = -1, const wxPoint& Position = wxDefaultPosition, const wxSize& Size = wxDefaultSize, long Style = 0);
  10.     virtual ~wxSFMLCanvas() {};
  11. private :
  12.     sf::Texture m_texture;
  13.     sf::Sprite m_sprite;
  14.     DECLARE_EVENT_TABLE()
  15.     virtual void OnUpdate();
  16.     void OnIdle(wxIdleEvent&);
  17.     void OnPaint(wxPaintEvent&);
  18.     void OnEraseBackground(wxEraseEvent&);
  19. };
  20.  
  21. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement