Merge remote-tracking branch 'origin/master' into 2.0
[dcpomatic.git] / src / wx / dcp_panel.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 #include <boost/shared_ptr.hpp>
21
22 class wxNotebook;
23 class wxPanel;
24 class wxBoxSizer;
25 class wxTextCtrl;
26 class wxStaticText;
27 class wxCheckBox;
28 class wxChoice;
29 class wxButton;
30 class wxSpinCtrl;
31 class wxSizer;
32
33 class Film;
34
35 class DCPPanel
36 {
37 public:
38         DCPPanel (wxNotebook *, boost::shared_ptr<Film>);
39
40         void set_film (boost::shared_ptr<Film>);
41         void set_general_sensitivity (bool);
42
43         void film_changed (int);
44         void film_content_changed (int);
45
46         wxPanel* panel () const {
47                 return _panel;
48         }
49
50 private:
51         void name_changed ();
52         void use_isdcf_name_toggled ();
53         void edit_isdcf_button_clicked ();
54         void container_changed ();
55         void dcp_content_type_changed ();
56         void scaler_changed ();
57         void j2k_bandwidth_changed ();
58         void frame_rate_choice_changed ();
59         void frame_rate_spin_changed ();
60         void best_frame_rate_clicked ();
61         void content_timeline_clicked ();
62         void audio_channels_changed ();
63         void resolution_changed ();
64         void three_d_changed ();
65         void standard_changed ();
66         void signed_toggled ();
67         void burn_subtitles_toggled ();
68         void encrypted_toggled ();
69
70         void setup_frame_rate_widget ();
71         void setup_container ();
72         void setup_dcp_name ();
73
74         wxPanel* make_general_panel ();
75         wxPanel* make_video_panel ();
76         wxPanel* make_audio_panel ();
77
78         void config_changed ();
79
80         wxPanel* _panel;
81         wxNotebook* _notebook;
82         wxBoxSizer* _sizer;
83
84         wxTextCtrl* _name;
85         wxStaticText* _dcp_name;
86         wxCheckBox* _use_isdcf_name;
87         wxChoice* _container;
88         wxButton* _edit_isdcf_button;
89         wxChoice* _scaler;
90         wxSpinCtrl* _j2k_bandwidth;
91         wxChoice* _dcp_content_type;
92         wxChoice* _frame_rate_choice;
93         wxSpinCtrl* _frame_rate_spin;
94         wxSizer* _frame_rate_sizer;
95         wxSpinCtrl* _audio_channels;
96         wxButton* _best_frame_rate;
97         wxCheckBox* _three_d;
98         wxChoice* _resolution;
99         wxChoice* _standard;
100         wxCheckBox* _signed;
101         wxCheckBox* _burn_subtitles;
102         wxCheckBox* _encrypted;
103
104         boost::shared_ptr<Film> _film;
105         bool _generally_sensitive;
106 };