, _slider (new wxSlider(this, wxID_ANY, 0, 0, 4096))
, _viewer (viewer)
, _slider_being_moved (false)
, _slider (new wxSlider(this, wxID_ANY, 0, 0, 4096))
, _viewer (viewer)
, _slider_being_moved (false)
time_sizer->Add (_timecode, 0, wxEXPAND);
h_sizer->Add (_rewind_button, 0, wxALL | wxALIGN_CENTER_VERTICAL, 2);
time_sizer->Add (_timecode, 0, wxEXPAND);
h_sizer->Add (_rewind_button, 0, wxALL | wxALIGN_CENTER_VERTICAL, 2);
- h_sizer->Add (time_sizer, 0, wxEXPAND);
+ h_sizer->Add (time_sizer, 0, wxALL | wxALIGN_CENTER_VERTICAL, 2);
h_sizer->Add (_back_button, 0, wxALL | wxALIGN_CENTER_VERTICAL, 2);
h_sizer->Add (_forward_button, 0, wxALL | wxALIGN_CENTER_VERTICAL, 2);
_button_sizer = new wxBoxSizer (wxHORIZONTAL);
h_sizer->Add (_button_sizer, 0, wxEXPAND);
h_sizer->Add (_back_button, 0, wxALL | wxALIGN_CENTER_VERTICAL, 2);
h_sizer->Add (_forward_button, 0, wxALL | wxALIGN_CENTER_VERTICAL, 2);
_button_sizer = new wxBoxSizer (wxHORIZONTAL);
h_sizer->Add (_button_sizer, 0, wxEXPAND);
- h_sizer->Add (_slider, 1, wxEXPAND);
+ {
+ auto box = new wxBoxSizer (wxVERTICAL);
+ box->Add (_markers, 0, wxEXPAND);
+ box->Add (_slider, 0, wxEXPAND);
+ h_sizer->Add (box, 1, wxEXPAND);
+ }
_v_sizer->Add (h_sizer, 0, wxEXPAND | wxALL, 6);
_v_sizer->Add (h_sizer, 0, wxEXPAND | wxALL, 6);
}
_slider->Bind (wxEVT_SCROLL_THUMBTRACK, boost::bind(&Controls::slider_moved, this, false));
}
_slider->Bind (wxEVT_SCROLL_THUMBTRACK, boost::bind(&Controls::slider_moved, this, false));
_frame_number->Bind (wxEVT_LEFT_DOWN, boost::bind(&Controls::frame_number_clicked, this));
_timecode->Bind (wxEVT_LEFT_DOWN, boost::bind(&Controls::timecode_clicked, this));
if (_jump_to_selected) {
_frame_number->Bind (wxEVT_LEFT_DOWN, boost::bind(&Controls::frame_number_clicked, this));
_timecode->Bind (wxEVT_LEFT_DOWN, boost::bind(&Controls::timecode_clicked, this));
if (_jump_to_selected) {
- viewer->Started.connect (boost::bind(&Controls::started, this));
- viewer->Stopped.connect (boost::bind(&Controls::stopped, this));
+ viewer.Started.connect (boost::bind(&Controls::started, this));
+ viewer.Stopped.connect (boost::bind(&Controls::stopped, this));
Bind (wxEVT_TIMER, boost::bind(&Controls::update_position, this));
_timer.Start (80, wxTIMER_CONTINUOUS);
Bind (wxEVT_TIMER, boost::bind(&Controls::update_position, this));
_timer.Start (80, wxTIMER_CONTINUOUS);
return;
}
if (!page && !_slider_being_moved) {
/* This is the first event of a drag; stop playback for the duration of the drag */
return;
}
if (!page && !_slider_being_moved) {
/* This is the first event of a drag; stop playback for the duration of the drag */
double const fps = _film->video_frame_rate ();
/* Count frame number from 1 ... not sure if this is the best idea */
double const fps = _film->video_frame_rate ();
/* Count frame number from 1 ... not sure if this is the best idea */
- checked_set (_frame_number, wxString::Format (wxT("%ld"), lrint (viewer->position().seconds() * fps) + 1));
- checked_set (_timecode, time_to_timecode (viewer->position(), fps));
+ checked_set(_frame_number, wxString::Format (wxT("%ld"), lrint(_viewer.position().seconds() * fps) + 1));
+ checked_set(_timecode, time_to_timecode(_viewer.position(), fps));
if (_film) {
_film_change_connection = _film->Change.connect (boost::bind(&Controls::film_change, this, _1, _2));
}
if (_film) {
_film_change_connection = _film->Change.connect (boost::bind(&Controls::film_change, this, _1, _2));
}