X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fwx%2Fclosed_captions_dialog.h;h=5c366ca7b0dbe2cc9d9f61e8eba4002b5e71c6ff;hb=b3b371294ed5e6cc18ef64ba1b06ca76726b903a;hp=a599bc7036f8d048bb421a64fe30a9e974a506d8;hpb=ded71cffd18962ebb6b9611a5eb6dfafe9e8e4ec;p=dcpomatic.git diff --git a/src/wx/closed_captions_dialog.h b/src/wx/closed_captions_dialog.h index a599bc703..5c366ca7b 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. @@ -20,24 +20,33 @@ #include "lib/dcpomatic_time.h" #include "lib/player.h" +#include "lib/text_ring_buffers.h" #include -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); + void set_film_and_butler (boost::shared_ptr, boost::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; - static int const _num_lines; - static int const _num_chars_per_line; + std::vector _tracks; + boost::weak_ptr _butler; + wxTimer _timer; };