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;
38 class ContentPanel : public boost::noncopyable
41 ContentPanel (wxNotebook *, boost::shared_ptr<Film>, FilmViewer* viewer);
43 boost::shared_ptr<Film> film () const {
47 void set_film (boost::shared_ptr<Film>);
48 void set_general_sensitivity (bool s);
49 void set_selection (boost::weak_ptr<Content>);
51 void film_changed (Film::Property p);
52 void film_content_changed (int p);
54 wxPanel* panel () const {
58 wxNotebook* notebook () const {
62 ContentList selected ();
63 ContentList selected_video ();
64 ContentList selected_audio ();
65 ContentList selected_subtitle ();
66 FFmpegContentList selected_ffmpeg ();
68 void add_file_clicked ();
69 bool remove_clicked (bool hotkey);
72 void selection_changed ();
73 void add_folder_clicked ();
74 void earlier_clicked ();
75 void later_clicked ();
76 void right_click (wxListEvent &);
77 void files_dropped (wxDropFilesEvent &);
78 void timeline_clicked ();
81 void setup_sensitivity ();
83 void add_files (std::list<boost::filesystem::path>);
87 wxNotebook* _notebook;
90 wxButton* _add_folder;
95 ContentSubPanel* _video_panel;
96 ContentSubPanel* _audio_panel;
97 ContentSubPanel* _subtitle_panel;
98 ContentSubPanel* _timing_panel;
99 std::list<ContentSubPanel *> _panels;
101 TimelineDialog* _timeline_dialog;
103 ContentList _last_selected;
105 boost::shared_ptr<Film> _film;
106 FilmViewer* _film_viewer;
107 bool _generally_sensitive;