#include "caption_panel.h"
#include "film_editor.h"
#include "wx_util.h"
-#include "subtitle_view.h"
+#include "caption_view.h"
#include "content_panel.h"
#include "fonts_dialog.h"
#include "caption_appearance_dialog.h"
CaptionPanel::CaptionPanel (ContentPanel* p)
: ContentSubPanel (p, _("Captions"))
- , _subtitle_view (0)
+ , _caption_view (0)
, _fonts_dialog (0)
{
wxBoxSizer* reference_sizer = new wxBoxSizer (wxVERTICAL);
{
wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
- _subtitle_view_button = new wxButton (this, wxID_ANY, _("View..."));
- s->Add (_subtitle_view_button, 1, wxALL, DCPOMATIC_SIZER_GAP);
+ _caption_view_button = new wxButton (this, wxID_ANY, _("View..."));
+ s->Add (_caption_view_button, 1, wxALL, DCPOMATIC_SIZER_GAP);
_fonts_dialog_button = new wxButton (this, wxID_ANY, _("Fonts..."));
s->Add (_fonts_dialog_button, 1, wxALL, DCPOMATIC_SIZER_GAP);
_appearance_dialog_button = new wxButton (this, wxID_ANY, _("Appearance..."));
_line_spacing->Bind (wxEVT_SPINCTRL, boost::bind (&CaptionPanel::line_spacing_changed, this));
_language->Bind (wxEVT_TEXT, boost::bind (&CaptionPanel::language_changed, this));
_stream->Bind (wxEVT_CHOICE, boost::bind (&CaptionPanel::stream_changed, this));
- _subtitle_view_button->Bind (wxEVT_BUTTON, boost::bind (&CaptionPanel::subtitle_view_clicked, this));
+ _caption_view_button->Bind (wxEVT_BUTTON, boost::bind (&CaptionPanel::caption_view_clicked, this));
_fonts_dialog_button->Bind (wxEVT_BUTTON, boost::bind (&CaptionPanel::fonts_dialog_clicked, this));
_appearance_dialog_button->Bind (wxEVT_BUTTON, boost::bind (&CaptionPanel::appearance_dialog_clicked, this));
}
_line_spacing->Enable (!reference && use);
_language->Enable (!reference && any_subs > 0 && use);
_stream->Enable (!reference && ffmpeg_subs == 1);
- _subtitle_view_button->Enable (!reference);
+ _caption_view_button->Enable (!reference);
_fonts_dialog_button->Enable (!reference);
_appearance_dialog_button->Enable (!reference && any_subs > 0 && use);
}
}
void
-CaptionPanel::subtitle_view_clicked ()
+CaptionPanel::caption_view_clicked ()
{
- if (_subtitle_view) {
- _subtitle_view->Destroy ();
- _subtitle_view = 0;
+ if (_caption_view) {
+ _caption_view->Destroy ();
+ _caption_view = 0;
}
ContentList c = _parent->selected_caption ();
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 ();
+ _caption_view = new CaptionView (this, _parent->film(), c.front(), decoder, _parent->film_viewer());
+ _caption_view->Show ();
}
}