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>);
52 void film_changed (Film::Property p);
53 void film_content_changed (int p);
55 wxPanel* panel () const {
59 wxNotebook* notebook () const {
63 ContentList selected ();
64 ContentList selected_video ();
65 ContentList selected_audio ();
66 ContentList selected_subtitle ();
67 FFmpegContentList selected_ffmpeg ();
69 void add_file_clicked ();
70 bool remove_clicked (bool hotkey);
73 void selection_changed ();
74 void add_folder_clicked ();
75 void earlier_clicked ();
76 void later_clicked ();
77 void right_click (wxListEvent &);
78 void files_dropped (wxDropFilesEvent &);
79 void timeline_clicked ();
82 void setup_sensitivity ();
84 void add_files (std::list<boost::filesystem::path>);
88 wxNotebook* _notebook;
91 wxButton* _add_folder;
96 ContentSubPanel* _video_panel;
97 AudioPanel* _audio_panel;
98 ContentSubPanel* _subtitle_panel;
99 ContentSubPanel* _timing_panel;
100 std::list<ContentSubPanel *> _panels;
102 TimelineDialog* _timeline_dialog;
104 ContentList _last_selected;
106 boost::shared_ptr<Film> _film;
107 FilmViewer* _film_viewer;
108 bool _generally_sensitive;