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