projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Pull methods out of CinemaKDMs.
[dcpomatic.git]
/
src
/
wx
/
closed_captions_dialog.h
diff --git
a/src/wx/closed_captions_dialog.h
b/src/wx/closed_captions_dialog.h
index ca19cc95ad97b0205c3955502a24dded4f5cdf1f..5c366ca7b0dbe2cc9d9f61e8eba4002b5e71c6ff 100644
(file)
--- a/
src/wx/closed_captions_dialog.h
+++ b/
src/wx/closed_captions_dialog.h
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2018 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2018
-2019
Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
This file is part of DCP-o-matic.
@@
-19,24
+19,34
@@
*/
#include "lib/dcpomatic_time.h"
*/
#include "lib/dcpomatic_time.h"
-#include "lib/player_caption.h"
+#include "lib/player.h"
+#include "lib/text_ring_buffers.h"
#include <wx/wx.h>
#include <wx/wx.h>
-class ClosedCaptionsView : public wxDialog
+class Butler;
+class FilmViewer;
+
+class ClosedCaptionsDialog : public wxDialog
{
public:
{
public:
-
ClosedCaptionsView (wxWindow* parent
);
+
explicit ClosedCaptionsDialog (wxWindow* parent, FilmViewer* viewer
);
- void refresh (DCPTime);
- void caption (PlayerCaption, DCPTimePeriod);
void clear ();
void clear ();
+ void set_film_and_butler (boost::shared_ptr<Film>, boost::weak_ptr<Butler>);
private:
private:
+ void shown (wxShowEvent);
+ void update ();
void paint ();
void paint ();
+ void track_selected ();
- typedef std::pair<PlayerCaption, DCPTimePeriod> Caption;
- std::list<Caption> _captions;
+ FilmViewer* _viewer;
+ wxPanel* _display;
+ wxChoice* _track;
+ boost::optional<TextRingBuffers::Data> _current;
+ bool _current_in_lines;
std::vector<wxString> _lines;
std::vector<wxString> _lines;
- static int const _num_lines;
- static int const _num_chars_per_line;
+ std::vector<DCPTextTrack> _tracks;
+ boost::weak_ptr<Butler> _butler;
+ wxTimer _timer;
};
};