Disable DCP panel stuff which cannot be altered when a DCP is being referenced.
[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 class Film;
37 class Ratio;
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         void setup_sensitivity ();
92
93         wxPanel* _panel;
94         wxNotebook* _notebook;
95         wxBoxSizer* _sizer;
96
97         wxTextCtrl* _name;
98         wxStaticText* _dcp_name;
99         wxCheckBox* _use_isdcf_name;
100         wxChoice* _container;
101         wxStaticText* _container_size;
102         wxButton* _edit_isdcf_button;
103         wxButton* _copy_isdcf_name_button;
104         wxSpinCtrl* _j2k_bandwidth;
105         wxChoice* _dcp_content_type;
106         wxChoice* _frame_rate_choice;
107         wxSpinCtrl* _frame_rate_spin;
108         wxSizer* _frame_rate_sizer;
109         wxChoice* _audio_channels;
110         wxChoice* _audio_processor;
111         wxButton* _show_audio;
112         wxButton* _best_frame_rate;
113         wxCheckBox* _three_d;
114         wxChoice* _resolution;
115         wxChoice* _standard;
116         wxCheckBox* _signed;
117         wxCheckBox* _encrypted;
118         wxStaticText* _key;
119         wxButton* _edit_key;
120         wxChoice* _reel_type;
121         wxSpinCtrl* _reel_length;
122         wxCheckBox* _upload_after_make_dcp;
123
124         AudioDialog* _audio_dialog;
125
126         boost::shared_ptr<Film> _film;
127         bool _generally_sensitive;
128 };