Partial split of film viewer.
[dcpomatic.git] / src / wx / control_film_viewer.h
1 #include "lib/dcpomatic_time.h"
2 #include <wx/wx.h>
3 #include <boost/shared_ptr.hpp>
4
5 class FilmViewer;
6 class Film;
7 class ClosedCaptionsDialog;
8 class Content;
9 class wxToggleButton;
10
11 class ControlFilmViewer : public wxPanel
12 {
13 public:
14         ControlFilmViewer (wxWindow* parent, bool outline_content = true, bool jump_to_selected = true);
15
16         void set_film (boost::shared_ptr<Film> film);
17
18         /* FilmViewer proxies */
19         void set_position (DCPTime p);
20         void set_position (boost::shared_ptr<Content> content, ContentTime p);
21         void set_dcp_decode_reduction (boost::optional<int> reduction);
22         void show_closed_captions ();
23         void start ();
24         bool stop ();
25         bool playing () const;
26         void back_frame ();
27         void forward_frame ();
28
29 private:
30         void update_position_label ();
31         void update_position_slider ();
32         void rewind_clicked (wxMouseEvent &);
33         void back_clicked (wxKeyboardState& s);
34         void forward_clicked (wxKeyboardState &);
35         void slider_moved (bool page);
36         void slider_released ();
37         void play_clicked ();
38         void frame_number_clicked ();
39         void jump_to_selected_clicked ();
40         void setup_sensitivity ();
41         void timecode_clicked ();
42         void check_play_state ();
43         void active_jobs_changed (boost::optional<std::string>);
44
45         boost::shared_ptr<Film> _film;
46         boost::shared_ptr<FilmViewer> _viewer;
47
48         wxSizer* _v_sizer;
49         bool _slider_being_moved;
50         bool _was_running_before_slider;
51
52         wxCheckBox* _outline_content;
53         wxChoice* _eye;
54         wxCheckBox* _jump_to_selected;
55         wxSlider* _slider;
56         wxButton* _rewind_button;
57         wxButton* _back_button;
58         wxButton* _forward_button;
59         wxStaticText* _frame_number;
60         wxStaticText* _timecode;
61         wxToggleButton* _play_button;
62
63         ClosedCaptionsDialog* _closed_captions_dialog;
64 };