summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-11-20 22:25:40 +0100
committerCarl Hetherington <cth@carlh.net>2020-01-08 21:56:47 +0100
commit89780827d5d6ec9127eae0108d10f71dc79d1a72 (patch)
tree5dcdb70685504a21c2d125fdbdc39f179246c456
parent83c9e9c858072ab919916269790dcc65565fdd25 (diff)
Implement GLView::update.
-rw-r--r--src/wx/gl_video_view.cc12
-rw-r--r--src/wx/gl_video_view.h1
-rw-r--r--src/wx/video_view.h3
3 files changed, 5 insertions, 11 deletions
diff --git a/src/wx/gl_video_view.cc b/src/wx/gl_video_view.cc
index 836b3eb35..934a91ad5 100644
--- a/src/wx/gl_video_view.cc
+++ b/src/wx/gl_video_view.cc
@@ -61,7 +61,7 @@ GLVideoView::GLVideoView (FilmViewer* viewer, wxWindow *parent)
, _one_shot (false)
{
_canvas = new wxGLCanvas (parent, wxID_ANY, 0, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE);
- _canvas->Bind (wxEVT_PAINT, boost::bind(&GLVideoView::paint, this));
+ _canvas->Bind (wxEVT_PAINT, boost::bind(&GLVideoView::update, this));
_canvas->Bind (wxEVT_SIZE, boost::bind(boost::ref(Sized)));
_canvas->Bind (wxEVT_CREATE, boost::bind(&GLVideoView::create, this));
@@ -131,20 +131,12 @@ check_gl_error (char const * last)
}
void
-GLVideoView::paint ()
-{
- request_one_shot ();
-}
-
-void
GLVideoView::update ()
{
if (!_canvas->IsShownOnScreen()) {
return;
}
- /* XXX_b */
-// wxClientDC dc (_canvas);
-// draw ();
+ request_one_shot ();
}
void
diff --git a/src/wx/gl_video_view.h b/src/wx/gl_video_view.h
index 614393024..162438a5b 100644
--- a/src/wx/gl_video_view.h
+++ b/src/wx/gl_video_view.h
@@ -50,7 +50,6 @@ public:
}
private:
- void paint ();
void draw ();
void thread ();
void request_one_shot ();
diff --git a/src/wx/video_view.h b/src/wx/video_view.h
index 142cfd022..656d8621e 100644
--- a/src/wx/video_view.h
+++ b/src/wx/video_view.h
@@ -46,6 +46,9 @@ public:
virtual void set_image (boost::shared_ptr<const Image> image) = 0;
virtual wxWindow* get () const = 0;
+ /** Redraw the view after something has changed like content outlining,
+ * the film being removed, etc.
+ */
virtual void update () = 0;
/* XXX_b: make pure */