X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fclosed_captions_dialog.h;h=dbe4b6aa51a048ba5152d2399fa7546cc0686a90;hb=HEAD;hp=be5b3664d4fb3c25e836d34c3b8f4b691c7ca32b;hpb=4843bf7b6820fe9f027699cf30c41804e714fbac;p=dcpomatic.git diff --git a/src/wx/closed_captions_dialog.h b/src/wx/closed_captions_dialog.h index be5b3664d..dbe4b6aa5 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: - ClosedCaptionsDialog (wxWindow* parent); + 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; };