Merge master and multifarious hackery.
[dcpomatic.git] / src / wx / config_dialog.h
1 /*
2     Copyright (C) 2012 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 /** @file src/config_dialog.h
21  *  @brief A dialogue to edit DCP-o-matic configuration.
22  */
23
24 #include <wx/wx.h>
25 #include <wx/spinctrl.h>
26 #include <wx/listctrl.h>
27 #include <wx/filepicker.h>
28
29 class DirPickerCtrl;
30 class wxNotebook;
31
32 class ServerDescription;
33
34 /** @class ConfigDialog
35  *  @brief A dialogue to edit DCP-o-matic configuration.
36  */
37 class ConfigDialog : public wxDialog
38 {
39 public:
40         ConfigDialog (wxWindow *);
41
42 private:
43         void set_language_changed (wxCommandEvent &);
44         void language_changed (wxCommandEvent &);
45         void tms_ip_changed (wxCommandEvent &);
46         void tms_path_changed (wxCommandEvent &);
47         void tms_user_changed (wxCommandEvent &);
48         void tms_password_changed (wxCommandEvent &);
49         void num_local_encoding_threads_changed (wxCommandEvent &);
50         void default_still_length_changed (wxCommandEvent &);
51         void default_directory_changed (wxCommandEvent &);
52         void edit_default_dci_metadata_clicked (wxCommandEvent &);
53         void reference_scaler_changed (wxCommandEvent &);
54         void edit_reference_filters_clicked (wxCommandEvent &);
55         void reference_filters_changed (std::vector<Filter const *>);
56         void add_server_clicked (wxCommandEvent &);
57         void edit_server_clicked (wxCommandEvent &);
58         void remove_server_clicked (wxCommandEvent &);
59         void server_selection_changed (wxListEvent &);
60         void default_container_changed (wxCommandEvent &);
61         void default_dcp_content_type_changed (wxCommandEvent &);
62         void issuer_changed (wxCommandEvent &);
63         void creator_changed (wxCommandEvent &);
64
65         void add_server_to_control (ServerDescription *);
66         void setup_language_sensitivity ();
67
68         void make_misc_panel ();
69         void make_tms_panel ();
70         void make_metadata_panel ();
71         void make_ab_panel ();
72         void make_servers_panel ();
73
74         wxNotebook* _notebook;
75         wxPanel* _misc_panel;
76         wxPanel* _tms_panel;
77         wxPanel* _ab_panel;
78         wxPanel* _servers_panel;
79         wxPanel* _metadata_panel;
80         wxCheckBox* _set_language;
81         wxChoice* _language;
82         wxChoice* _default_container;
83         wxChoice* _default_dcp_content_type;
84         wxTextCtrl* _tms_ip;
85         wxTextCtrl* _tms_path;
86         wxTextCtrl* _tms_user;
87         wxTextCtrl* _tms_password;
88         wxSpinCtrl* _num_local_encoding_threads;
89         wxSpinCtrl* _default_still_length;
90 #ifdef __WXMSW__        
91         DirPickerCtrl* _default_directory;
92 #else
93         wxDirPickerCtrl* _default_directory;
94 #endif
95         wxButton* _default_dci_metadata_button;
96         wxChoice* _reference_scaler;
97         wxStaticText* _reference_filters;
98         wxButton* _reference_filters_button;
99         wxListCtrl* _servers;
100         wxButton* _add_server;
101         wxButton* _edit_server;
102         wxButton* _remove_server;
103         wxTextCtrl* _issuer;
104         wxTextCtrl* _creator;
105 };
106