Fix macOS build.
[dcpomatic.git] / src / wx / closed_captions_dialog.h
index 3818e38124d9a583a6f7e51dc4ed73abd8b5557c..700b8922a9506073df558c9a1722d7a527048e6c 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2018 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2018-2019 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
+
 #include "lib/dcpomatic_time.h"
 #include "lib/player.h"
 #include "lib/text_ring_buffers.h"
+#include <dcp/warnings.h>
+LIBDCP_DISABLE_WARNINGS
 #include <wx/wx.h>
+LIBDCP_ENABLE_WARNINGS
 
 class Butler;
+class FilmViewer;
+
 
 class ClosedCaptionsDialog : public wxDialog
 {
 public:
-       explicit ClosedCaptionsDialog (wxWindow* parent);
+       explicit ClosedCaptionsDialog (wxWindow* parent, FilmViewer* viewer);
 
-       void update (DCPTime);
        void clear ();
-       void set_butler (boost::weak_ptr<Butler>);
+       void update_tracks (std::shared_ptr<const Film> film);
+       void set_butler (std::weak_ptr<Butler>);
 
 private:
+       void shown (wxShowEvent);
+       void update ();
        void paint ();
+       void track_selected ();
 
+       FilmViewer* _viewer;
+       wxPanel* _display;
+       wxChoice* _track;
        boost::optional<TextRingBuffers::Data> _current;
        bool _current_in_lines;
        std::vector<wxString> _lines;
-       boost::weak_ptr<Butler> _butler;
+       std::vector<DCPTextTrack> _tracks;
+       std::weak_ptr<Butler> _butler;
+       wxTimer _timer;
 };