summaryrefslogtreecommitdiff
path: root/src/wx
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-07-23 11:20:12 +0100
committerCarl Hetherington <cth@carlh.net>2018-07-23 11:20:12 +0100
commitdf17bbd25da69fc38eb2dcd8b4a2531cf0bab0bc (patch)
tree04e6f5917ed3c2e8ea45904ff0235c08d29a6446 /src/wx
parent6f146336b73fe720c83cb75ebdf15e9cb9c02973 (diff)
More automated renaming.
ActiveCaptions -> ActiveText BitmapCaption -> BitmapText ContentCaption -> ContentText ContentTextCaption -> ContentStringText TextCaptionFileContent -> StringTextFileContent TextCaptionFileDecoder -> StringTextFileDecoder TextCaptionFile -> StringTextFile TextCaption -> StringText PlayerCaption -> PlayerText CaptionContent -> TextContent CaptionDecoder -> TextDecoder CaptionPanel -> TextPanel CaptionView -> TextView CaptionAppearanceDialog -> SubtitleAppearanceDialog CaptionType -> TextType
Diffstat (limited to 'src/wx')
-rw-r--r--src/wx/closed_captions_dialog.cc14
-rw-r--r--src/wx/content_panel.cc16
-rw-r--r--src/wx/content_panel.h4
-rw-r--r--src/wx/dcp_panel.cc6
-rw-r--r--src/wx/film_viewer.h2
-rw-r--r--src/wx/fonts_dialog.cc8
-rw-r--r--src/wx/fonts_dialog.h6
-rw-r--r--src/wx/subtitle_appearance_dialog.cc (renamed from src/wx/caption_appearance_dialog.cc)38
-rw-r--r--src/wx/subtitle_appearance_dialog.h (renamed from src/wx/caption_appearance_dialog.h)6
-rw-r--r--src/wx/text_panel.cc (renamed from src/wx/caption_panel.cc)124
-rw-r--r--src/wx/text_panel.h (renamed from src/wx/caption_panel.h)10
-rw-r--r--src/wx/text_view.cc (renamed from src/wx/caption_view.cc)28
-rw-r--r--src/wx/text_view.h (renamed from src/wx/caption_view.h)10
-rw-r--r--src/wx/timeline.cc4
-rw-r--r--src/wx/timeline_text_content_view.cc4
-rw-r--r--src/wx/timeline_text_content_view.h6
-rw-r--r--src/wx/timing_panel.cc4
-rw-r--r--src/wx/wscript6
18 files changed, 148 insertions, 148 deletions
diff --git a/src/wx/closed_captions_dialog.cc b/src/wx/closed_captions_dialog.cc
index 0b2e63035..3e240c6e8 100644
--- a/src/wx/closed_captions_dialog.cc
+++ b/src/wx/closed_captions_dialog.cc
@@ -19,7 +19,7 @@
*/
#include "closed_captions_dialog.h"
-#include "lib/text_caption.h"
+#include "lib/string_text.h"
#include <boost/bind.hpp>
using std::list;
@@ -70,13 +70,13 @@ ClosedCaptionsDialog::paint ()
class ClosedCaptionSorter
{
public:
- bool operator() (TextCaption const & a, TextCaption const & b)
+ bool operator() (StringText const & a, StringText const & b)
{
return from_top(a) < from_top(b);
}
private:
- float from_top (TextCaption const & c) const
+ float from_top (StringText const & c) const
{
switch (c.v_align()) {
case dcp::VALIGN_TOP:
@@ -96,9 +96,9 @@ ClosedCaptionsDialog::update (DCPTime time)
{
shared_ptr<Player> player = _player.lock ();
DCPOMATIC_ASSERT (player);
- list<TextCaption> to_show;
- BOOST_FOREACH (PlayerCaption i, player->closed_captions_for_frame(time)) {
- BOOST_FOREACH (TextCaption j, i.text) {
+ list<StringText> to_show;
+ BOOST_FOREACH (PlayerText i, player->closed_captions_for_frame(time)) {
+ BOOST_FOREACH (StringText j, i.text) {
to_show.push_back (j);
}
}
@@ -109,7 +109,7 @@ ClosedCaptionsDialog::update (DCPTime time)
to_show.sort (ClosedCaptionSorter());
- list<TextCaption>::const_iterator j = to_show.begin();
+ list<StringText>::const_iterator j = to_show.begin();
int k = 0;
while (j != to_show.end() && k < _num_lines) {
_lines[k] = j->text();
diff --git a/src/wx/content_panel.cc b/src/wx/content_panel.cc
index ce9c66a3e..a6338ecfd 100644
--- a/src/wx/content_panel.cc
+++ b/src/wx/content_panel.cc
@@ -22,13 +22,13 @@
#include "wx_util.h"
#include "video_panel.h"
#include "audio_panel.h"
-#include "caption_panel.h"
+#include "text_panel.h"
#include "timing_panel.h"
#include "timeline_dialog.h"
#include "image_sequence_dialog.h"
#include "film_viewer.h"
#include "lib/audio_content.h"
-#include "lib/caption_content.h"
+#include "lib/text_content.h"
#include "lib/video_content.h"
#include "lib/ffmpeg_content.h"
#include "lib/content_factory.h"
@@ -39,8 +39,8 @@
#include "lib/config.h"
#include "lib/log.h"
#include "lib/compose.hpp"
-#include "lib/text_caption_file_content.h"
-#include "lib/text_caption_file.h"
+#include "lib/string_text_file_content.h"
+#include "lib/string_text_file.h"
#include <wx/wx.h>
#include <wx/notebook.h>
#include <wx/listctrl.h>
@@ -128,7 +128,7 @@ ContentPanel::ContentPanel (wxNotebook* n, boost::shared_ptr<Film> film, FilmVie
_audio_panel = new AudioPanel (this);
_panels.push_back (_audio_panel);
for (int i = 0; i < CAPTION_COUNT; ++i) {
- _caption_panel[i] = new CaptionPanel (this, static_cast<CaptionType>(i));
+ _caption_panel[i] = new TextPanel (this, static_cast<TextType>(i));
_panels.push_back (_caption_panel[i]);
}
_timing_panel = new TimingPanel (this, _film_viewer);
@@ -262,11 +262,11 @@ ContentPanel::selection_changed ()
BOOST_FOREACH (shared_ptr<Content> i, selected()) {
DCPTime p;
p = i->position();
- if (dynamic_pointer_cast<TextCaptionFileContent>(i) && i->paths_valid()) {
+ if (dynamic_pointer_cast<StringTextFileContent>(i) && i->paths_valid()) {
/* Rather special case; if we select a text subtitle file jump to its
first subtitle.
*/
- TextCaptionFile ts (dynamic_pointer_cast<TextCaptionFileContent>(i));
+ StringTextFile ts (dynamic_pointer_cast<StringTextFileContent>(i));
if (ts.first()) {
p += DCPTime(ts.first().get(), _film->active_frame_rate_change(i->position()));
}
@@ -306,7 +306,7 @@ ContentPanel::selection_changed ()
if (i->audio) {
have_audio = true;
}
- BOOST_FOREACH (shared_ptr<CaptionContent> j, i->caption) {
+ BOOST_FOREACH (shared_ptr<TextContent> j, i->caption) {
have_caption[j->original_type()] = true;
}
}
diff --git a/src/wx/content_panel.h b/src/wx/content_panel.h
index 3f0fb17a5..d31375c8e 100644
--- a/src/wx/content_panel.h
+++ b/src/wx/content_panel.h
@@ -32,7 +32,7 @@ class wxListEvent;
class TimelineDialog;
class FilmEditor;
class ContentSubPanel;
-class CaptionPanel;
+class TextPanel;
class AudioPanel;
class Film;
class FilmViewer;
@@ -105,7 +105,7 @@ private:
wxButton* _timeline;
ContentSubPanel* _video_panel;
AudioPanel* _audio_panel;
- CaptionPanel* _caption_panel[CAPTION_COUNT];
+ TextPanel* _caption_panel[CAPTION_COUNT];
ContentSubPanel* _timing_panel;
std::list<ContentSubPanel *> _panels;
ContentMenu* _menu;
diff --git a/src/wx/dcp_panel.cc b/src/wx/dcp_panel.cc
index 51881030f..f1f82287d 100644
--- a/src/wx/dcp_panel.cc
+++ b/src/wx/dcp_panel.cc
@@ -32,7 +32,7 @@
#include "lib/ffmpeg_content.h"
#include "lib/audio_processor.h"
#include "lib/video_content.h"
-#include "lib/caption_content.h"
+#include "lib/text_content.h"
#include "lib/dcp_content.h"
#include "lib/audio_content.h"
#include <dcp/locale_convert.h>
@@ -433,8 +433,8 @@ void
DCPPanel::film_content_changed (int property)
{
if (property == AudioContentProperty::STREAMS ||
- property == CaptionContentProperty::USE ||
- property == CaptionContentProperty::BURN ||
+ property == TextContentProperty::USE ||
+ property == TextContentProperty::BURN ||
property == VideoContentProperty::SCALE ||
property == DCPContentProperty::REFERENCE_VIDEO ||
property == DCPContentProperty::REFERENCE_AUDIO ||
diff --git a/src/wx/film_viewer.h b/src/wx/film_viewer.h
index 266509a44..e4449fa2f 100644
--- a/src/wx/film_viewer.h
+++ b/src/wx/film_viewer.h
@@ -24,7 +24,7 @@
#include "lib/film.h"
#include "lib/config.h"
-#include "lib/player_caption.h"
+#include "lib/player_text.h"
#include <RtAudio.h>
#include <wx/wx.h>
diff --git a/src/wx/fonts_dialog.cc b/src/wx/fonts_dialog.cc
index 269dad678..3619b7e0a 100644
--- a/src/wx/fonts_dialog.cc
+++ b/src/wx/fonts_dialog.cc
@@ -24,7 +24,7 @@
#include "font_files_dialog.h"
#include "lib/font.h"
#include "lib/content.h"
-#include "lib/caption_content.h"
+#include "lib/text_content.h"
#include <wx/wx.h>
#include <boost/foreach.hpp>
#include <iostream>
@@ -34,7 +34,7 @@ using std::string;
using std::cout;
using boost::shared_ptr;
-FontsDialog::FontsDialog (wxWindow* parent, shared_ptr<Content> content, shared_ptr<CaptionContent> caption)
+FontsDialog::FontsDialog (wxWindow* parent, shared_ptr<Content> content, shared_ptr<TextContent> caption)
: wxDialog (parent, wxID_ANY, _("Fonts"))
, _content (content)
, _caption (caption)
@@ -100,7 +100,7 @@ void
FontsDialog::setup ()
{
shared_ptr<Content> content = _content.lock ();
- shared_ptr<CaptionContent> caption = _caption.lock ();
+ shared_ptr<TextContent> caption = _caption.lock ();
if (!content || !caption) {
return;
}
@@ -140,7 +140,7 @@ void
FontsDialog::edit_clicked ()
{
shared_ptr<Content> content = _content.lock ();
- shared_ptr<CaptionContent> caption = _caption.lock ();
+ shared_ptr<TextContent> caption = _caption.lock ();
if (!content || !caption) {
return;
}
diff --git a/src/wx/fonts_dialog.h b/src/wx/fonts_dialog.h
index 6c6873ea3..ba98e0963 100644
--- a/src/wx/fonts_dialog.h
+++ b/src/wx/fonts_dialog.h
@@ -25,12 +25,12 @@
#include <boost/filesystem.hpp>
class Content;
-class CaptionContent;
+class TextContent;
class FontsDialog : public wxDialog
{
public:
- FontsDialog (wxWindow* parent, boost::shared_ptr<Content>, boost::shared_ptr<CaptionContent> caption);
+ FontsDialog (wxWindow* parent, boost::shared_ptr<Content>, boost::shared_ptr<TextContent> caption);
private:
void setup ();
@@ -39,7 +39,7 @@ private:
void edit_clicked ();
boost::weak_ptr<Content> _content;
- boost::weak_ptr<CaptionContent> _caption;
+ boost::weak_ptr<TextContent> _caption;
wxListCtrl* _fonts;
wxButton* _edit;
};
diff --git a/src/wx/caption_appearance_dialog.cc b/src/wx/subtitle_appearance_dialog.cc
index af01dcbe8..cab473c18 100644
--- a/src/wx/caption_appearance_dialog.cc
+++ b/src/wx/subtitle_appearance_dialog.cc
@@ -18,10 +18,10 @@
*/
-#include "caption_appearance_dialog.h"
+#include "subtitle_appearance_dialog.h"
#include "rgba_colour_picker.h"
-#include "lib/text_caption_file_content.h"
-#include "lib/caption_content.h"
+#include "lib/string_text_file_content.h"
+#include "lib/text_content.h"
#include "lib/ffmpeg_subtitle_stream.h"
#include "lib/ffmpeg_content.h"
#include <wx/wx.h>
@@ -35,11 +35,11 @@ using boost::bind;
using boost::dynamic_pointer_cast;
using boost::optional;
-int const CaptionAppearanceDialog::NONE = 0;
-int const CaptionAppearanceDialog::OUTLINE = 1;
-int const CaptionAppearanceDialog::SHADOW = 2;
+int const SubtitleAppearanceDialog::NONE = 0;
+int const SubtitleAppearanceDialog::OUTLINE = 1;
+int const SubtitleAppearanceDialog::SHADOW = 2;
-CaptionAppearanceDialog::CaptionAppearanceDialog (wxWindow* parent, shared_ptr<Content> content, shared_ptr<CaptionContent> caption)
+SubtitleAppearanceDialog::SubtitleAppearanceDialog (wxWindow* parent, shared_ptr<Content> content, shared_ptr<TextContent> caption)
: wxDialog (parent, wxID_ANY, _("Caption appearance"))
, _content (content)
, _caption (caption)
@@ -110,7 +110,7 @@ CaptionAppearanceDialog::CaptionAppearanceDialog (wxWindow* parent, shared_ptr<C
overall_sizer->Add (colours_panel, 1, wxEXPAND | wxALL, DCPOMATIC_DIALOG_BORDER);
wxButton* restore = new wxButton (this, wxID_ANY, _("Restore to original colours"));
- restore->Bind (wxEVT_BUTTON, bind (&CaptionAppearanceDialog::restore, this));
+ restore->Bind (wxEVT_BUTTON, bind (&SubtitleAppearanceDialog::restore, this));
overall_sizer->Add (restore, 0, wxALL, DCPOMATIC_SIZER_X_GAP);
}
@@ -179,19 +179,19 @@ CaptionAppearanceDialog::CaptionAppearanceDialog (wxWindow* parent, shared_ptr<C
_outline_width->SetValue (_caption->outline_width ());
- _force_colour->Bind (wxEVT_CHECKBOX, bind (&CaptionAppearanceDialog::setup_sensitivity, this));
- _force_effect_colour->Bind (wxEVT_CHECKBOX, bind (&CaptionAppearanceDialog::setup_sensitivity, this));
- _force_effect->Bind (wxEVT_CHECKBOX, bind (&CaptionAppearanceDialog::setup_sensitivity, this));
- _force_fade_in->Bind (wxEVT_CHECKBOX, bind (&CaptionAppearanceDialog::setup_sensitivity, this));
- _force_fade_out->Bind (wxEVT_CHECKBOX, bind (&CaptionAppearanceDialog::setup_sensitivity, this));
- _effect->Bind (wxEVT_CHOICE, bind (&CaptionAppearanceDialog::setup_sensitivity, this));
- _content_connection = _content->Changed.connect (bind (&CaptionAppearanceDialog::setup_sensitivity, this));
+ _force_colour->Bind (wxEVT_CHECKBOX, bind (&SubtitleAppearanceDialog::setup_sensitivity, this));
+ _force_effect_colour->Bind (wxEVT_CHECKBOX, bind (&SubtitleAppearanceDialog::setup_sensitivity, this));
+ _force_effect->Bind (wxEVT_CHECKBOX, bind (&SubtitleAppearanceDialog::setup_sensitivity, this));
+ _force_fade_in->Bind (wxEVT_CHECKBOX, bind (&SubtitleAppearanceDialog::setup_sensitivity, this));
+ _force_fade_out->Bind (wxEVT_CHECKBOX, bind (&SubtitleAppearanceDialog::setup_sensitivity, this));
+ _effect->Bind (wxEVT_CHOICE, bind (&SubtitleAppearanceDialog::setup_sensitivity, this));
+ _content_connection = _content->Changed.connect (bind (&SubtitleAppearanceDialog::setup_sensitivity, this));
setup_sensitivity ();
}
wxCheckBox*
-CaptionAppearanceDialog::set_to (wxWindow* w, int& r)
+SubtitleAppearanceDialog::set_to (wxWindow* w, int& r)
{
wxSizer* s = new wxBoxSizer (wxHORIZONTAL);
wxCheckBox* set_to = new wxCheckBox (this, wxID_ANY, _("Set to"));
@@ -203,7 +203,7 @@ CaptionAppearanceDialog::set_to (wxWindow* w, int& r)
}
void
-CaptionAppearanceDialog::apply ()
+SubtitleAppearanceDialog::apply ()
{
if (_force_colour->GetValue ()) {
wxColour const c = _colour->GetColour ();
@@ -257,7 +257,7 @@ CaptionAppearanceDialog::apply ()
}
void
-CaptionAppearanceDialog::restore ()
+SubtitleAppearanceDialog::restore ()
{
for (map<RGBA, RGBAColourPicker*>::const_iterator i = _pickers.begin(); i != _pickers.end(); ++i) {
i->second->set (i->first);
@@ -265,7 +265,7 @@ CaptionAppearanceDialog::restore ()
}
void
-CaptionAppearanceDialog::setup_sensitivity ()
+SubtitleAppearanceDialog::setup_sensitivity ()
{
_colour->Enable (_force_colour->GetValue ());
_effect_colour->Enable (_force_effect_colour->GetValue ());
diff --git a/src/wx/caption_appearance_dialog.h b/src/wx/subtitle_appearance_dialog.h
index 3fb993099..6cced717b 100644
--- a/src/wx/caption_appearance_dialog.h
+++ b/src/wx/subtitle_appearance_dialog.h
@@ -33,10 +33,10 @@ class FFmpegSubtitleStream;
class wxCheckBox;
class wxWidget;
-class CaptionAppearanceDialog : public wxDialog
+class SubtitleAppearanceDialog : public wxDialog
{
public:
- CaptionAppearanceDialog (wxWindow* parent, boost::shared_ptr<Content> content, boost::shared_ptr<CaptionContent> caption);
+ SubtitleAppearanceDialog (wxWindow* parent, boost::shared_ptr<Content> content, boost::shared_ptr<TextContent> caption);
void apply ();
@@ -60,7 +60,7 @@ private:
std::map<RGBA, RGBAColourPicker*> _pickers;
boost::shared_ptr<Content> _content;
- boost::shared_ptr<CaptionContent> _caption;
+ boost::shared_ptr<TextContent> _caption;
boost::shared_ptr<FFmpegSubtitleStream> _stream;
boost::signals2::scoped_connection _content_connection;
diff --git a/src/wx/caption_panel.cc b/src/wx/text_panel.cc
index 1d2f59258..bc1183443 100644
--- a/src/wx/caption_panel.cc
+++ b/src/wx/text_panel.cc
@@ -18,21 +18,21 @@
*/
-#include "caption_panel.h"
+#include "text_panel.h"
#include "film_editor.h"
#include "wx_util.h"
-#include "caption_view.h"
+#include "text_view.h"
#include "content_panel.h"
#include "fonts_dialog.h"
-#include "caption_appearance_dialog.h"
+#include "subtitle_appearance_dialog.h"
#include "lib/ffmpeg_content.h"
-#include "lib/text_caption_file_content.h"
+#include "lib/string_text_file_content.h"
#include "lib/ffmpeg_subtitle_stream.h"
#include "lib/dcp_subtitle_content.h"
-#include "lib/text_caption_file_decoder.h"
+#include "lib/string_text_file_decoder.h"
#include "lib/dcp_subtitle_decoder.h"
#include "lib/dcp_content.h"
-#include "lib/caption_content.h"
+#include "lib/text_content.h"
#include "lib/decoder_factory.h"
#include <wx/spinctrl.h>
#include <boost/foreach.hpp>
@@ -44,7 +44,7 @@ using std::cout;
using boost::shared_ptr;
using boost::dynamic_pointer_cast;
-CaptionPanel::CaptionPanel (ContentPanel* p, CaptionType t)
+TextPanel::TextPanel (ContentPanel* p, TextType t)
: ContentSubPanel (p, std_to_wx(caption_type_to_name(t)))
, _caption_view (0)
, _fonts_dialog (0)
@@ -163,24 +163,24 @@ CaptionPanel::CaptionPanel (ContentPanel* p, CaptionType t)
_y_scale->SetRange (10, 1000);
_line_spacing->SetRange (10, 1000);
- _reference->Bind (wxEVT_CHECKBOX, boost::bind (&CaptionPanel::reference_clicked, this));
- _use->Bind (wxEVT_CHECKBOX, boost::bind (&CaptionPanel::use_toggled, this));
- _type->Bind (wxEVT_CHOICE, boost::bind (&CaptionPanel::type_changed, this));
- _burn->Bind (wxEVT_CHECKBOX, boost::bind (&CaptionPanel::burn_toggled, this));
- _x_offset->Bind (wxEVT_SPINCTRL, boost::bind (&CaptionPanel::x_offset_changed, this));
- _y_offset->Bind (wxEVT_SPINCTRL, boost::bind (&CaptionPanel::y_offset_changed, this));
- _x_scale->Bind (wxEVT_SPINCTRL, boost::bind (&CaptionPanel::x_scale_changed, this));
- _y_scale->Bind (wxEVT_SPINCTRL, boost::bind (&CaptionPanel::y_scale_changed, this));
- _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));
- _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));
+ _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));
+ _language->Bind (wxEVT_TEXT, boost::bind (&TextPanel::language_changed, this));
+ _stream->Bind (wxEVT_CHOICE, boost::bind (&TextPanel::stream_changed, this));
+ _caption_view_button->Bind (wxEVT_BUTTON, boost::bind (&TextPanel::caption_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));
}
void
-CaptionPanel::film_changed (Film::Property property)
+TextPanel::film_changed (Film::Property property)
{
if (property == Film::CONTENT || property == Film::REEL_TYPE) {
setup_sensitivity ();
@@ -188,7 +188,7 @@ CaptionPanel::film_changed (Film::Property property)
}
void
-CaptionPanel::film_content_changed (int property)
+TextPanel::film_content_changed (int property)
{
FFmpegContentList fc = _parent->selected_ffmpeg ();
ContentList sc = _parent->selected_caption ();
@@ -203,7 +203,7 @@ CaptionPanel::film_content_changed (int property)
scs = sc.front ();
}
- shared_ptr<CaptionContent> caption;
+ shared_ptr<TextContent> caption;
if (scs) {
caption = scs->caption_of_original_type(_original_type);
}
@@ -223,10 +223,10 @@ CaptionPanel::film_content_changed (int property)
}
}
setup_sensitivity ();
- } else if (property == CaptionContentProperty::USE) {
+ } else if (property == TextContentProperty::USE) {
checked_set (_use, caption ? caption->use() : false);
setup_sensitivity ();
- } else if (property == CaptionContentProperty::TYPE) {
+ } else if (property == TextContentProperty::TYPE) {
if (caption) {
switch (caption->type()) {
case CAPTION_OPEN:
@@ -242,19 +242,19 @@ CaptionPanel::film_content_changed (int property)
_type->SetSelection (0);
}
setup_sensitivity ();
- } else if (property == CaptionContentProperty::BURN) {
+ } else if (property == TextContentProperty::BURN) {
checked_set (_burn, caption ? caption->burn() : false);
- } else if (property == CaptionContentProperty::X_OFFSET) {
+ } else if (property == TextContentProperty::X_OFFSET) {
checked_set (_x_offset, caption ? lrint (caption->x_offset() * 100) : 0);
- } else if (property == CaptionContentProperty::Y_OFFSET) {
+ } else if (property == TextContentProperty::Y_OFFSET) {
checked_set (_y_offset, caption ? lrint (caption->y_offset() * 100) : 0);
- } else if (property == CaptionContentProperty::X_SCALE) {
+ } else if (property == TextContentProperty::X_SCALE) {
checked_set (_x_scale, caption ? lrint (caption->x_scale() * 100) : 100);
- } else if (property == CaptionContentProperty::Y_SCALE) {
+ } else if (property == TextContentProperty::Y_SCALE) {
checked_set (_y_scale, caption ? lrint (caption->y_scale() * 100) : 100);
- } else if (property == CaptionContentProperty::LINE_SPACING) {
+ } else if (property == TextContentProperty::LINE_SPACING) {
checked_set (_line_spacing, caption ? lrint (caption->line_spacing() * 100) : 100);
- } else if (property == CaptionContentProperty::LANGUAGE) {
+ } else if (property == TextContentProperty::LANGUAGE) {
checked_set (_language, caption ? caption->language() : "");
} else if (property == DCPContentProperty::REFERENCE_CAPTION) {
if (scs) {
@@ -271,7 +271,7 @@ CaptionPanel::film_content_changed (int property)
}
void
-CaptionPanel::use_toggled ()
+TextPanel::use_toggled ()
{
BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_caption()) {
i->caption_of_original_type(_original_type)->set_use (_use->GetValue());
@@ -279,7 +279,7 @@ CaptionPanel::use_toggled ()
}
void
-CaptionPanel::type_changed ()
+TextPanel::type_changed ()
{
BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_caption()) {
switch (_type->GetSelection()) {
@@ -294,7 +294,7 @@ CaptionPanel::type_changed ()
}
void
-CaptionPanel::burn_toggled ()
+TextPanel::burn_toggled ()
{
BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_caption ()) {
i->caption_of_original_type(_original_type)->set_burn (_burn->GetValue());
@@ -302,7 +302,7 @@ CaptionPanel::burn_toggled ()
}
void
-CaptionPanel::setup_sensitivity ()
+TextPanel::setup_sensitivity ()
{
int any_subs = 0;
int ffmpeg_subs = 0;
@@ -310,7 +310,7 @@ CaptionPanel::setup_sensitivity ()
BOOST_FOREACH (shared_ptr<Content> i, sel) {
/* These are the content types that could include subtitles */
shared_ptr<const FFmpegContent> fc = boost::dynamic_pointer_cast<const FFmpegContent> (i);
- shared_ptr<const TextCaptionFileContent> sc = boost::dynamic_pointer_cast<const TextCaptionFileContent> (i);
+ shared_ptr<const StringTextFileContent> sc = boost::dynamic_pointer_cast<const StringTextFileContent> (i);
shared_ptr<const DCPContent> dc = boost::dynamic_pointer_cast<const DCPContent> (i);
shared_ptr<const DCPSubtitleContent> dsc = boost::dynamic_pointer_cast<const DCPSubtitleContent> (i);
if (fc) {
@@ -355,7 +355,7 @@ CaptionPanel::setup_sensitivity ()
}
void
-CaptionPanel::stream_changed ()
+TextPanel::stream_changed ()
{
FFmpegContentList fc = _parent->selected_ffmpeg ();
if (fc.size() != 1) {
@@ -377,7 +377,7 @@ CaptionPanel::stream_changed ()
}
void
-CaptionPanel::x_offset_changed ()
+TextPanel::x_offset_changed ()
{
BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_caption ()) {
i->caption_of_original_type(_original_type)->set_x_offset (_x_offset->GetValue() / 100.0);
@@ -385,7 +385,7 @@ CaptionPanel::x_offset_changed ()
}
void
-CaptionPanel::y_offset_changed ()
+TextPanel::y_offset_changed ()
{
BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_caption ()) {
i->caption_of_original_type(_original_type)->set_y_offset (_y_offset->GetValue() / 100.0);
@@ -393,7 +393,7 @@ CaptionPanel::y_offset_changed ()
}
void
-CaptionPanel::x_scale_changed ()
+TextPanel::x_scale_changed ()
{
ContentList c = _parent->selected_caption ();
if (c.size() == 1) {
@@ -402,7 +402,7 @@ CaptionPanel::x_scale_changed ()
}
void
-CaptionPanel::y_scale_changed ()
+TextPanel::y_scale_changed ()
{
BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_caption ()) {
i->caption_of_original_type(_original_type)->set_y_scale (_y_scale->GetValue() / 100.0);
@@ -410,7 +410,7 @@ CaptionPanel::y_scale_changed ()
}
void
-CaptionPanel::line_spacing_changed ()
+TextPanel::line_spacing_changed ()
{
BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_caption ()) {
i->caption_of_original_type(_original_type)->set_line_spacing (_line_spacing->GetValue() / 100.0);
@@ -418,7 +418,7 @@ CaptionPanel::line_spacing_changed ()
}
void
-CaptionPanel::language_changed ()
+TextPanel::language_changed ()
{
BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_caption ()) {
i->caption_of_original_type(_original_type)->set_language (wx_to_std (_language->GetValue()));
@@ -426,24 +426,24 @@ CaptionPanel::language_changed ()
}
void
-CaptionPanel::content_selection_changed ()
+TextPanel::content_selection_changed ()
{
film_content_changed (FFmpegContentProperty::SUBTITLE_STREAMS);
- film_content_changed (CaptionContentProperty::USE);
- film_content_changed (CaptionContentProperty::BURN);
- film_content_changed (CaptionContentProperty::X_OFFSET);
- film_content_changed (CaptionContentProperty::Y_OFFSET);
- film_content_changed (CaptionContentProperty::X_SCALE);
- film_content_changed (CaptionContentProperty::Y_SCALE);
- film_content_changed (CaptionContentProperty::LINE_SPACING);
- film_content_changed (CaptionContentProperty::LANGUAGE);
- film_content_changed (CaptionContentProperty::FONTS);
- film_content_changed (CaptionContentProperty::TYPE);
+ 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 (TextContentProperty::TYPE);
film_content_changed (DCPContentProperty::REFERENCE_CAPTION);
}
void
-CaptionPanel::caption_view_clicked ()
+TextPanel::caption_view_clicked ()
{
if (_caption_view) {
_caption_view->Destroy ();
@@ -456,13 +456,13 @@ CaptionPanel::caption_view_clicked ()
shared_ptr<Decoder> decoder = decoder_factory (c.front(), _parent->film()->log(), false);
if (decoder) {
- _caption_view = new CaptionView (this, _parent->film(), c.front(), c.front()->caption_of_original_type(_original_type), decoder, _parent->film_viewer());
+ _caption_view = new TextView (this, _parent->film(), c.front(), c.front()->caption_of_original_type(_original_type), decoder, _parent->film_viewer());
_caption_view->Show ();
}
}
void
-CaptionPanel::fonts_dialog_clicked ()
+TextPanel::fonts_dialog_clicked ()
{
if (_fonts_dialog) {
_fonts_dialog->Destroy ();
@@ -477,7 +477,7 @@ CaptionPanel::fonts_dialog_clicked ()
}
void
-CaptionPanel::reference_clicked ()
+TextPanel::reference_clicked ()
{
ContentList c = _parent->selected ();
if (c.size() != 1) {
@@ -493,12 +493,12 @@ CaptionPanel::reference_clicked ()
}
void
-CaptionPanel::appearance_dialog_clicked ()
+TextPanel::appearance_dialog_clicked ()
{
ContentList c = _parent->selected_caption ();
DCPOMATIC_ASSERT (c.size() == 1);
- CaptionAppearanceDialog* d = new CaptionAppearanceDialog (this, c.front(), c.front()->caption_of_original_type(_original_type));
+ SubtitleAppearanceDialog* d = new SubtitleAppearanceDialog (this, c.front(), c.front()->caption_of_original_type(_original_type));
if (d->ShowModal () == wxID_OK) {
d->apply ();
}
diff --git a/src/wx/caption_panel.h b/src/wx/text_panel.h
index 20af29d7e..70d46dacd 100644
--- a/src/wx/caption_panel.h
+++ b/src/wx/text_panel.h
@@ -22,13 +22,13 @@
class wxCheckBox;
class wxSpinCtrl;
-class CaptionView;
+class TextView;
class FontsDialog;
-class CaptionPanel : public ContentSubPanel
+class TextPanel : public ContentSubPanel
{
public:
- CaptionPanel (ContentPanel *, CaptionType t);
+ TextPanel (ContentPanel *, TextType t);
void film_changed (Film::Property);
void film_content_changed (int);
@@ -65,9 +65,9 @@ private:
wxTextCtrl* _language;
wxChoice* _stream;
wxButton* _caption_view_button;
- CaptionView* _caption_view;
+ TextView* _caption_view;
wxButton* _fonts_dialog_button;
FontsDialog* _fonts_dialog;
wxButton* _appearance_dialog_button;
- CaptionType _original_type;
+ TextType _original_type;
};
diff --git a/src/wx/caption_view.cc b/src/wx/text_view.cc
index e6e63efff..583632dd0 100644
--- a/src/wx/caption_view.cc
+++ b/src/wx/text_view.cc
@@ -18,15 +18,15 @@
*/
-#include "lib/text_caption_file_decoder.h"
-#include "lib/content_caption.h"
+#include "lib/string_text_file_decoder.h"
+#include "lib/content_text.h"
#include "lib/video_decoder.h"
#include "lib/audio_decoder.h"
#include "lib/film.h"
#include "lib/config.h"
-#include "lib/text_caption_file_content.h"
-#include "lib/caption_decoder.h"
-#include "caption_view.h"
+#include "lib/string_text_file_content.h"
+#include "lib/text_decoder.h"
+#include "text_view.h"
#include "film_viewer.h"
#include "wx_util.h"
@@ -35,7 +35,7 @@ using boost::shared_ptr;
using boost::bind;
using boost::dynamic_pointer_cast;
-CaptionView::CaptionView (wxWindow* parent, shared_ptr<Film> film, shared_ptr<Content> content, shared_ptr<CaptionContent> caption, shared_ptr<Decoder> decoder, FilmViewer* viewer)
+TextView::TextView (wxWindow* parent, shared_ptr<Film> film, shared_ptr<Content> content, shared_ptr<TextContent> caption, shared_ptr<Decoder> decoder, FilmViewer* viewer)
: wxDialog (parent, wxID_ANY, _("Captions"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
, _content (content)
, _film_viewer (viewer)
@@ -69,7 +69,7 @@ CaptionView::CaptionView (wxWindow* parent, shared_ptr<Film> film, shared_ptr<Co
wxBoxSizer* sizer = new wxBoxSizer (wxVERTICAL);
sizer->Add (_list, 1, wxEXPAND | wxALL, DCPOMATIC_SIZER_X_GAP);
- _list->Bind (wxEVT_LIST_ITEM_SELECTED, boost::bind (&CaptionView::subtitle_selected, this, _1));
+ _list->Bind (wxEVT_LIST_ITEM_SELECTED, boost::bind (&TextView::subtitle_selected, this, _1));
wxSizer* buttons = CreateSeparatedButtonSizer (wxOK);
if (buttons) {
@@ -86,11 +86,11 @@ CaptionView::CaptionView (wxWindow* parent, shared_ptr<Film> film, shared_ptr<Co
_subs = 0;
_frc = film->active_frame_rate_change (content->position());
- /* Find the decoder that is being used for our CaptionContent and attach to it */
- BOOST_FOREACH (shared_ptr<CaptionDecoder> i, decoder->caption) {
+ /* Find the decoder that is being used for our TextContent and attach to it */
+ BOOST_FOREACH (shared_ptr<TextDecoder> i, decoder->caption) {
if (i->content() == caption) {
- i->PlainStart.connect (bind (&CaptionView::data_start, this, _1));
- i->Stop.connect (bind (&CaptionView::data_stop, this, _1));
+ i->PlainStart.connect (bind (&TextView::data_start, this, _1));
+ i->Stop.connect (bind (&TextView::data_stop, this, _1));
}
}
while (!decoder->pass ()) {}
@@ -98,7 +98,7 @@ CaptionView::CaptionView (wxWindow* parent, shared_ptr<Film> film, shared_ptr<Co
}
void
-CaptionView::data_start (ContentTextCaption cts)
+TextView::data_start (ContentStringText cts)
{
BOOST_FOREACH (dcp::SubtitleString const & i, cts.subs) {
wxListItem list_item;
@@ -114,7 +114,7 @@ CaptionView::data_start (ContentTextCaption cts)
}
void
-CaptionView::data_stop (ContentTime time)
+TextView::data_stop (ContentTime time)
{
if (!_last_count) {
return;
@@ -126,7 +126,7 @@ CaptionView::data_stop (ContentTime time)
}
void
-CaptionView::subtitle_selected (wxListEvent& ev)
+TextView::subtitle_selected (wxListEvent& ev)
{
if (!Config::instance()->jump_to_selected ()) {
return;
diff --git a/src/wx/caption_view.h b/src/wx/text_view.h
index 71c492ad6..8cec8d284 100644
--- a/src/wx/caption_view.h
+++ b/src/wx/text_view.h
@@ -18,7 +18,7 @@
*/
-#include "lib/content_caption.h"
+#include "lib/content_text.h"
#include <boost/shared_ptr.hpp>
#include <wx/wx.h>
#include <wx/listctrl.h>
@@ -26,15 +26,15 @@
class Decoder;
class FilmViewer;
-class CaptionView : public wxDialog
+class TextView : public wxDialog
{
public:
- CaptionView (
- wxWindow *, boost::shared_ptr<Film>, boost::shared_ptr<Content> content, boost::shared_ptr<CaptionContent> caption, boost::shared_ptr<Decoder>, FilmViewer* viewer
+ TextView (
+ wxWindow *, boost::shared_ptr<Film>, boost::shared_ptr<Content> content, boost::shared_ptr<TextContent> caption, boost::shared_ptr<Decoder>, FilmViewer* viewer
);
private:
- void data_start (ContentTextCaption cts);
+ void data_start (ContentStringText cts);
void data_stop (ContentTime time);
void subtitle_selected (wxListEvent &);
diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc
index f7a31117b..b0a3a7247 100644
--- a/src/wx/timeline.cc
+++ b/src/wx/timeline.cc
@@ -34,7 +34,7 @@
#include "lib/image_content.h"
#include "lib/timer.h"
#include "lib/audio_content.h"
-#include "lib/caption_content.h"
+#include "lib/text_content.h"
#include "lib/video_content.h"
#include "lib/atmos_mxf_content.h"
#include <wx/graphics.h>
@@ -228,7 +228,7 @@ Timeline::recreate_views ()
_views.push_back (shared_ptr<TimelineView> (new TimelineAudioContentView (*this, i)));
}
- BOOST_FOREACH (shared_ptr<CaptionContent> j, i->caption) {
+ BOOST_FOREACH (shared_ptr<TextContent> j, i->caption) {
_views.push_back (shared_ptr<TimelineView> (new TimelineTextContentView (*this, i, j)));
}
diff --git a/src/wx/timeline_text_content_view.cc b/src/wx/timeline_text_content_view.cc
index 30158941c..934bf1fc4 100644
--- a/src/wx/timeline_text_content_view.cc
+++ b/src/wx/timeline_text_content_view.cc
@@ -19,12 +19,12 @@
*/
#include "timeline_text_content_view.h"
-#include "lib/caption_content.h"
+#include "lib/text_content.h"
#include "lib/content.h"
using boost::shared_ptr;
-TimelineTextContentView::TimelineTextContentView (Timeline& tl, shared_ptr<Content> c, shared_ptr<CaptionContent> caption)
+TimelineTextContentView::TimelineTextContentView (Timeline& tl, shared_ptr<Content> c, shared_ptr<TextContent> caption)
: TimelineContentView (tl, c)
, _caption (caption)
{
diff --git a/src/wx/timeline_text_content_view.h b/src/wx/timeline_text_content_view.h
index 4f69f2aef..055c84143 100644
--- a/src/wx/timeline_text_content_view.h
+++ b/src/wx/timeline_text_content_view.h
@@ -21,7 +21,7 @@
#include "timeline_content_view.h"
class TextContent;
-class CaptionContent;
+class TextContent;
/** @class TimelineTextContentView
* @brief Timeline view for TextContent.
@@ -29,12 +29,12 @@ class CaptionContent;
class TimelineTextContentView : public TimelineContentView
{
public:
- TimelineTextContentView (Timeline& tl, boost::shared_ptr<Content>, boost::shared_ptr<CaptionContent>);
+ TimelineTextContentView (Timeline& tl, boost::shared_ptr<Content>, boost::shared_ptr<TextContent>);
private:
bool active () const;
wxColour background_colour () const;
wxColour foreground_colour () const;
- boost::shared_ptr<CaptionContent> _caption;
+ boost::shared_ptr<TextContent> _caption;
};
diff --git a/src/wx/timing_panel.cc b/src/wx/timing_panel.cc
index 9bb608cb2..bf987e51e 100644
--- a/src/wx/timing_panel.cc
+++ b/src/wx/timing_panel.cc
@@ -26,10 +26,10 @@
#include "move_to_dialog.h"
#include "lib/content.h"
#include "lib/image_content.h"
-#include "lib/caption_content.h"
+#include "lib/text_content.h"
#include "lib/dcp_subtitle_content.h"
#include "lib/audio_content.h"
-#include "lib/text_caption_file_content.h"
+#include "lib/string_text_file_content.h"
#include "lib/video_content.h"
#include <dcp/locale_convert.h>
#include <boost/foreach.hpp>
diff --git a/src/wx/wscript b/src/wx/wscript
index 5668a7558..0a32d1dfe 100644
--- a/src/wx/wscript
+++ b/src/wx/wscript
@@ -32,9 +32,9 @@ sources = """
audio_panel.cc
audio_plot.cc
batch_job_view.cc
- caption_appearance_dialog.cc
- caption_panel.cc
- caption_view.cc
+ subtitle_appearance_dialog.cc
+ text_panel.cc
+ text_view.cc
cinema_dialog.cc
colour_conversion_editor.cc
config_dialog.cc