summaryrefslogtreecommitdiff
path: root/src/tools/dcpomatic.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-03-23 01:21:46 +0000
committerCarl Hetherington <cth@carlh.net>2018-03-23 01:21:46 +0000
commit83cc718cc4f38bc2a9cc8cd62ed570415c5ba289 (patch)
treee7dd1f7a17b86d6110b06fee3fa206a38edf1fc0 /src/tools/dcpomatic.cc
parente2361edc2fc2c07d6474bf5a7f76dc2a5b55ee81 (diff)
Arrows to go forward/back one frame.
Diffstat (limited to 'src/tools/dcpomatic.cc')
-rw-r--r--src/tools/dcpomatic.cc24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc
index 4d888b3fa..0fffe6cfc 100644
--- a/src/tools/dcpomatic.cc
+++ b/src/tools/dcpomatic.cc
@@ -220,7 +220,9 @@ enum {
ID_add_file,
ID_remove,
ID_start_stop,
- ID_timeline
+ ID_timeline,
+ ID_back_frame,
+ ID_forward_frame
};
class DOMFrame : public wxFrame
@@ -330,22 +332,26 @@ public:
overall_panel->SetSizer (main_sizer);
#ifdef __WXOSX__
- int accelerators = 5;
+ int accelerators = 7;
#else
- int accelerators = 4;
+ int accelerators = 6;
#endif
wxAcceleratorEntry* accel = new wxAcceleratorEntry[accelerators];
accel[0].Set (wxACCEL_CTRL, static_cast<int>('A'), ID_add_file);
accel[1].Set (wxACCEL_NORMAL, WXK_DELETE, ID_remove);
accel[2].Set (wxACCEL_NORMAL, WXK_SPACE, ID_start_stop);
accel[3].Set (wxACCEL_CTRL, static_cast<int>('T'), ID_timeline);
+ accel[4].Set (wxACCEL_NORMAL, WXK_LEFT, ID_back_frame);
+ accel[5].Set (wxACCEL_NORMAL, WXK_RIGHT, ID_forward_frame);
#ifdef __WXOSX__
- accel[4].Set (wxACCEL_CTRL, static_cast<int>('W'), wxID_EXIT);
+ accel[6].Set (wxACCEL_CTRL, static_cast<int>('W'), wxID_EXIT);
#endif
Bind (wxEVT_MENU, boost::bind (&ContentPanel::add_file_clicked, _film_editor->content_panel()), ID_add_file);
Bind (wxEVT_MENU, boost::bind (&DOMFrame::remove_clicked, this, _1), ID_remove);
Bind (wxEVT_MENU, boost::bind (&DOMFrame::start_stop_pressed, this), ID_start_stop);
Bind (wxEVT_MENU, boost::bind (&DOMFrame::timeline_pressed, this), ID_timeline);
+ Bind (wxEVT_MENU, boost::bind (&DOMFrame::back_frame, this), ID_back_frame);
+ Bind (wxEVT_MENU, boost::bind (&DOMFrame::forward_frame, this), ID_forward_frame);
wxAcceleratorTable accel_table (accelerators, accel);
SetAcceleratorTable (accel_table);
delete[] accel;
@@ -1221,6 +1227,16 @@ private:
_film_editor->content_panel()->timeline_clicked ();
}
+ void back_frame ()
+ {
+ _film_viewer->back_frame ();
+ }
+
+ void forward_frame ()
+ {
+ _film_viewer->forward_frame ();
+ }
+
FilmEditor* _film_editor;
FilmViewer* _film_viewer;
VideoWaveformDialog* _video_waveform_dialog;