+
+ _fade_in_label = create_label (this, _("Fade in"), true);
+ _fade_in = new Timecode<ContentTime> (this);
+
+ _fade_out_label = create_label (this, _("Fade out"), true);
+ _fade_out = new Timecode<ContentTime> (this);
+
+ wxClientDC dc (this);
+ auto size = dc.GetTextExtent (wxT ("A quite long name"));
+#ifdef __WXGTK3__
+ size.SetWidth (size.GetWidth() + 64);
+#endif
+ size.SetHeight (-1);
+
+ _scale_label = create_label (this, _("Scale"), true);
+ _scale_fit = new wxRadioButton (this, wxID_ANY, _("to fit DCP"));
+ _scale_custom = new wxRadioButton (this, wxID_ANY, _("custom"));
+ _scale_custom_edit = new Button (this, _("Edit..."), wxDefaultPosition, small_button_size(this, _("Edit...")));
+
+ _colour_conversion_label = create_label (this, _("Colour"), true);
+ _colour_conversion = new wxChoice (this, wxID_ANY, wxDefaultPosition, size);
+ _colour_conversion->Append (_("None"));
+ for (auto const& i: PresetColourConversion::all()) {
+ _colour_conversion->Append (std_to_wx (i.name));
+ }
+
+ /// TRANSLATORS: translate the word "Custom" here; do not include the "Colour|" prefix
+ _colour_conversion->Append (S_("Colour|Custom"));
+ _edit_colour_conversion_button = new Button (this, _("Edit..."), wxDefaultPosition, small_button_size(this, _("Edit...")));
+
+ _range_label = create_label (this, _("Range"), true);
+ _range = new wxChoice (this, wxID_ANY);
+ _range->Append (_("Full (JPEG, 0-255)"));
+ _range->Append (_("Video (MPEG, 16-235)"));
+
+ _description = new StaticText (this, wxT ("\n \n \n \n \n"), wxDefaultPosition, wxDefaultSize);
+ _description->SetFont(font);
+
+ _left_crop->wrapped()->SetRange (0, 4096);
+ _top_crop->wrapped()->SetRange (0, 4096);
+ _right_crop->wrapped()->SetRange (0, 4096);
+ _bottom_crop->wrapped()->SetRange (0, 4096);
+
+ _frame_type->wrapped()->Append (_("2D"));
+ _frame_type->wrapped()->Append (_("3D"));
+ _frame_type->wrapped()->Append (_("3D left/right"));
+ _frame_type->wrapped()->Append (_("3D top/bottom"));
+ _frame_type->wrapped()->Append (_("3D alternate"));
+ _frame_type->wrapped()->Append (_("3D left only"));
+ _frame_type->wrapped()->Append (_("3D right only"));
+
+ content_selection_changed ();
+
+ _fade_in->Changed.connect (boost::bind (&VideoPanel::fade_in_changed, this));
+ _fade_out->Changed.connect (boost::bind (&VideoPanel::fade_out_changed, this));
+
+ _reference->Bind (wxEVT_CHECKBOX, boost::bind (&VideoPanel::reference_clicked, this));
+ _scale_fit->Bind (wxEVT_RADIOBUTTON, boost::bind (&VideoPanel::scale_fit_clicked, this));
+ _scale_custom->Bind (wxEVT_RADIOBUTTON, boost::bind (&VideoPanel::scale_custom_clicked, this));
+ _scale_custom_edit->Bind (wxEVT_BUTTON, boost::bind (&VideoPanel::scale_custom_edit_clicked, this));
+ _colour_conversion->Bind (wxEVT_CHOICE, boost::bind (&VideoPanel::colour_conversion_changed, this));
+ _range->Bind (wxEVT_CHOICE, boost::bind (&VideoPanel::range_changed, this));
+ _edit_colour_conversion_button->Bind (wxEVT_BUTTON, boost::bind (&VideoPanel::edit_colour_conversion_clicked, this));
+ _left_right_link->Bind (wxEVT_TOGGLEBUTTON, boost::bind(&VideoPanel::left_right_link_clicked, this));
+ _top_bottom_link->Bind (wxEVT_TOGGLEBUTTON, boost::bind(&VideoPanel::top_bottom_link_clicked, this));
+
+ add_to_grid ();
+
+ _sizer->Layout ();
+}
+
+
+void
+VideoPanel::add_to_grid ()
+{
+ int r = 0;
+
+ auto reference_sizer = new wxBoxSizer (wxVERTICAL);
+ reference_sizer->Add (_reference, 0);
+ reference_sizer->Add (_reference_note, 0);
+ _grid->Add (reference_sizer, wxGBPosition(r, 0), wxGBSpan(1, 3));