X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fclosed_captions_dialog.h;h=1f0e450ff3203bc632ec2601d898af05a57963c6;hb=70b72b53eab0f247eb4dc605a2d669d4adb4e469;hp=4b47d593fc2a5ace624c1bf04c428506af311613;hpb=ff3b9789a0e0540f7a8677ec5eb644e21b6f262c;p=dcpomatic.git diff --git a/src/wx/closed_captions_dialog.h b/src/wx/closed_captions_dialog.h index 4b47d593f..1f0e450ff 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,22 +20,37 @@ #include "lib/dcpomatic_time.h" #include "lib/player.h" +#include "lib/text_ring_buffers.h" +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS -class Player; +class Butler; +class FilmViewer; class ClosedCaptionsDialog : public wxDialog { public: - ClosedCaptionsDialog (explicit 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; };