+ _use = new wxCheckBox (this, wxID_ANY, _("Use as"));
+ _type = new wxChoice (this, wxID_ANY);
+ _type->Append (_("open subtitles"));
+ _type->Append (_("closed captions"));
+
+ _burn = new wxCheckBox (this, wxID_ANY, _("Burn subtitles into image"));
+
+ _offset_label = create_label (this, _("Offset"), true);
+ _x_offset_label = create_label (this, _("X"), true);
+ _x_offset = new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(64, -1));
+ _x_offset_pc_label = new wxStaticText (this, wxID_ANY, _("%"));
+ _y_offset_label = create_label (this, _("Y"), true);
+ _y_offset = new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(64, -1));
+ _y_offset_pc_label = new wxStaticText (this, wxID_ANY, _("%"));
+
+ _scale_label = create_label (this, _("Scale"), true);
+ _x_scale_label = create_label (this, _("X"), true);
+ _x_scale = new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(64, -1));
+ _x_scale_pc_label = new wxStaticText (this, wxID_ANY, _("%"));
+ _y_scale_label = create_label (this, _("Y"), true);
+ _y_scale = new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(64, -1));
+ _y_scale_pc_label = new wxStaticText (this, wxID_ANY, _("%"));
+
+ _line_spacing_label = create_label (this, _("Line spacing"), true);
+ _line_spacing = new wxSpinCtrl (this);
+ _line_spacing_pc_label = new wxStaticText (this, wxID_ANY, _("%"));
+
+ _dcp_track_label = create_label (this, _("DCP track"), true);
+ _dcp_track = new wxChoice (this, wxID_ANY);
+
+ _language_label = create_label (this, _("Language"), true);
+ _language = new wxTextCtrl (this, wxID_ANY);
+
+ _stream_label = create_label (this, _("Stream"), true);
+ _stream = new wxChoice (this, wxID_ANY);
+
+ _text_view_button = new wxButton (this, wxID_ANY, _("View..."));
+ _fonts_dialog_button = new wxButton (this, wxID_ANY, _("Fonts..."));
+ _appearance_dialog_button = new wxButton (this, wxID_ANY, _("Appearance..."));
+
+ _x_offset->SetRange (-100, 100);
+ _y_offset->SetRange (-100, 100);
+ _x_scale->SetRange (10, 1000);
+ _y_scale->SetRange (10, 1000);
+ _line_spacing->SetRange (10, 1000);
+
+ update_dcp_tracks ();
+
+ content_selection_changed ();
+
+ _reference->Bind (wxEVT_CHECKBOX, boost::bind (&TextPanel::reference_clicked, this));
+ _use->Bind (wxEVT_CHECKBOX, boost::bind (&TextPanel::use_toggled, this));
+ _type->Bind (wxEVT_CHOICE, boost::bind (&TextPanel::type_changed, this));
+ _burn->Bind (wxEVT_CHECKBOX, boost::bind (&TextPanel::burn_toggled, this));
+ _x_offset->Bind (wxEVT_SPINCTRL, boost::bind (&TextPanel::x_offset_changed, this));
+ _y_offset->Bind (wxEVT_SPINCTRL, boost::bind (&TextPanel::y_offset_changed, this));
+ _x_scale->Bind (wxEVT_SPINCTRL, boost::bind (&TextPanel::x_scale_changed, this));
+ _y_scale->Bind (wxEVT_SPINCTRL, boost::bind (&TextPanel::y_scale_changed, this));
+ _line_spacing->Bind (wxEVT_SPINCTRL, boost::bind (&TextPanel::line_spacing_changed, this));
+ _dcp_track->Bind (wxEVT_CHOICE, boost::bind (&TextPanel::dcp_track_changed, this));
+ _language->Bind (wxEVT_TEXT, boost::bind (&TextPanel::language_changed, this));
+ _stream->Bind (wxEVT_CHOICE, boost::bind (&TextPanel::stream_changed, this));
+ _text_view_button->Bind (wxEVT_BUTTON, boost::bind (&TextPanel::text_view_clicked, this));
+ _fonts_dialog_button->Bind (wxEVT_BUTTON, boost::bind (&TextPanel::fonts_dialog_clicked, this));
+ _appearance_dialog_button->Bind (wxEVT_BUTTON, boost::bind (&TextPanel::appearance_dialog_clicked, this));
+
+ add_to_grid();
+}
+
+void
+TextPanel::add_to_grid ()
+{
+ Config::Interface const interface = Config::instance()->interface_complexity();