#include "lib/ratio.h"
#include "lib/util.h"
#include "lib/video_content.h"
+#include <dcp/warnings.h>
+LIBDCP_DISABLE_WARNINGS
#include <wx/spinctrl.h>
#include <wx/tglbtn.h>
+LIBDCP_ENABLE_WARNINGS
#include <boost/functional/hash.hpp>
#include <boost/unordered_set.hpp>
#include <set>
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(""));
new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(crop_width, -1)),
VideoContentProperty::CROP,
&Content::video,
- boost::mem_fn (&VideoContent::left_crop),
+ boost::mem_fn (&VideoContent::requested_left_crop),
boost::mem_fn (&VideoContent::set_left_crop),
boost::bind (&VideoPanel::left_crop_changed, this)
);
new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(crop_width, -1)),
VideoContentProperty::CROP,
&Content::video,
- boost::mem_fn (&VideoContent::right_crop),
+ boost::mem_fn (&VideoContent::requested_right_crop),
boost::mem_fn (&VideoContent::set_right_crop),
boost::bind (&VideoPanel::right_crop_changed, this)
);
new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(crop_width, -1)),
VideoContentProperty::CROP,
&Content::video,
- boost::mem_fn (&VideoContent::top_crop),
+ boost::mem_fn (&VideoContent::requested_top_crop),
boost::mem_fn (&VideoContent::set_top_crop),
boost::bind (&VideoPanel::top_crop_changed, this)
);
new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(crop_width, -1)),
VideoContentProperty::CROP,
&Content::video,
- boost::mem_fn (&VideoContent::bottom_crop),
+ boost::mem_fn (&VideoContent::requested_bottom_crop),
boost::mem_fn (&VideoContent::set_bottom_crop),
boost::bind (&VideoPanel::bottom_crop_changed, this)
);
_top_bottom_link->Bind (wxEVT_TOGGLEBUTTON, boost::bind(&VideoPanel::top_bottom_link_clicked, this));
add_to_grid ();
+
+ _sizer->Layout ();
}
if (property == ContentProperty::VIDEO_FRAME_RATE ||
property == VideoContentProperty::FRAME_TYPE ||
property == VideoContentProperty::CROP ||
- property == VideoContentProperty::SCALE) {
+ property == VideoContentProperty::CUSTOM_RATIO ||
+ property == VideoContentProperty::CUSTOM_SIZE) {
setup_description ();
} else if (property == VideoContentProperty::COLOUR_CONVERSION) {
boost::unordered_set<optional<ColourConversion>> check;
{
for (auto i: _parent->selected_video()) {
i->video->set_custom_ratio (optional<float>());
+ i->video->set_custom_size (optional<dcp::Size>());
}
+
+ setup_sensitivity ();
}
if (!scale_custom_edit_clicked()) {
_scale_fit->SetValue (true);
}
+
+ setup_sensitivity ();
}
_left_changed_last = true;
if (_left_right_link->GetValue()) {
for (auto i: _parent->selected_video()) {
- i->video->set_right_crop (i->video->left_crop());
+ i->video->set_right_crop (i->video->requested_left_crop());
}
}
}
_left_changed_last = false;
if (_left_right_link->GetValue()) {
for (auto i: _parent->selected_video()) {
- i->video->set_left_crop (i->video->right_crop());
+ i->video->set_left_crop (i->video->requested_right_crop());
}
}
}
_top_changed_last = true;
if (_top_bottom_link->GetValue()) {
for (auto i: _parent->selected_video()) {
- i->video->set_bottom_crop (i->video->top_crop());
+ i->video->set_bottom_crop (i->video->requested_top_crop());
}
}
}
_top_changed_last = false;
if (_top_bottom_link->GetValue()) {
for (auto i: _parent->selected_video()) {
- i->video->set_top_crop (i->video->bottom_crop());
+ i->video->set_top_crop (i->video->requested_bottom_crop());
}
}
}
-