+ film_content_changed (TextContentProperty::USE);
+ film_content_changed (TextContentProperty::BURN);
+ film_content_changed (TextContentProperty::X_OFFSET);
+ film_content_changed (TextContentProperty::Y_OFFSET);
+ film_content_changed (TextContentProperty::X_SCALE);
+ film_content_changed (TextContentProperty::Y_SCALE);
+ film_content_changed (TextContentProperty::LINE_SPACING);
+ film_content_changed (TextContentProperty::LANGUAGE);
+ film_content_changed (TextContentProperty::FONTS);
+ film_content_changed (DCPContentProperty::REFERENCE_SUBTITLE);
+}
+
+void
+SubtitlePanel::subtitle_view_clicked ()
+{
+ if (_subtitle_view) {
+ _subtitle_view->Destroy ();
+ _subtitle_view = 0;
+ }
+
+ ContentList c = _parent->selected_subtitle ();
+ DCPOMATIC_ASSERT (c.size() == 1);
+
+ shared_ptr<Decoder> decoder = decoder_factory (c.front(), _parent->film()->log(), false);
+
+ if (decoder) {
+ _subtitle_view = new SubtitleView (this, _parent->film(), c.front(), decoder, _parent->film_viewer());
+ _subtitle_view->Show ();
+ }
+}
+
+void
+SubtitlePanel::fonts_dialog_clicked ()
+{
+ if (_fonts_dialog) {
+ _fonts_dialog->Destroy ();
+ _fonts_dialog = 0;
+ }
+
+ ContentList c = _parent->selected_subtitle ();
+ DCPOMATIC_ASSERT (c.size() == 1);
+
+ _fonts_dialog = new FontsDialog (this, c.front ());
+ _fonts_dialog->Show ();
+}
+
+void
+SubtitlePanel::reference_clicked ()
+{
+ ContentList c = _parent->selected ();
+ if (c.size() != 1) {
+ return;
+ }
+
+ shared_ptr<DCPContent> d = dynamic_pointer_cast<DCPContent> (c.front ());
+ if (!d) {
+ return;
+ }
+
+ d->set_reference_subtitle (_reference->GetValue ());
+}
+
+void
+SubtitlePanel::appearance_dialog_clicked ()
+{
+ ContentList c = _parent->selected_subtitle ();
+ DCPOMATIC_ASSERT (c.size() == 1);
+
+ SubtitleAppearanceDialog* d = new SubtitleAppearanceDialog (this, c.front());
+ if (d->ShowModal () == wxID_OK) {
+ d->apply ();
+ }
+ d->Destroy ();