2 Copyright (C) 2013-2021 Carl Hetherington <cth@carlh.net>
4 This file is part of DCP-o-matic.
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.
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.
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/>.
22 #ifndef DCPOMATIC_COLOUR_CONVERSION_EDITOR_H
23 #define DCPOMATIC_COLOUR_CONVERSION_EDITOR_H
26 #include <boost/signals2.hpp>
31 class wxSpinCtrlDouble;
32 class ColourConversion;
35 class ColourConversionEditor : public wxPanel
38 ColourConversionEditor (wxWindow *, bool yuv);
40 void set (ColourConversion);
41 ColourConversion get () const;
43 boost::signals2::signal<void ()> Changed;
47 void changed (wxSpinCtrlDouble *);
48 void chromaticity_changed ();
49 void adjusted_white_changed ();
50 void update_rgb_to_xyz ();
51 void update_bradford ();
52 wxStaticText* subhead (wxGridBagSizer* sizer, wxWindow* parent, wxString text, int& row) const;
54 void set_text_ctrl (wxTextCtrl *, double);
55 void set_spin_ctrl (wxSpinCtrlDouble *, double);
57 static int const INPUT_GAMMA;
58 static int const INPUT_GAMMA_LINEARISED;
59 static int const INPUT_SGAMUT3;
61 std::map<wxSpinCtrlDouble*, double> _last_spin_ctrl_value;
62 bool _ignore_chromaticity_changed;
65 wxSpinCtrlDouble* _input_gamma;
66 wxSpinCtrlDouble* _input_power;
67 wxTextCtrl* _input_threshold;
70 wxChoice* _yuv_to_rgb;
79 wxCheckBox* _adjust_white;
80 wxTextCtrl* _adjusted_white_x;
81 wxTextCtrl* _adjusted_white_y;
83 wxStaticText* _rgb_to_xyz[3][3];
84 wxStaticText* _bradford[3][3];