Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "wxSFML.h"
- #ifdef __WXGTK__
- #include <gdk/gdkx.h>
- #include <gtk/gtk.h>
- #include <wx/gtk/win_gtk.h>
- #endif
- wxSFML::wxSFML(wxWindow* Parent, wxWindowID Id, const wxPoint& Position, const wxSize& Size, long Style) : wxControl(Parent, Id, Position, Size, Style) {
- #ifdef __WXGTK__
- gtk_widget_realize(m_wxwindow);
- gtk_widget_set_double_buffered(m_wxwindow, false);
- GdkWindow* Win = GTK_PIZZA(m_wxwindow)->bin_window;
- XFlush(GDK_WINDOW_XDISPLAY(Win));
- sf::RenderWindow::create(GDK_WINDOW_XWINDOW(Win));
- #else
- sf::RenderWindow::create(GetHandle());
- #endif
- }
- void wxSFML::OnIdle(wxIdleEvent&) {
- Refresh();
- }
- void wxSFML::OnPaint(wxPaintEvent&) {
- wxPaintDC Dc(this);
- OnUpdate();
- display();
- }
- void wxSFML::OnEraseBackground(wxEraseEvent&)
- {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement