break;
}
- /* XXX: maybe this should be proxied through the VideoView */
- _video_view->get()->Bind (wxEVT_SIZE, boost::bind (&FilmViewer::video_view_sized, this));
- _timer.Bind (wxEVT_TIMER, boost::bind (&FilmViewer::timer, this));
+ _video_view->Sized.connect (boost::bind(&FilmViewer::video_view_sized, this));
+ _timer.Bind (wxEVT_TIMER, boost::bind(&FilmViewer::timer, this));
set_film (shared_ptr<Film> ());
_canvas = new wxGLCanvas (parent, wxID_ANY, 0, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE);
_context = new wxGLContext (_canvas);
_canvas->Bind (wxEVT_PAINT, boost::bind(&GLVideoView::paint, this, _1));
+ _canvas->Bind (wxEVT_SIZE, boost::bind(boost::ref(Sized)));
glGenTextures (1, &_id);
glBindTexture (GL_TEXTURE_2D, _id);
_panel->SetBackgroundColour (*wxBLACK);
_panel->Bind (wxEVT_PAINT, boost::bind (&SimpleVideoView::paint, this));
+ _panel->Bind (wxEVT_SIZE, boost::bind(boost::ref(Sized)));
}
void
#define DCPOMATIC_VIDEO_VIEW_H
#include <boost/shared_ptr.hpp>
+#include <boost/signals2.hpp>
class Image;
class wxWindow;
virtual void set_image (boost::shared_ptr<const Image> image) = 0;
virtual wxWindow* get () const = 0;
+
+ boost::signals2::signal<void()> Sized;
};
#endif