AudioPanel::AudioPanel (ContentPanel* p)
: ContentSubPanel (p, _("Audio"))
, _audio_dialog (0)
+{
+
+}
+
+
+void
+AudioPanel::create ()
{
_reference = new CheckBox (this, _("Use this DCP's audio as OV and make VF"));
_reference_note = new StaticText (this, wxT(""));
_active_jobs_connection = JobManager::instance()->ActiveJobsChanged.connect (boost::bind (&AudioPanel::active_jobs_changed, this, _1, _2));
add_to_grid ();
+
+ _sizer->Layout ();
}
void
explicit AudioPanel (ContentPanel *);
~AudioPanel ();
- void film_changed (Film::Property);
- void film_content_changed (int);
- void content_selection_changed ();
+ void create () override;
+ void film_changed (Film::Property) override;
+ void film_content_changed (int) override;
+ void content_selection_changed () override;
void set_film (std::shared_ptr<Film>);
private:
void active_jobs_changed (boost::optional<std::string>, boost::optional<std::string>);
void setup_sensitivity ();
void reference_clicked ();
- void add_to_grid ();
+ void add_to_grid () override;
boost::optional<float> peak () const;
wxCheckBox* _reference;
_timing_panel = new TimingPanel (this, _film_viewer);
_notebook->AddPage (_timing_panel, _("Timing"), false);
+ _timing_panel->create ();
_content->Bind (wxEVT_LIST_ITEM_SELECTED, boost::bind (&ContentPanel::item_selected, this));
_content->Bind (wxEVT_LIST_ITEM_DESELECTED, boost::bind (&ContentPanel::item_deselected, this));
if (have_video && !_video_panel) {
_video_panel = new VideoPanel (this);
_notebook->InsertPage (off, _video_panel, _video_panel->name());
+ _video_panel->create ();
} else if (!have_video && _video_panel) {
_notebook->DeletePage (off);
_video_panel = 0;
if (have_audio && !_audio_panel) {
_audio_panel = new AudioPanel (this);
_notebook->InsertPage (off, _audio_panel, _audio_panel->name());
+ _audio_panel->create ();
} else if (!have_audio && _audio_panel) {
_notebook->DeletePage (off);
_audio_panel = 0;
if (have_text[i] && !_text_panel[i]) {
_text_panel[i] = new TextPanel (this, static_cast<TextType>(i));
_notebook->InsertPage (off, _text_panel[i], _text_panel[i]->name());
+ _text_panel[i]->create ();
} else if (!have_text[i] && _text_panel[i]) {
_notebook->DeletePage (off);
_text_panel[i] = 0;
public:
ContentSubPanel (ContentPanel *, wxString);
+ virtual void create () = 0;
+
virtual void film_changed (Film::Property) {}
/** Called when a given property of one of the selected Contents changes */
virtual void film_content_changed (int) = 0;
TextPanel::TextPanel (ContentPanel* p, TextType t)
: ContentSubPanel (p, std_to_wx(text_type_to_name(t)))
, _original_type (t)
+{
+
+}
+
+
+void
+TextPanel::create ()
{
wxString refer = _("Use this DCP's subtitle as OV and make VF");
- if (t == TextType::CLOSED_CAPTION) {
+ if (_original_type == TextType::CLOSED_CAPTION) {
refer = _("Use this DCP's closed caption as OV and make VF");
}
add_to_grid();
content_selection_changed ();
+
+ _sizer->Layout ();
}
public:
TextPanel (ContentPanel *, TextType t);
- void film_changed (Film::Property);
- void film_content_changed (int);
- void content_selection_changed ();
+ void create () override;
+ void film_changed (Film::Property) override;
+ void film_content_changed (int) override;
+ void content_selection_changed () override;
private:
void use_toggled ();
TextType current_type () const;
void update_dcp_tracks ();
void update_dcp_track_selection ();
- void add_to_grid ();
+ void add_to_grid () override;
void try_to_load_analysis ();
void analysis_finished ();
void language_changed ();
: ContentSubPanel (p, S_("Timing|Timing"))
, _viewer (viewer)
, _film_content_changed_suspender (boost::bind(&TimingPanel::film_content_changed, this, _1))
+{
+
+}
+
+
+void
+TimingPanel::create ()
{
wxSize size = TimecodeBase::size (this);
setup_sensitivity ();
add_to_grid ();
+
+ _sizer->Layout ();
}
void
public:
TimingPanel (ContentPanel *, std::weak_ptr<FilmViewer> viewer);
+ void create () override;
void film_changed (Film::Property);
void film_content_changed (int);
void content_selection_changed ();
VideoPanel::VideoPanel (ContentPanel* p)
: ContentSubPanel (p, _("Video"))
+{
+
+}
+
+
+void
+VideoPanel::create ()
{
_reference = new CheckBox (this, _("Use this DCP's video as OV and make VF"));
_reference_note = new StaticText (this, wxT(""));
_top_bottom_link->Bind (wxEVT_TOGGLEBUTTON, boost::bind(&VideoPanel::top_bottom_link_clicked, this));
add_to_grid ();
+
+ _sizer->Layout ();
}
public:
explicit VideoPanel (ContentPanel *);
- void film_changed (Film::Property);
- void film_content_changed (int);
- void content_selection_changed ();
+ void create () override;
+ void film_changed (Film::Property) override;
+ void film_content_changed (int) override;
+ void content_selection_changed () override;
private:
void reference_clicked ();
void range_changed ();
void fade_in_changed ();
void fade_out_changed ();
- void add_to_grid ();
+ void add_to_grid () override;
void scale_fit_clicked ();
void scale_custom_clicked ();
bool scale_custom_edit_clicked ();