Add simple/full interface option and make DCP panel respect it.
[dcpomatic.git] / src / wx / dcp_panel.h
1 /*
2     Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
3
4     This file is part of DCP-o-matic.
5
6     DCP-o-matic is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.
10
11     DCP-o-matic is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15
16     You should have received a copy of the GNU General Public License
17     along with DCP-o-matic.  If not, see <http://www.gnu.org/licenses/>.
18
19 */
20
21 #include "lib/config.h"
22 #include <boost/shared_ptr.hpp>
23 #include <boost/noncopyable.hpp>
24
25 class wxNotebook;
26 class wxPanel;
27 class wxBoxSizer;
28 class wxTextCtrl;
29 class wxStaticText;
30 class wxCheckBox;
31 class wxChoice;
32 class wxButton;
33 class wxSpinCtrl;
34 class wxSizer;
35 class wxGridBagSizer;
36
37 class AudioDialog;
38 class Film;
39 class Ratio;
40
41 class DCPPanel : public boost::noncopyable
42 {
43 public:
44         DCPPanel (wxNotebook *, boost::shared_ptr<Film>);
45
46         void set_film (boost::shared_ptr<Film>);
47         void set_general_sensitivity (bool);
48
49         void film_changed (int);
50         void film_content_changed (int);
51
52         wxPanel* panel () const {
53                 return _panel;
54         }
55
56 private:
57         void name_changed ();
58         void use_isdcf_name_toggled ();
59         void edit_isdcf_button_clicked ();
60         void copy_isdcf_name_button_clicked ();
61         void container_changed ();
62         void dcp_content_type_changed ();
63         void j2k_bandwidth_changed ();
64         void frame_rate_choice_changed ();
65         void frame_rate_spin_changed ();
66         void best_frame_rate_clicked ();
67         void content_timeline_clicked ();
68         void audio_channels_changed ();
69         void resolution_changed ();
70         void three_d_changed ();
71         void standard_changed ();
72         void signed_toggled ();
73         void encrypted_toggled ();
74         void edit_key_clicked ();
75         void audio_processor_changed ();
76         void show_audio_clicked ();
77         void reel_type_changed ();
78         void reel_length_changed ();
79         void upload_after_make_dcp_changed ();
80
81         void setup_frame_rate_widget ();
82         void setup_container ();
83         void setup_dcp_name ();
84         void add_to_grid ();
85
86         int minimum_allowed_audio_channels () const;
87
88         wxPanel* make_general_panel ();
89         wxPanel* make_video_panel ();
90         wxPanel* make_audio_panel ();
91
92         void config_changed (Config::Property p);
93
94         void setup_sensitivity ();
95
96         wxPanel* _panel;
97         wxNotebook* _notebook;
98         wxBoxSizer* _sizer;
99         wxGridBagSizer* _grid;
100
101         wxStaticText* _name_label;
102         wxTextCtrl* _name;
103         wxStaticText* _dcp_name;
104         wxCheckBox* _use_isdcf_name;
105         wxChoice* _container;
106         wxStaticText* _container_size;
107         wxButton* _edit_isdcf_button;
108         wxButton* _copy_isdcf_name_button;
109         wxSpinCtrl* _j2k_bandwidth;
110         wxStaticText* _dcp_content_type_label;
111         wxChoice* _dcp_content_type;
112         wxChoice* _frame_rate_choice;
113         wxSpinCtrl* _frame_rate_spin;
114         wxSizer* _frame_rate_sizer;
115         wxChoice* _audio_channels;
116         wxChoice* _audio_processor;
117         wxButton* _show_audio;
118         wxButton* _best_frame_rate;
119         wxCheckBox* _three_d;
120         wxChoice* _resolution;
121         wxStaticText* _standard_label;
122         wxChoice* _standard;
123         wxCheckBox* _signed;
124         wxCheckBox* _encrypted;
125         wxStaticText* _key_label;
126         wxStaticText* _key;
127         wxButton* _edit_key;
128         wxStaticText* _reels_label;
129         wxChoice* _reel_type;
130         wxStaticText* _reel_length_label;
131         wxStaticText* _reel_length_gb_label;
132         wxSpinCtrl* _reel_length;
133         wxCheckBox* _upload_after_make_dcp;
134
135         AudioDialog* _audio_dialog;
136
137         boost::shared_ptr<Film> _film;
138         bool _generally_sensitive;
139 };