Remove some friends from FilmViewer.
[dcpomatic.git] / src / wx / closed_captions_dialog.h
index be5b3664d4fb3c25e836d34c3b8f4b691c7ca32b..5c366ca7b0dbe2cc9d9f61e8eba4002b5e71c6ff 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 <wx/wx.h>
 
-class Player;
+class Butler;
+class FilmViewer;
 
 class ClosedCaptionsDialog : public wxDialog
 {
 public:
-       ClosedCaptionsDialog (wxWindow* parent);
+       explicit ClosedCaptionsDialog (wxWindow* parent, FilmViewer* viewer);
 
-       void update (DCPTime);
        void clear ();
-       void set_player (boost::weak_ptr<Player>);
+       void set_film_and_butler (boost::shared_ptr<Film>, boost::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<Player> _player;
+       std::vector<DCPTextTrack> _tracks;
+       boost::weak_ptr<Butler> _butler;
+       wxTimer _timer;
 };