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"
26 #include <boost/shared_ptr.hpp>
27 #include <boost/signals2.hpp>
31 class ClosedCaptionsDialog;
43 class Controls : public wxPanel
48 boost::shared_ptr<FilmViewer>,
49 bool editor_controls = true
52 boost::shared_ptr<Film> film () const;
54 void forward_frame ();
56 void show_extended_player_controls (bool s);
57 void log (wxString s);
60 void update_position_label ();
61 void update_position_slider ();
62 void rewind_clicked (wxMouseEvent &);
63 void back_clicked (wxKeyboardState& s);
64 void forward_clicked (wxKeyboardState &);
65 void slider_moved (bool page);
66 void slider_released ();
68 void frame_number_clicked ();
69 void jump_to_selected_clicked ();
70 void setup_sensitivity ();
71 void timecode_clicked ();
72 #ifndef DCPOMATIC_PLAYER_SWAROOP
73 void check_play_state ();
75 void active_jobs_changed (boost::optional<std::string>);
76 DCPTime nudge_amount (wxKeyboardState& ev);
77 void image_changed (boost::weak_ptr<PlayerVideo>);
78 void outline_content_changed ();
80 void position_changed ();
84 void update_content_directory ();
85 void update_playlist_directory ();
86 void config_changed (int property);
87 void spl_selection_changed ();
89 typedef std::pair<boost::shared_ptr<dcp::CPL>, boost::filesystem::path> CPL;
91 #ifdef DCPOMATIC_VARIANT_SWAROOP
92 void pause_clicked ();
95 void add_playlist_to_list (SPL spl);
97 boost::shared_ptr<Film> _film;
98 boost::shared_ptr<FilmViewer> _viewer;
101 bool _slider_being_moved;
102 bool _was_running_before_slider;
104 wxCheckBox* _outline_content;
106 wxCheckBox* _jump_to_selected;
107 ContentView* _content_view;
108 wxListCtrl* _spl_view;
109 wxListCtrl* _current_spl_view;
111 std::vector<SPL> _playlists;
113 wxButton* _rewind_button;
114 wxButton* _back_button;
115 wxButton* _forward_button;
116 wxStaticText* _frame_number;
117 wxStaticText* _timecode;
118 #ifdef DCPOMATIC_VARIANT_SWAROOP
119 wxButton* _play_button;
120 wxButton* _pause_button;
121 wxButton* _stop_button;
123 wxToggleButton* _play_button;
125 boost::optional<std::string> _active_job;
127 ClosedCaptionsDialog* _closed_captions_dialog;
129 #ifdef DCPOMATIC_VARIANT_SWAROOP
130 boost::optional<dcp::ContentKind> _current_kind;
133 boost::signals2::scoped_connection _config_changed_connection;