swaroop: skippable -> disable next/previous.
[dcpomatic.git] / src / wx / swaroop_controls.h
1 /*
2     Copyright (C) 2018 Carl Hetherington <cth@carlh.net>
3
4     This file is part of DCP-o-matic.
5
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.
10
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.
15
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/>.
18
19 */
20
21 #include "controls.h"
22
23 class SwaroopControls : public Controls
24 {
25 public:
26         SwaroopControls (wxWindow* parent, boost::shared_ptr<FilmViewer> viewer);
27
28         void log (wxString s);
29         void set_film (boost::shared_ptr<Film> film);
30
31         /** This is so that we can tell our parent player to reset the film
32             when we have created one from a SPL.  We could call a method
33             in the player's DOMFrame but we don't have that in a header.
34         */
35         boost::signals2::signal<void (boost::weak_ptr<Film>)> ResetFilm;
36
37 private:
38         void play_clicked ();
39         void pause_clicked ();
40         void stop_clicked ();
41         void next_clicked ();
42         void previous_clicked ();
43         void add_playlist_to_list (SPL spl);
44         void update_content_directory ();
45         void update_playlist_directory ();
46         void spl_selection_changed ();
47         void started ();
48         void stopped ();
49         void setup_sensitivity ();
50         void config_changed (int);
51         void viewer_finished ();
52         void reset_film ();
53         void update_current_content ();
54         bool can_do_previous ();
55         bool can_do_next ();
56
57         wxButton* _play_button;
58         wxButton* _pause_button;
59         wxButton* _stop_button;
60         wxButton* _next_button;
61         wxButton* _previous_button;
62
63         ContentView* _content_view;
64         wxButton* _refresh_content_view;
65         wxListCtrl* _spl_view;
66         wxButton* _refresh_spl_view;
67         wxListCtrl* _current_spl_view;
68         wxTextCtrl* _log;
69
70         bool _current_disable_timeline;
71         bool _current_disable_next_previous;
72
73         std::vector<SPL> _playlists;
74         boost::optional<int> _selected_playlist;
75         int _selected_playlist_position;
76 };