Supporter.
[dcpomatic.git] / src / wx / rgba_colour_picker.cc
index 7e8c84b11df32cacde50b5885f3d572fb5cf64b3..038bf97e4e09d6d898f608b39bb2f734d7d7d738 100644 (file)
@@ -1,19 +1,20 @@
 /*
     Copyright (C) 2016 Carl Hetherington <cth@carlh.net>
 
-    This program is free software; you can redistribute it and/or modify
+    This file is part of DCP-o-matic.
+
+    DCP-o-matic is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation; either version 2 of the License, or
     (at your option) any later version.
 
-    This program is distributed in the hope that it will be useful,
+    DCP-o-matic is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.
 
     You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+    along with DCP-o-matic.  If not, see <http://www.gnu.org/licenses/>.
 
 */
 
@@ -43,3 +44,10 @@ RGBAColourPicker::colour () const
        wxColour const c = _picker->GetColour ();
        return RGBA (c.Red(), c.Green(), c.Blue(), _alpha->GetValue());
 }
+
+void
+RGBAColourPicker::set (RGBA colour)
+{
+       _picker->SetColour (wxColour (colour.r, colour.g, colour.b));
+       _alpha->SetValue (colour.a);
+}