*/
#include "lib/dcpomatic_time.h"
-#include "lib/player_caption.h"
+#include "lib/player.h"
+#include "lib/text_ring_buffers.h"
#include <wx/wx.h>
-class ClosedCaptionsView : public wxDialog
+class Butler;
+
+class ClosedCaptionsDialog : public wxDialog
{
public:
- ClosedCaptionsView (wxWindow* parent);
+ explicit ClosedCaptionsDialog (wxWindow* parent);
- void refresh (DCPTime);
- void caption (PlayerCaption, DCPTimePeriod);
+ void update (DCPTime);
void clear ();
+ void set_butler (boost::weak_ptr<Butler>);
private:
void paint ();
- typedef std::pair<PlayerCaption, DCPTimePeriod> Caption;
- std::list<Caption> _captions;
+ boost::optional<TextRingBuffers::Data> _current;
+ bool _current_in_lines;
std::vector<wxString> _lines;
- static int const _num_lines;
- static int const _num_chars_per_line;
+ boost::weak_ptr<Butler> _butler;
};