X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fclosed_captions_dialog.h;h=d31218526d745879ef553bd0004716177e0616c5;hb=82c6dfe9f286e07bdaf3434593ce1c9bd0ee2677;hp=e3f13f62f5f5d469b4f1a3ca3a50433322ddafe3;hpb=0eb631849f50a456b1f0f18a6fc56b0d52a5162b;p=dcpomatic.git diff --git a/src/wx/closed_captions_dialog.h b/src/wx/closed_captions_dialog.h index e3f13f62f..d31218526 100644 --- a/src/wx/closed_captions_dialog.h +++ b/src/wx/closed_captions_dialog.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2018 Carl Hetherington + Copyright (C) 2018-2019 Carl Hetherington This file is part of DCP-o-matic. @@ -18,24 +18,40 @@ */ + #include "lib/dcpomatic_time.h" -#include "lib/player.h" +#include "lib/text_ring_buffers.h" +#include +LIBDCP_DISABLE_WARNINGS #include +LIBDCP_ENABLE_WARNINGS + +class Butler; +class FilmViewer; -class Player; class ClosedCaptionsDialog : public wxDialog { public: - explicit ClosedCaptionsDialog (wxWindow* parent); + explicit ClosedCaptionsDialog (wxWindow* parent, FilmViewer* viewer); - void update (DCPTime); void clear (); - void set_player (boost::weak_ptr); + void update_tracks (std::shared_ptr film); + void set_butler (std::weak_ptr); private: + void shown (wxShowEvent); + void update (); void paint (); + void track_selected (); + FilmViewer* _viewer; + wxPanel* _display; + wxChoice* _track; + boost::optional _current; + bool _current_in_lines; std::vector _lines; - boost::weak_ptr _player; + std::vector _tracks; + std::weak_ptr _butler; + wxTimer _timer; };