2 Copyright (C) 2012-2016 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/>.
22 #include <boost/shared_ptr.hpp>
23 #include "lib/types.h"
25 #include "content_menu.h"
34 class ContentSubPanel;
39 class ContentPanel : public boost::noncopyable
42 ContentPanel (wxNotebook *, boost::shared_ptr<Film>, FilmViewer* viewer);
44 boost::shared_ptr<Film> film () const {
48 void set_film (boost::shared_ptr<Film>);
49 void set_general_sensitivity (bool s);
50 void set_selection (boost::weak_ptr<Content>);
51 void set_selection (ContentList cl);
53 void film_changed (Film::Property p);
54 void film_content_changed (int p);
56 wxPanel* panel () const {
60 wxNotebook* notebook () const {
64 ContentList selected ();
65 ContentList selected_video ();
66 ContentList selected_audio ();
67 ContentList selected_subtitle ();
68 FFmpegContentList selected_ffmpeg ();
70 void add_file_clicked ();
71 bool remove_clicked (bool hotkey);
74 void selection_changed ();
75 void add_folder_clicked ();
76 void add_dcp_clicked ();
77 void earlier_clicked ();
78 void later_clicked ();
79 void right_click (wxListEvent &);
80 void files_dropped (wxDropFilesEvent &);
81 void timeline_clicked ();
84 void setup_sensitivity ();
86 void add_files (std::list<boost::filesystem::path>);
90 wxNotebook* _notebook;
93 wxButton* _add_folder;
99 ContentSubPanel* _video_panel;
100 AudioPanel* _audio_panel;
101 ContentSubPanel* _subtitle_panel;
102 ContentSubPanel* _timing_panel;
103 std::list<ContentSubPanel *> _panels;
105 TimelineDialog* _timeline_dialog;
107 ContentList _last_selected;
109 boost::shared_ptr<Film> _film;
110 FilmViewer* _film_viewer;
111 bool _generally_sensitive;