Merge.
[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 AudioDialog;
35
36 class Film;
37
38 class DCPPanel : public boost::noncopyable
39 {
40 public:
41         DCPPanel (wxNotebook *, boost::shared_ptr<Film>);
42
43         void set_film (boost::shared_ptr<Film>);
44         void set_general_sensitivity (bool);
45
46         void film_changed (int);
47         void film_content_changed (int);
48
49         wxPanel* panel () const {
50                 return _panel;
51         }
52
53 private:
54         void name_changed ();
55         void use_isdcf_name_toggled ();
56         void edit_isdcf_button_clicked ();
57         void copy_isdcf_name_button_clicked ();
58         void container_changed ();
59         void dcp_content_type_changed ();
60         void j2k_bandwidth_changed ();
61         void frame_rate_choice_changed ();
62         void frame_rate_spin_changed ();
63         void best_frame_rate_clicked ();
64         void content_timeline_clicked ();
65         void audio_channels_changed ();
66         void resolution_changed ();
67         void three_d_changed ();
68         void standard_changed ();
69         void signed_toggled ();
70         void encrypted_toggled ();
71         void edit_key_clicked ();
72         void audio_processor_changed ();
73         void show_audio_clicked ();
74         void reel_type_changed ();
75         void reel_length_changed ();
76         void upload_after_make_dcp_changed ();
77
78         void setup_frame_rate_widget ();
79         void setup_container ();
80         void setup_dcp_name ();
81         void setup_audio_channels_choice ();
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 };