2 Copyright (C) 2012-2018 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;
42 class ContentPanel : public boost::noncopyable
45 ContentPanel (wxNotebook *, boost::shared_ptr<Film>, FilmViewer* viewer);
47 boost::shared_ptr<Film> film () const {
51 void set_film (boost::shared_ptr<Film>);
52 void set_general_sensitivity (bool s);
53 void set_selection (boost::weak_ptr<Content>);
54 void set_selection (ContentList cl);
56 void film_changed (Film::Property p);
57 void film_content_changed (int p);
59 wxPanel* panel () const {
63 wxNotebook* notebook () const {
67 ContentList selected ();
68 ContentList selected_video ();
69 ContentList selected_audio ();
70 ContentList selected_text ();
71 FFmpegContentList selected_ffmpeg ();
73 void add_file_clicked ();
74 bool remove_clicked (bool hotkey);
75 void timeline_clicked ();
77 FilmViewer* film_viewer () const {
81 boost::signals2::signal<void (void)> SelectionChanged;
84 void selection_changed ();
85 void add_folder_clicked ();
86 void add_dcp_clicked ();
87 void earlier_clicked ();
88 void later_clicked ();
89 void right_click (wxListEvent &);
90 void files_dropped (wxDropFilesEvent &);
93 void setup_sensitivity ();
95 void add_files (std::list<boost::filesystem::path>);
96 std::list<ContentSubPanel *> panels () const;
100 wxNotebook* _notebook;
101 wxListCtrl* _content;
103 wxButton* _add_folder;
109 VideoPanel* _video_panel;
110 AudioPanel* _audio_panel;
111 TextPanel* _text_panel[TEXT_COUNT];
112 TimingPanel* _timing_panel;
114 TimelineDialog* _timeline_dialog;
116 ContentList _last_selected;
117 wxWindow* _last_selected_tab;
119 boost::shared_ptr<Film> _film;
120 FilmViewer* _film_viewer;
121 bool _generally_sensitive;