#include "timeline_dialog.h"
#include "audio_mapping_view.h"
#include "timing_panel.h"
+#include "subtitle_panel.h"
using std::string;
using std::cout;
_dcp_frame_rate->Connect (wxID_ANY, wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler (FilmEditor::dcp_frame_rate_changed), 0, this);
_best_dcp_frame_rate->Connect (wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (FilmEditor::best_dcp_frame_rate_clicked), 0, this);
_dcp_audio_channels->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (FilmEditor::dcp_audio_channels_changed), 0, this);
- _with_subtitles->Connect (wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler (FilmEditor::with_subtitles_toggled), 0, this);
- _subtitle_offset->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (FilmEditor::subtitle_offset_changed), 0, this);
- _subtitle_scale->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (FilmEditor::subtitle_scale_changed), 0, this);
_j2k_bandwidth->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (FilmEditor::j2k_bandwidth_changed), 0, this);
_audio_gain->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (FilmEditor::audio_gain_changed), 0, this);
_audio_gain_calculate_button->Connect (
_show_audio->Connect (wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (FilmEditor::show_audio_clicked), 0, this);
_audio_delay->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (FilmEditor::audio_delay_changed), 0, this);
_audio_stream->Connect (wxID_ANY, wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler (FilmEditor::audio_stream_changed), 0, this);
- _subtitle_stream->Connect (wxID_ANY, wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler (FilmEditor::subtitle_stream_changed), 0, this);
_dcp_resolution->Connect (wxID_ANY, wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler (FilmEditor::dcp_resolution_changed), 0, this);
_sequence_video->Connect (wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler (FilmEditor::sequence_video_changed), 0, this);
_content_notebook->AddPage (_video_panel, _("Video"), false);
make_audio_panel ();
_content_notebook->AddPage (_audio_panel, _("Audio"), false);
- make_subtitle_panel ();
- _content_notebook->AddPage (_subtitle_panel, _("Subtitles"), false);
+ _subtitle_panel = new SubtitlePanel (this);
_timing_panel = new TimingPanel (this);
}
_audio_delay->SetRange (-1000, 1000);
}
-void
-FilmEditor::make_subtitle_panel ()
-{
- _subtitle_panel = new wxPanel (_content_notebook);
- wxBoxSizer* subtitle_sizer = new wxBoxSizer (wxVERTICAL);
- _subtitle_panel->SetSizer (subtitle_sizer);
- wxFlexGridSizer* grid = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
- subtitle_sizer->Add (grid, 0, wxALL, 8);
-
- _with_subtitles = new wxCheckBox (_subtitle_panel, wxID_ANY, _("With Subtitles"));
- grid->Add (_with_subtitles, 1);
- grid->AddSpacer (0);
-
- {
- add_label_to_sizer (grid, _subtitle_panel, _("Subtitle Offset"), true);
- wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
- _subtitle_offset = new wxSpinCtrl (_subtitle_panel);
- s->Add (_subtitle_offset);
- add_label_to_sizer (s, _subtitle_panel, _("%"), false);
- grid->Add (s);
- }
-
- {
- add_label_to_sizer (grid, _subtitle_panel, _("Subtitle Scale"), true);
- wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
- _subtitle_scale = new wxSpinCtrl (_subtitle_panel);
- s->Add (_subtitle_scale);
- add_label_to_sizer (s, _subtitle_panel, _("%"), false);
- grid->Add (s);
- }
-
- add_label_to_sizer (grid, _subtitle_panel, _("Subtitle Stream"), true);
- _subtitle_stream = new wxChoice (_subtitle_panel, wxID_ANY);
- grid->Add (_subtitle_stream, 1, wxEXPAND);
-
- _subtitle_offset->SetRange (-100, 100);
- _subtitle_scale->SetRange (1, 1000);
- _subtitle_scale->SetValue (100);
-}
-
/** Called when the left crop widget has been changed */
void
FilmEditor::left_crop_changed (wxCommandEvent &)
_film->set_name (string (_name->GetValue().mb_str()));
}
-void
-FilmEditor::subtitle_offset_changed (wxCommandEvent &)
-{
- shared_ptr<SubtitleContent> c = selected_subtitle_content ();
- if (!c) {
- return;
- }
-
- c->set_subtitle_offset (_subtitle_offset->GetValue() / 100.0);
-}
-
-void
-FilmEditor::subtitle_scale_changed (wxCommandEvent &)
-{
- shared_ptr<SubtitleContent> c = selected_subtitle_content ();
- if (!c) {
- return;
- }
-
- c->set_subtitle_scale (_subtitle_scale->GetValue() / 100.0);
-}
-
void
FilmEditor::j2k_bandwidth_changed (wxCommandEvent &)
{
}
stringstream s;
+
+ _subtitle_panel->film_changed (p);
+ _timing_panel->film_changed (p);
switch (p) {
case Film::NONE:
break;
case Film::CONTENT:
setup_content ();
- setup_subtitle_control_sensitivity ();
setup_show_audio_sensitivity ();
break;
case Film::CONTAINER:
checked_set (_name, _film->name());
setup_dcp_name ();
break;
+ case Film::WITH_SUBTITLES:
+ setup_dcp_name ();
+ break;
case Film::DCP_CONTENT_TYPE:
checked_set (_dcp_content_type, DCPContentType::as_index (_film->dcp_content_type ()));
setup_dcp_name ();
case Film::SCALER:
checked_set (_scaler, Scaler::as_index (_film->scaler ()));
break;
- case Film::WITH_SUBTITLES:
- checked_set (_with_subtitles, _film->with_subtitles ());
- setup_subtitle_control_sensitivity ();
- setup_dcp_name ();
- break;
case Film::RESOLUTION:
checked_set (_dcp_resolution, _film->resolution() == RESOLUTION_2K ? 0 : 1);
setup_dcp_name ();
ffmpeg_content = dynamic_pointer_cast<FFmpegContent> (content);
}
- _timing_panel->film_content_changed (content, property);
+ _subtitle_panel->film_content_changed (content, subtitle_content, ffmpeg_content, property);
+ _timing_panel->film_content_changed (content, subtitle_content, ffmpeg_content, property);
/* We can't use case {} here */
checked_set (_audio_delay, audio_content ? audio_content->audio_delay() : 0);
} else if (property == AudioContentProperty::AUDIO_MAPPING) {
_audio_mapping->set (audio_content ? audio_content->audio_mapping () : AudioMapping ());
- } else if (property == FFmpegContentProperty::SUBTITLE_STREAMS) {
- _subtitle_stream->Clear ();
- if (ffmpeg_content) {
- vector<shared_ptr<FFmpegSubtitleStream> > s = ffmpeg_content->subtitle_streams ();
- for (vector<shared_ptr<FFmpegSubtitleStream> >::iterator i = s.begin(); i != s.end(); ++i) {
- _subtitle_stream->Append (std_to_wx ((*i)->name), new wxStringClientData (std_to_wx (lexical_cast<string> ((*i)->id))));
- }
-
- if (ffmpeg_content->subtitle_stream()) {
- checked_set (_subtitle_stream, lexical_cast<string> (ffmpeg_content->subtitle_stream()->id));
- } else {
- _subtitle_stream->SetSelection (wxNOT_FOUND);
- }
- }
- setup_subtitle_control_sensitivity ();
} else if (property == FFmpegContentProperty::AUDIO_STREAMS) {
_audio_stream->Clear ();
if (ffmpeg_content) {
}
_dcp_sizer->Layout ();
}
- } else if (property == SubtitleContentProperty::SUBTITLE_OFFSET) {
- checked_set (_subtitle_offset, subtitle_content ? (subtitle_content->subtitle_offset() * 100) : 0);
- } else if (property == SubtitleContentProperty::SUBTITLE_SCALE) {
- checked_set (_subtitle_scale, subtitle_content ? (subtitle_content->subtitle_scale() * 100) : 100);
}
}
_audio_delay->Enable (s);
_container->Enable (s);
- setup_subtitle_control_sensitivity ();
+ _subtitle_panel->setup_control_sensitivity ();
setup_show_audio_sensitivity ();
setup_content_sensitivity ();
_best_dcp_frame_rate->Enable (s && _film && _film->best_dcp_video_frame_rate () != _film->dcp_video_frame_rate ());
_dcp_sizer->Layout ();
}
-void
-FilmEditor::with_subtitles_toggled (wxCommandEvent &)
-{
- if (!_film) {
- return;
- }
-
- _film->set_with_subtitles (_with_subtitles->GetValue ());
-}
-
-void
-FilmEditor::setup_subtitle_control_sensitivity ()
-{
- bool h = false;
- if (_generally_sensitive && _film) {
- h = _film->has_subtitles ();
- }
-
- _with_subtitles->Enable (h);
-
- bool j = false;
- if (_film) {
- j = _film->with_subtitles ();
- }
-
- _subtitle_offset->Enable (j);
- _subtitle_scale->Enable (j);
- _subtitle_stream->Enable (j);
-}
-
void
FilmEditor::use_dci_name_toggled (wxCommandEvent &)
{
}
}
-
-
-void
-FilmEditor::subtitle_stream_changed (wxCommandEvent &)
-{
- shared_ptr<Content> c = selected_content ();
- if (!c) {
- return;
- }
-
- shared_ptr<FFmpegContent> fc = dynamic_pointer_cast<FFmpegContent> (c);
- if (!fc) {
- return;
- }
-
- vector<shared_ptr<FFmpegSubtitleStream> > a = fc->subtitle_streams ();
- vector<shared_ptr<FFmpegSubtitleStream> >::iterator i = a.begin ();
- string const s = string_client_data (_subtitle_stream->GetClientObject (_subtitle_stream->GetSelection ()));
- while (i != a.end() && lexical_cast<string> ((*i)->id) != s) {
- ++i;
- }
-
- if (i != a.end ()) {
- fc->set_subtitle_stream (*i);
- }
-}
-
void
FilmEditor::audio_mapping_changed (AudioMapping m)
{
class Ratio;
class Timecode;
class TimingPanel;
+class SubtitlePanel;
/** @class FilmEditor
* @brief A wx widget to edit a film's metadata, and perform various functions.
}
boost::shared_ptr<Content> selected_content ();
+ boost::shared_ptr<SubtitleContent> selected_subtitle_content ();
+
+ bool generally_sensitive () const {
+ return _generally_sensitive;
+ }
private:
void make_dcp_panel ();
void make_content_panel ();
void make_video_panel ();
void make_audio_panel ();
- void make_subtitle_panel ();
void connect_to_widgets ();
/* Handle changes to the view */
void audio_gain_calculate_button_clicked (wxCommandEvent &);
void show_audio_clicked (wxCommandEvent &);
void audio_delay_changed (wxCommandEvent &);
- void with_subtitles_toggled (wxCommandEvent &);
- void subtitle_offset_changed (wxCommandEvent &);
- void subtitle_scale_changed (wxCommandEvent &);
void j2k_bandwidth_changed (wxCommandEvent &);
void dcp_frame_rate_changed (wxCommandEvent &);
void best_dcp_frame_rate_clicked (wxCommandEvent &);
void edit_filters_clicked (wxCommandEvent &);
void content_timeline_clicked (wxCommandEvent &);
void audio_stream_changed (wxCommandEvent &);
- void subtitle_stream_changed (wxCommandEvent &);
void audio_mapping_changed (AudioMapping);
void start_changed ();
void length_changed ();
void set_things_sensitive (bool);
void setup_ratios ();
- void setup_subtitle_control_sensitivity ();
void setup_dcp_name ();
void setup_show_audio_sensitivity ();
void setup_scaling_description ();
void active_jobs_changed (bool);
boost::shared_ptr<VideoContent> selected_video_content ();
boost::shared_ptr<AudioContent> selected_audio_content ();
- boost::shared_ptr<SubtitleContent> selected_subtitle_content ();
+ SubtitlePanel* _subtitle_panel;
TimingPanel* _timing_panel;
wxNotebook* _main_notebook;
wxSizer* _content_sizer;
wxPanel* _video_panel;
wxPanel* _audio_panel;
- wxPanel* _subtitle_panel;
/** The film we are editing */
boost::shared_ptr<Film> _film;
wxButton* _audio_gain_calculate_button;
wxButton* _show_audio;
wxSpinCtrl* _audio_delay;
- wxCheckBox* _with_subtitles;
- wxSpinCtrl* _subtitle_offset;
- wxSpinCtrl* _subtitle_scale;
wxSpinCtrl* _j2k_bandwidth;
wxChoice* _dcp_content_type;
wxChoice* _dcp_frame_rate;
wxButton* _best_dcp_frame_rate;
wxChoice* _audio_stream;
wxStaticText* _audio_description;
- wxChoice* _subtitle_stream;
AudioMappingView* _audio_mapping;
wxChoice* _dcp_resolution;
--- /dev/null
+/*
+ Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include <wx/notebook.h>
+#include "film_editor_panel.h"
+#include "film_editor.h"
+
+using boost::shared_ptr;
+
+FilmEditorPanel::FilmEditorPanel (FilmEditor* e, wxString name)
+ : wxPanel (e->content_notebook (), wxID_ANY)
+ , _editor (e)
+ , _sizer (new wxBoxSizer (wxVERTICAL))
+{
+ e->content_notebook()->AddPage (this, name, false);
+ SetSizer (_sizer);
+}
+
--- /dev/null
+/*
+ Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef DCPOMATIC_FILM_EDITOR_PANEL_H
+#define DCPOMATIC_FILM_EDITOR_PANEL_H
+
+#include <boost/shared_ptr.hpp>
+#include <wx/wx.h>
+#include "lib/film.h"
+
+class FilmEditor;
+class Content;
+
+class FilmEditorPanel : public wxPanel
+{
+public:
+ FilmEditorPanel (FilmEditor *, wxString);
+
+ virtual void film_changed (Film::Property) {}
+ virtual void film_content_changed (
+ boost::shared_ptr<Content>,
+ boost::shared_ptr<SubtitleContent>,
+ boost::shared_ptr<FFmpegContent>,
+ int) = 0;
+
+protected:
+ FilmEditor* _editor;
+ wxSizer* _sizer;
+};
+
+#endif
--- /dev/null
+/*
+ Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include <boost/lexical_cast.hpp>
+#include <wx/spinctrl.h>
+#include "subtitle_panel.h"
+#include "film_editor.h"
+#include "wx_util.h"
+
+using std::vector;
+using std::string;
+using boost::shared_ptr;
+using boost::lexical_cast;
+using boost::dynamic_pointer_cast;
+
+SubtitlePanel::SubtitlePanel (FilmEditor* e)
+ : FilmEditorPanel (e, _("Subtitles"))
+{
+ wxFlexGridSizer* grid = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
+ _sizer->Add (grid, 0, wxALL, 8);
+
+ _with_subtitles = new wxCheckBox (this, wxID_ANY, _("With Subtitles"));
+ grid->Add (_with_subtitles, 1);
+ grid->AddSpacer (0);
+
+ {
+ add_label_to_sizer (grid, this, _("Subtitle Offset"), true);
+ wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
+ _offset = new wxSpinCtrl (this);
+ s->Add (_offset);
+ add_label_to_sizer (s, this, _("%"), false);
+ grid->Add (s);
+ }
+
+ {
+ add_label_to_sizer (grid, this, _("Subtitle Scale"), true);
+ wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
+ _scale = new wxSpinCtrl (this);
+ s->Add (_scale);
+ add_label_to_sizer (s, this, _("%"), false);
+ grid->Add (s);
+ }
+
+ add_label_to_sizer (grid, this, _("Subtitle Stream"), true);
+ _stream = new wxChoice (this, wxID_ANY);
+ grid->Add (_stream, 1, wxEXPAND);
+
+ _offset->SetRange (-100, 100);
+ _scale->SetRange (1, 1000);
+ _scale->SetValue (100);
+
+ _with_subtitles->Connect (wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler (SubtitlePanel::with_subtitles_toggled), 0, this);
+ _offset->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (SubtitlePanel::offset_changed), 0, this);
+ _scale->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (SubtitlePanel::scale_changed), 0, this);
+ _stream->Connect (wxID_ANY, wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler (SubtitlePanel::stream_changed), 0, this);
+}
+
+void
+SubtitlePanel::film_changed (Film::Property property)
+{
+ switch (property) {
+ case Film::CONTENT:
+ setup_control_sensitivity ();
+ break;
+ case Film::WITH_SUBTITLES:
+ checked_set (_with_subtitles, _editor->film()->with_subtitles ());
+ setup_control_sensitivity ();
+ break;
+ default:
+ break;
+ }
+}
+
+void
+SubtitlePanel::film_content_changed (
+ shared_ptr<Content>,
+ shared_ptr<SubtitleContent> subtitle_content,
+ shared_ptr<FFmpegContent> ffmpeg_content,
+ int property
+ )
+{
+ if (property == FFmpegContentProperty::SUBTITLE_STREAMS) {
+ _stream->Clear ();
+ if (ffmpeg_content) {
+ vector<shared_ptr<FFmpegSubtitleStream> > s = ffmpeg_content->subtitle_streams ();
+ for (vector<shared_ptr<FFmpegSubtitleStream> >::iterator i = s.begin(); i != s.end(); ++i) {
+ _stream->Append (std_to_wx ((*i)->name), new wxStringClientData (std_to_wx (lexical_cast<string> ((*i)->id))));
+ }
+
+ if (ffmpeg_content->subtitle_stream()) {
+ checked_set (_stream, lexical_cast<string> (ffmpeg_content->subtitle_stream()->id));
+ } else {
+ _stream->SetSelection (wxNOT_FOUND);
+ }
+ }
+ setup_control_sensitivity ();
+ } else if (property == SubtitleContentProperty::SUBTITLE_OFFSET) {
+ checked_set (_offset, subtitle_content ? (subtitle_content->subtitle_offset() * 100) : 0);
+ } else if (property == SubtitleContentProperty::SUBTITLE_SCALE) {
+ checked_set (_scale, subtitle_content ? (subtitle_content->subtitle_scale() * 100) : 100);
+ }
+
+}
+
+void
+SubtitlePanel::with_subtitles_toggled (wxCommandEvent &)
+{
+ if (!_editor->film()) {
+ return;
+ }
+
+ _editor->film()->set_with_subtitles (_with_subtitles->GetValue ());
+}
+
+void
+SubtitlePanel::setup_control_sensitivity ()
+{
+ bool h = false;
+ if (_editor->generally_sensitive() && _editor->film()) {
+ h = _editor->film()->has_subtitles ();
+ }
+
+ _with_subtitles->Enable (h);
+
+ bool j = false;
+ if (_editor->film()) {
+ j = _editor->film()->with_subtitles ();
+ }
+
+ _offset->Enable (j);
+ _scale->Enable (j);
+ _stream->Enable (j);
+}
+
+void
+SubtitlePanel::stream_changed (wxCommandEvent &)
+{
+ shared_ptr<Content> c = _editor->selected_content ();
+ if (!c) {
+ return;
+ }
+
+ shared_ptr<FFmpegContent> fc = dynamic_pointer_cast<FFmpegContent> (c);
+ if (!fc) {
+ return;
+ }
+
+ vector<shared_ptr<FFmpegSubtitleStream> > a = fc->subtitle_streams ();
+ vector<shared_ptr<FFmpegSubtitleStream> >::iterator i = a.begin ();
+ string const s = string_client_data (_stream->GetClientObject (_stream->GetSelection ()));
+ while (i != a.end() && lexical_cast<string> ((*i)->id) != s) {
+ ++i;
+ }
+
+ if (i != a.end ()) {
+ fc->set_subtitle_stream (*i);
+ }
+}
+
+void
+SubtitlePanel::offset_changed (wxCommandEvent &)
+{
+ shared_ptr<SubtitleContent> c = _editor->selected_subtitle_content ();
+ if (!c) {
+ return;
+ }
+
+ c->set_subtitle_offset (_offset->GetValue() / 100.0);
+}
+
+void
+SubtitlePanel::scale_changed (wxCommandEvent &)
+{
+ shared_ptr<SubtitleContent> c = _editor->selected_subtitle_content ();
+ if (!c) {
+ return;
+ }
+
+ c->set_subtitle_scale (_scale->GetValue() / 100.0);
+}
+
--- /dev/null
+/*
+ Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "film_editor_panel.h"
+
+class wxCheckBox;
+class wxSpinCtrl;
+
+class SubtitlePanel : public FilmEditorPanel
+{
+public:
+ SubtitlePanel (FilmEditor *);
+
+ void film_changed (Film::Property);
+ void film_content_changed (
+ boost::shared_ptr<Content>,
+ boost::shared_ptr<SubtitleContent>,
+ boost::shared_ptr<FFmpegContent>,
+ int);
+
+ void setup_control_sensitivity ();
+
+private:
+ void with_subtitles_toggled (wxCommandEvent &);
+ void offset_changed (wxCommandEvent &);
+ void scale_changed (wxCommandEvent &);
+ void stream_changed (wxCommandEvent &);
+
+ wxCheckBox* _with_subtitles;
+ wxSpinCtrl* _offset;
+ wxSpinCtrl* _scale;
+ wxChoice* _stream;
+};
}
void
-TimingPanel::film_content_changed (shared_ptr<Content> content, int property)
+TimingPanel::film_content_changed (shared_ptr<Content> content, shared_ptr<SubtitleContent>, shared_ptr<FFmpegContent>, int property)
{
if (property == ContentProperty::START) {
if (content) {
public:
TimingPanel (FilmEditor *);
- void film_content_changed (boost::shared_ptr<Content>, int);
+ void film_content_changed (
+ boost::shared_ptr<Content>,
+ boost::shared_ptr<SubtitleContent>,
+ boost::shared_ptr<FFmpegContent>,
+ int);
private:
void start_changed ();
properties_dialog.cc
repeat_dialog.cc
server_dialog.cc
+ subtitle_panel.cc
timecode.cc
timeline.cc
timeline_dialog.cc