Add channel count hints to the default audio channel count preference,
[dcpomatic.git] / src / wx / dcp_panel.h
1 /*
2     Copyright (C) 2012-2014 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 <boost/shared_ptr.hpp>
22 #include <boost/noncopyable.hpp>
23
24 class wxNotebook;
25 class wxPanel;
26 class wxBoxSizer;
27 class wxTextCtrl;
28 class wxStaticText;
29 class wxCheckBox;
30 class wxChoice;
31 class wxButton;
32 class wxSpinCtrl;
33 class wxSizer;
34
35 class AudioDialog;
36
37 class Film;
38
39 class DCPPanel : public boost::noncopyable
40 {
41 public:
42         DCPPanel (wxNotebook *, boost::shared_ptr<Film>);
43
44         void set_film (boost::shared_ptr<Film>);
45         void set_general_sensitivity (bool);
46
47         void film_changed (int);
48         void film_content_changed (int);
49
50         wxPanel* panel () const {
51                 return _panel;
52         }
53
54 private:
55         void name_changed ();
56         void use_isdcf_name_toggled ();
57         void edit_isdcf_button_clicked ();
58         void copy_isdcf_name_button_clicked ();
59         void container_changed ();
60         void dcp_content_type_changed ();
61         void j2k_bandwidth_changed ();
62         void frame_rate_choice_changed ();
63         void frame_rate_spin_changed ();
64         void best_frame_rate_clicked ();
65         void content_timeline_clicked ();
66         void audio_channels_changed ();
67         void resolution_changed ();
68         void three_d_changed ();
69         void standard_changed ();
70         void signed_toggled ();
71         void encrypted_toggled ();
72         void edit_key_clicked ();
73         void audio_processor_changed ();
74         void show_audio_clicked ();
75         void reel_type_changed ();
76         void reel_length_changed ();
77         void upload_after_make_dcp_changed ();
78
79         void setup_frame_rate_widget ();
80         void setup_container ();
81         void setup_dcp_name ();
82
83         int minimum_allowed_audio_channels () const;
84
85         wxPanel* make_general_panel ();
86         wxPanel* make_video_panel ();
87         wxPanel* make_audio_panel ();
88
89         void config_changed ();
90
91         wxPanel* _panel;
92         wxNotebook* _notebook;
93         wxBoxSizer* _sizer;
94
95         wxTextCtrl* _name;
96         wxStaticText* _dcp_name;
97         wxCheckBox* _use_isdcf_name;
98         wxChoice* _container;
99         wxStaticText* _container_size;
100         wxButton* _edit_isdcf_button;
101         wxButton* _copy_isdcf_name_button;
102         wxSpinCtrl* _j2k_bandwidth;
103         wxChoice* _dcp_content_type;
104         wxChoice* _frame_rate_choice;
105         wxSpinCtrl* _frame_rate_spin;
106         wxSizer* _frame_rate_sizer;
107         wxChoice* _audio_channels;
108         wxChoice* _audio_processor;
109         wxButton* _show_audio;
110         wxButton* _best_frame_rate;
111         wxCheckBox* _three_d;
112         wxChoice* _resolution;
113         wxChoice* _standard;
114         wxCheckBox* _signed;
115         wxCheckBox* _encrypted;
116         wxStaticText* _key;
117         wxButton* _edit_key;
118         wxChoice* _reel_type;
119         wxSpinCtrl* _reel_length;
120         wxCheckBox* _upload_after_make_dcp;
121
122         AudioDialog* _audio_dialog;
123
124         boost::shared_ptr<Film> _film;
125         bool _generally_sensitive;
126 };