X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Fwx%2Fcontrols.cc;h=6d4d2db3e727d3269165365fc62ec21be1a3f268;hp=a90ac79b40e5b89ab706a55a9e0a1a3ecb4b368d;hb=5b6f00b6e2a9c3fa999b4d1915ae70a8051ddaf5;hpb=adcc9b681043f3bbb8a60760032cb45e0052c5fc diff --git a/src/wx/controls.cc b/src/wx/controls.cc index a90ac79b4..6d4d2db3e 100644 --- a/src/wx/controls.cc +++ b/src/wx/controls.cc @@ -24,6 +24,7 @@ #include "controls.h" #include "dcpomatic_button.h" #include "film_viewer.h" +#include "markers_panel.h" #include "playhead_to_frame_dialog.h" #include "playhead_to_timecode_dialog.h" #include "static_text.h" @@ -45,15 +46,15 @@ #include -using std::string; -using std::list; using std::cout; -using std::make_pair; +using std::dynamic_pointer_cast; using std::exception; -using boost::optional; +using std::list; +using std::make_pair; using std::shared_ptr; +using std::string; using std::weak_ptr; -using std::dynamic_pointer_cast; +using boost::optional; #if BOOST_VERSION >= 106100 using namespace boost::placeholders; #endif @@ -62,6 +63,7 @@ using namespace dcpomatic; Controls::Controls (wxWindow* parent, shared_ptr viewer, bool editor_controls) : wxPanel (parent) + , _markers (new MarkersPanel(this, viewer)) , _slider (new wxSlider(this, wxID_ANY, 0, 0, 4096)) , _viewer (viewer) , _slider_being_moved (false) @@ -107,7 +109,12 @@ Controls::Controls (wxWindow* parent, shared_ptr viewer, bool editor _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); @@ -466,6 +473,8 @@ Controls::set_film (shared_ptr film) _film = film; + _markers->set_film (_film); + if (_film) { _film_change_connection = _film->Change.connect (boost::bind(&Controls::film_change, this, _1, _2)); }