projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
std::shared_ptr
[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 be5b3664d4fb3c25e836d34c3b8f4b691c7ca32b..1f0e450ff3203bc632ec2601d898af05a57963c6 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.
@@
-20,22
+20,37
@@
#include "lib/dcpomatic_time.h"
#include "lib/player.h"
#include "lib/dcpomatic_time.h"
#include "lib/player.h"
+#include "lib/text_ring_buffers.h"
+#include "lib/warnings.h"
+DCPOMATIC_DISABLE_WARNINGS
#include <wx/wx.h>
#include <wx/wx.h>
+DCPOMATIC_ENABLE_WARNINGS
-class Player;
+class Butler;
+class FilmViewer;
class ClosedCaptionsDialog : public wxDialog
{
public:
class ClosedCaptionsDialog : public wxDialog
{
public:
-
ClosedCaptionsDialog (wxWindow* parent
);
+
explicit ClosedCaptionsDialog (wxWindow* parent, FilmViewer* viewer
);
- void update (DCPTime);
void clear ();
void clear ();
- void set_player (boost::weak_ptr<Player>);
+ void update_tracks (std::shared_ptr<const Film> film);
+ void set_butler (std::weak_ptr<Butler>);
private:
private:
+ void shown (wxShowEvent);
+ void update ();
void paint ();
void paint ();
+ void track_selected ();
+ FilmViewer* _viewer;
+ wxPanel* _display;
+ wxChoice* _track;
+ boost::optional<TextRingBuffers::Data> _current;
+ bool _current_in_lines;
std::vector<wxString> _lines;
std::vector<wxString> _lines;
- boost::weak_ptr<Player> _player;
+ std::vector<DCPTextTrack> _tracks;
+ std::weak_ptr<Butler> _butler;
+ wxTimer _timer;
};
};