summaryrefslogtreecommitdiff
path: root/src/wx/controls.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-01-10 12:53:28 +0100
committerCarl Hetherington <cth@carlh.net>2022-04-29 01:10:11 +0200
commitd394f2a171235fcbd5bdaf07c3b9b91529368538 (patch)
tree3c222790aba4c0f8905e1de03a2f01f0efe60f72 /src/wx/controls.cc
parent7861a2f4fe15952d43323a64284afd71427d09f4 (diff)
Basic display of markers above the playback timeline (#1921).
Diffstat (limited to 'src/wx/controls.cc')
-rw-r--r--src/wx/controls.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/wx/controls.cc b/src/wx/controls.cc
index ba0691268..a6f70c039 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"
@@ -65,6 +66,7 @@ using namespace dcpomatic;
Controls::Controls (wxWindow* parent, shared_ptr<FilmViewer> 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)
@@ -110,7 +112,12 @@ Controls::Controls (wxWindow* parent, shared_ptr<FilmViewer> 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);
@@ -469,6 +476,8 @@ Controls::set_film (shared_ptr<Film> film)
_film = film;
+ _markers->set_film (_film);
+
if (_film) {
_film_change_connection = _film->Change.connect (boost::bind(&Controls::film_change, this, _1, _2));
}