diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-07-23 00:09:35 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-07-23 00:13:56 +0100 |
| commit | bd763364d9c96928f3bd6bd5fe46ebe1a06e6d0a (patch) | |
| tree | 0ece2cfda3b6a1f4f68187eb89daac4d4a6e20b8 /src/wx/closed_captions_dialog.h | |
| parent | 5274b881cc5569188eb5c80dc3151f5a8aaa1d23 (diff) | |
Very basic closed caption viewer.
Diffstat (limited to 'src/wx/closed_captions_dialog.h')
| -rw-r--r-- | src/wx/closed_captions_dialog.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/wx/closed_captions_dialog.h b/src/wx/closed_captions_dialog.h new file mode 100644 index 000000000..ca19cc95a --- /dev/null +++ b/src/wx/closed_captions_dialog.h @@ -0,0 +1,42 @@ +/* + Copyright (C) 2018 Carl Hetherington <cth@carlh.net> + + This file is part of DCP-o-matic. + + DCP-o-matic is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + DCP-o-matic is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>. + +*/ + +#include "lib/dcpomatic_time.h" +#include "lib/player_caption.h" +#include <wx/wx.h> + +class ClosedCaptionsView : public wxDialog +{ +public: + ClosedCaptionsView (wxWindow* parent); + + void refresh (DCPTime); + void caption (PlayerCaption, DCPTimePeriod); + void clear (); + +private: + void paint (); + + typedef std::pair<PlayerCaption, DCPTimePeriod> Caption; + std::list<Caption> _captions; + std::vector<wxString> _lines; + static int const _num_lines; + static int const _num_chars_per_line; +}; |
