1 #include "lib/dcpomatic_time.h"
5 #include <boost/shared_ptr.hpp>
6 #include <boost/signals2.hpp>
10 class ClosedCaptionsDialog;
15 class ControlFilmViewer : public wxPanel
18 ControlFilmViewer (wxWindow* parent, bool outline_content = true, bool jump_to_selected = true);
20 void set_film (boost::shared_ptr<Film> film);
21 boost::shared_ptr<Film> film () const;
23 void forward_frame ();
25 /* FilmViewer proxies */
26 void set_position (DCPTime p);
27 void set_position (boost::shared_ptr<Content> content, ContentTime p);
28 void set_dcp_decode_reduction (boost::optional<int> reduction);
29 void show_closed_captions ();
32 bool playing () const;
35 boost::optional<int> dcp_decode_reduction () const;
36 DCPTime position () const;
37 void set_coalesce_player_changes (bool c);
38 boost::signals2::signal<void (boost::weak_ptr<PlayerVideo>)> ImageChanged;
41 void update_position_label ();
42 void update_position_slider ();
43 void rewind_clicked (wxMouseEvent &);
44 void back_clicked (wxKeyboardState& s);
45 void forward_clicked (wxKeyboardState &);
46 void slider_moved (bool page);
47 void slider_released ();
49 void frame_number_clicked ();
50 void jump_to_selected_clicked ();
51 void setup_sensitivity ();
52 void timecode_clicked ();
53 void check_play_state ();
54 void active_jobs_changed (boost::optional<std::string>);
55 DCPTime nudge_amount (wxKeyboardState& ev);
56 void image_changed (boost::weak_ptr<PlayerVideo>);
57 void film_change (ChangeType type, Film::Property p);
58 void outline_content_changed ();
60 void position_changed ();
64 boost::shared_ptr<Film> _film;
65 boost::shared_ptr<FilmViewer> _viewer;
68 bool _slider_being_moved;
69 bool _was_running_before_slider;
71 wxCheckBox* _outline_content;
73 wxCheckBox* _jump_to_selected;
75 wxButton* _rewind_button;
76 wxButton* _back_button;
77 wxButton* _forward_button;
78 wxStaticText* _frame_number;
79 wxStaticText* _timecode;
80 wxToggleButton* _play_button;
82 ClosedCaptionsDialog* _closed_captions_dialog;