No-op: remove all trailing whitespace.
[dcpomatic.git] / src / wx / content_panel.h
1 /*
2     Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
3
4     This program is free software; you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by
6     the Free Software Foundation; either version 2 of the License, or
7     (at your option) any later version.
8
9     This program is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12     GNU General Public License for more details.
13
14     You should have received a copy of the GNU General Public License
15     along with this program; if not, write to the Free Software
16     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18 */
19
20 #include <list>
21 #include <boost/shared_ptr.hpp>
22 #include "lib/types.h"
23 #include "lib/film.h"
24 #include "content_menu.h"
25
26 class wxNotebook;
27 class wxPanel;
28 class wxSizer;
29 class wxListCtrl;
30 class wxListEvent;
31 class TimelineDialog;
32 class FilmEditor;
33 class ContentSubPanel;
34 class Film;
35 class FilmViewer;
36
37 class ContentPanel : public boost::noncopyable
38 {
39 public:
40         ContentPanel (wxNotebook *, boost::shared_ptr<Film>, FilmViewer* viewer);
41
42         boost::shared_ptr<Film> film () const {
43                 return _film;
44         }
45
46         void set_film (boost::shared_ptr<Film>);
47         void set_general_sensitivity (bool s);
48         void set_selection (boost::weak_ptr<Content>);
49
50         void film_changed (Film::Property p);
51         void film_content_changed (int p);
52
53         wxPanel* panel () const {
54                 return _panel;
55         }
56
57         wxNotebook* notebook () const {
58                 return _notebook;
59         }
60
61         ContentList selected ();
62         VideoContentList selected_video ();
63         AudioContentList selected_audio ();
64         SubtitleContentList selected_subtitle ();
65         FFmpegContentList selected_ffmpeg ();
66
67         void add_file_clicked ();
68
69 private:
70         void selection_changed ();
71         void add_folder_clicked ();
72         void remove_clicked ();
73         void earlier_clicked ();
74         void later_clicked ();
75         void right_click (wxListEvent &);
76         void files_dropped (wxDropFilesEvent &);
77         void timeline_clicked ();
78
79         void setup ();
80         void setup_sensitivity ();
81
82         void add_files (std::list<boost::filesystem::path>);
83
84         wxPanel* _panel;
85         wxSizer* _sizer;
86         wxNotebook* _notebook;
87         wxListCtrl* _content;
88         wxButton* _add_file;
89         wxButton* _add_folder;
90         wxButton* _remove;
91         wxButton* _earlier;
92         wxButton* _later;
93         wxButton* _timeline;
94         ContentSubPanel* _video_panel;
95         ContentSubPanel* _audio_panel;
96         ContentSubPanel* _subtitle_panel;
97         ContentSubPanel* _timing_panel;
98         std::list<ContentSubPanel *> _panels;
99         ContentMenu* _menu;
100         TimelineDialog* _timeline_dialog;
101
102         boost::shared_ptr<Film> _film;
103         bool _generally_sensitive;
104 };