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);
22 void forward_frame ();
24 /* FilmViewer proxies */
25 void set_position (DCPTime p);
26 void set_position (boost::shared_ptr<Content> content, ContentTime p);
27 void set_dcp_decode_reduction (boost::optional<int> reduction);
28 void show_closed_captions ();
31 bool playing () const;
34 boost::shared_ptr<Film> film () 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 ();
62 boost::shared_ptr<Film> _film;
63 boost::shared_ptr<FilmViewer> _viewer;
66 bool _slider_being_moved;
67 bool _was_running_before_slider;
69 wxCheckBox* _outline_content;
71 wxCheckBox* _jump_to_selected;
73 wxButton* _rewind_button;
74 wxButton* _back_button;
75 wxButton* _forward_button;
76 wxStaticText* _frame_number;
77 wxStaticText* _timecode;
78 wxToggleButton* _play_button;
80 ClosedCaptionsDialog* _closed_captions_dialog;