2 Copyright (C) 2012-2019 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/>.
21 #include "content_menu.h"
22 #include "lib/types.h"
24 #include <wx/splitter.h>
25 #include <boost/shared_ptr.hpp>
33 class wxSplitterWindow;
36 class ContentSubPanel;
44 class ContentPanel : public boost::noncopyable
47 ContentPanel (wxNotebook *, boost::shared_ptr<Film>, boost::weak_ptr<FilmViewer> viewer);
49 boost::shared_ptr<Film> film () const {
53 void set_film (boost::shared_ptr<Film>);
54 void set_general_sensitivity (bool s);
55 void set_selection (boost::weak_ptr<Content>);
56 void set_selection (ContentList cl);
58 void film_changed (Film::Property p);
59 void film_content_changed (int p);
61 wxWindow* window () const {
65 wxNotebook* notebook () const {
69 ContentList selected ();
70 ContentList selected_video ();
71 ContentList selected_audio ();
72 ContentList selected_text ();
73 FFmpegContentList selected_ffmpeg ();
75 void add_file_clicked ();
76 bool remove_clicked (bool hotkey);
77 void timeline_clicked ();
79 boost::weak_ptr<FilmViewer> film_viewer () const {
83 boost::signals2::signal<void (void)> SelectionChanged;
86 void item_selected ();
87 void item_deselected ();
88 void item_deselected_idle ();
89 void check_selection ();
90 void add_folder_clicked ();
91 void add_dcp_clicked ();
92 void earlier_clicked ();
93 void later_clicked ();
94 void right_click (wxListEvent &);
95 void files_dropped (wxDropFilesEvent &);
98 void setup_sensitivity ();
100 void add_files (std::list<boost::filesystem::path>);
101 std::list<ContentSubPanel *> panels () const;
103 wxSplitterWindow* _splitter;
104 wxNotebook* _notebook;
105 wxListCtrl* _content;
107 wxButton* _add_folder;
113 VideoPanel* _video_panel;
114 AudioPanel* _audio_panel;
115 TextPanel* _text_panel[TEXT_COUNT];
116 TimingPanel* _timing_panel;
118 TimelineDialog* _timeline_dialog;
120 wxWindow* _last_selected_tab;
122 boost::shared_ptr<Film> _film;
123 boost::weak_ptr<FilmViewer> _film_viewer;
124 bool _generally_sensitive;
125 bool _ignore_deselect;
126 bool _no_check_selection;