e19fcabdf81cd45db2fe0fd0ac8551a08b7c33d5
[dcpomatic.git] / src / wx / film_editor.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 /** @file src/wx/film_editor.h
21  *  @brief FilmEditor class.
22  */
23
24 #include "lib/film.h"
25 #include <wx/wx.h>
26 #include <boost/signals2.hpp>
27
28 class wxNotebook;
29 class Film;
30 class ContentPanel;
31 class DCPPanel;
32 class FilmViewer;
33
34 /** @class FilmEditor
35  *  @brief A wx widget to edit a film's metadata, and perform various functions.
36  */
37 class FilmEditor : public wxPanel
38 {
39 public:
40         FilmEditor (wxWindow *, FilmViewer* viewer);
41
42         void set_film (boost::shared_ptr<Film>);
43
44         boost::signals2::signal<void (boost::filesystem::path)> FileChanged;
45
46         /* Stuff for panels */
47
48         ContentPanel* content_panel () const {
49                 return _content_panel;
50         }
51
52         boost::shared_ptr<Film> film () const {
53                 return _film;
54         }
55
56         /* Handle changes to the model */
57         void film_changed (Film::Property);
58         void film_content_changed (int);
59
60         void set_general_sensitivity (bool);
61         void active_jobs_changed (boost::optional<std::string>);
62
63         wxNotebook* _main_notebook;
64         ContentPanel* _content_panel;
65         DCPPanel* _dcp_panel;
66
67         /** The film we are editing */
68         boost::shared_ptr<Film> _film;
69 };