2 Copyright (C) 2018 Carl Hetherington <cth@carlh.net>
4 This file is part of DCP-o-matic.
6 DCP-o-matic is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 DCP-o-matic is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
21 #include "lib/dcpomatic_time.h"
22 #include "lib/types.h"
25 #include <boost/shared_ptr.hpp>
26 #include <boost/signals2.hpp>
30 class ClosedCaptionsDialog;
36 class Controls : public wxPanel
41 boost::shared_ptr<FilmViewer>,
42 bool outline_content = true,
43 bool jump_to_selected = true,
45 bool dcp_directory = false
48 boost::shared_ptr<Film> film () const;
50 void forward_frame ();
52 void show_dcp_directory (bool s);
54 boost::signals2::signal<void (boost::filesystem::path)> DCPDirectorySelected;
57 void update_position_label ();
58 void update_position_slider ();
59 void rewind_clicked (wxMouseEvent &);
60 void back_clicked (wxKeyboardState& s);
61 void forward_clicked (wxKeyboardState &);
62 void slider_moved (bool page);
63 void slider_released ();
65 void frame_number_clicked ();
66 void jump_to_selected_clicked ();
67 void setup_sensitivity ();
68 void timecode_clicked ();
69 void check_play_state ();
70 void active_jobs_changed (boost::optional<std::string>);
71 DCPTime nudge_amount (wxKeyboardState& ev);
72 void image_changed (boost::weak_ptr<PlayerVideo>);
73 void film_change (ChangeType type, Film::Property p);
74 void outline_content_changed ();
76 void position_changed ();
80 void update_dcp_directory ();
81 void dcp_directory_changed ();
82 void dcp_directory_selected ();
83 void config_changed (int property);
85 boost::shared_ptr<Film> _film;
86 boost::shared_ptr<FilmViewer> _viewer;
89 bool _slider_being_moved;
90 bool _was_running_before_slider;
92 wxCheckBox* _outline_content;
94 wxCheckBox* _jump_to_selected;
95 wxListCtrl* _dcp_directory;
96 std::vector<boost::filesystem::path> _dcp_directories;
98 wxButton* _rewind_button;
99 wxButton* _back_button;
100 wxButton* _forward_button;
101 wxStaticText* _frame_number;
102 wxStaticText* _timecode;
103 wxToggleButton* _play_button;
105 ClosedCaptionsDialog* _closed_captions_dialog;
107 boost::signals2::scoped_connection _config_changed_connection;