diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-08-16 14:10:09 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-08-16 14:10:09 +0100 |
| commit | f8a0bc6135a933dcf660bbc46b4b3d29d503690e (patch) | |
| tree | 3d31c624da5ebedf77b92e94e302c3ecd2068bd4 /src/wx/video_waveform_plot.h | |
| parent | 533de5cc51d93a8403816fc0f04ca1d5aa733242 (diff) | |
Simple mouseover in the video waveform (part of #932).
Diffstat (limited to 'src/wx/video_waveform_plot.h')
| -rw-r--r-- | src/wx/video_waveform_plot.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/wx/video_waveform_plot.h b/src/wx/video_waveform_plot.h index 0f8bd33cd..7e9dbf709 100644 --- a/src/wx/video_waveform_plot.h +++ b/src/wx/video_waveform_plot.h @@ -29,23 +29,33 @@ namespace dcp { class PlayerVideo; class Image; +class Film; class FilmViewer; class VideoWaveformPlot : public wxPanel { public: - VideoWaveformPlot (wxWindow* parent, FilmViewer* viewer); + VideoWaveformPlot (wxWindow* parent, boost::weak_ptr<const Film> film, FilmViewer* viewer); void set_enabled (bool e); void set_component (int c); void set_contrast (int b); + /** Emitted when the mouse is moved over the waveform. The parameters + are: + - (int, int): image x range + - (int, int): component value range + */ + boost::signals2::signal<void (int, int, int, int)> MouseMoved; + private: void paint (); void sized (wxSizeEvent &); void create_waveform (); void set_image (boost::weak_ptr<PlayerVideo>); + void mouse_moved (wxMouseEvent &); + boost::weak_ptr<const Film> _film; boost::shared_ptr<dcp::OpenJPEGImage> _image; boost::shared_ptr<const Image> _waveform; bool _dirty; @@ -54,6 +64,7 @@ private: int _contrast; static int const _vertical_margin; + static int const _pixel_values; static int const _x_axis_width; boost::signals2::connection _viewer_connection; |
