2 Copyright (C) 2018-2020 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/>.
29 class PlaylistControls : public Controls
32 PlaylistControls(wxWindow* parent, FilmViewer& viewer);
34 /** This is so that we can tell our parent player to reset the film
35 when we have created one from a SPL. We could call a method
36 in the player's DOMFrame but we don't have that in a header.
38 boost::signals2::signal<void (std::weak_ptr<Film>)> ResetFilm;
40 void play () override;
41 void stop () override;
45 void pause_clicked ();
48 void previous_clicked ();
49 void add_playlist_to_list (SPL spl);
50 void update_content_directory ();
51 void update_playlist_directory ();
52 void spl_selection_changed ();
53 void select_playlist (int selected, int position);
54 void started () override;
55 void stopped () override;
56 void setup_sensitivity () override;
57 void config_changed (int) override;
58 void viewer_finished ();
60 void update_current_content ();
61 bool can_do_previous ();
63 void deselect_playlist ();
65 boost::optional<dcp::EncryptedKDM> get_kdm_from_directory (std::shared_ptr<DCPContent> dcp);
67 wxButton* _play_button;
68 wxButton* _pause_button;
69 wxButton* _stop_button;
70 wxButton* _next_button;
71 wxButton* _previous_button;
73 ContentView* _content_view;
74 wxButton* _refresh_content_view;
75 wxListCtrl* _spl_view;
76 wxButton* _refresh_spl_view;
77 wxListCtrl* _current_spl_view;
79 std::vector<SPL> _playlists;
80 boost::optional<int> _selected_playlist;
81 int _selected_playlist_position;