No-op; fix GPL address and use the explicit-program-name version.
[dcpomatic.git] / src / wx / colour_conversion_editor.h
1 /*
2     Copyright (C) 2013-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 #ifndef DCPOMATIC_COLOUR_CONVERSION_EDITOR_H
22 #define DCPOMATIC_COLOUR_CONVERSION_EDITOR_H
23
24 #include <boost/signals2.hpp>
25 #include <wx/wx.h>
26
27 class wxSpinCtrlDouble;
28 class ColourConversion;
29
30 class ColourConversionEditor : public wxPanel
31 {
32 public:
33         ColourConversionEditor (wxWindow *, bool yuv);
34
35         void set (ColourConversion);
36         ColourConversion get () const;
37
38         boost::signals2::signal<void ()> Changed;
39
40 private:
41         void changed ();
42         void changed (wxSpinCtrlDouble *);
43         void chromaticity_changed ();
44         void adjusted_white_changed ();
45         void update_rgb_to_xyz ();
46         void update_bradford ();
47         wxStaticText* subhead (wxGridBagSizer* sizer, wxWindow* parent, wxString text, int& row) const;
48
49         void set_text_ctrl (wxTextCtrl *, double);
50         void set_spin_ctrl (wxSpinCtrlDouble *, double);
51
52         std::map<wxSpinCtrlDouble*, double> _last_spin_ctrl_value;
53         bool _ignore_chromaticity_changed;
54
55         wxSpinCtrlDouble* _input_gamma;
56         wxSpinCtrlDouble* _input_power;
57         wxTextCtrl* _input_threshold;
58         wxTextCtrl* _input_A;
59         wxTextCtrl* _input_B;
60         wxCheckBox* _input_gamma_linearised;
61         wxChoice* _yuv_to_rgb;
62         wxTextCtrl* _red_x;
63         wxTextCtrl* _red_y;
64         wxTextCtrl* _green_x;
65         wxTextCtrl* _green_y;
66         wxTextCtrl* _blue_x;
67         wxTextCtrl* _blue_y;
68         wxTextCtrl* _white_x;
69         wxTextCtrl* _white_y;
70         wxCheckBox* _adjust_white;
71         wxTextCtrl* _adjusted_white_x;
72         wxTextCtrl* _adjusted_white_y;
73         wxStaticText* _rgb_to_xyz[3][3];
74         wxStaticText* _bradford[3][3];
75 };
76
77 #endif