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