-{
- wxBoxSizer* vertical = new wxBoxSizer (wxVERTICAL);
- wxBoxSizer* targets = new wxBoxSizer (wxHORIZONTAL);
-
- _targets = new wxTreeCtrl (this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_HIDE_ROOT | wxTR_MULTIPLE | wxTR_HAS_BUTTONS);
- targets->Add (_targets, 1, wxEXPAND | wxALL, 6);
-
- _root = _targets->AddRoot ("Foo");
-
- list<shared_ptr<Cinema> > c = Config::instance()->cinemas ();
- for (list<shared_ptr<Cinema> >::iterator i = c.begin(); i != c.end(); ++i) {
- add_cinema (*i);
- }
-
- _targets->ExpandAll ();
-
- wxBoxSizer* target_buttons = new wxBoxSizer (wxVERTICAL);
-
- _add_cinema = new wxButton (this, wxID_ANY, _("Add Cinema..."));
- target_buttons->Add (_add_cinema, 1, wxEXPAND, 6);
- _edit_cinema = new wxButton (this, wxID_ANY, _("Edit Cinema..."));
- target_buttons->Add (_edit_cinema, 1, wxEXPAND, 6);
- _remove_cinema = new wxButton (this, wxID_ANY, _("Remove Cinema"));
- target_buttons->Add (_remove_cinema, 1, wxEXPAND, 6);
-
- _add_screen = new wxButton (this, wxID_ANY, _("Add Screen..."));
- target_buttons->Add (_add_screen, 1, wxEXPAND, 6);
- _edit_screen = new wxButton (this, wxID_ANY, _("Edit Screen..."));
- target_buttons->Add (_edit_screen, 1, wxEXPAND, 6);
- _remove_screen = new wxButton (this, wxID_ANY, _("Remove Screen"));
- target_buttons->Add (_remove_screen, 1, wxEXPAND, 6);
-
- targets->Add (target_buttons, 0, 0, 6);
-
- vertical->Add (targets, 1, wxEXPAND | wxALL, 6);
-
- wxFlexGridSizer* table = new wxFlexGridSizer (3, 2, 6);
- add_label_to_sizer (table, this, _("From"), true);
- wxDateTime from;
- from.SetToCurrent ();
- _from_date = new wxDatePickerCtrl (this, wxID_ANY, from);
- table->Add (_from_date, 1, wxEXPAND);
- _from_time = new wxTimePickerCtrl (this, wxID_ANY, from);
- table->Add (_from_time, 1, wxEXPAND);
-
- add_label_to_sizer (table, this, _("Until"), true);
- wxDateTime to = from;
- /* 1 week from now */
- to.Add (wxDateSpan (0, 0, 1, 0));
- _until_date = new wxDatePickerCtrl (this, wxID_ANY, to);
- table->Add (_until_date, 1, wxEXPAND);
- _until_time = new wxTimePickerCtrl (this, wxID_ANY, to);
- table->Add (_until_time, 1, wxEXPAND);
-
- vertical->Add (table, 0, wxEXPAND | wxALL, 6);
-
- _dcps = new wxListCtrl (this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT | wxLC_SINGLE_SEL);
- wxListItem ip;
- ip.SetId (0);
- ip.SetText (_("DCP"));
- ip.SetWidth (400);
- _dcps->InsertColumn (0, ip);
- vertical->Add (_dcps, 0, wxEXPAND | wxALL, 6);
-
- list<boost::filesystem::path> dcps = film->dcps ();
- for (list<boost::filesystem::path>::const_iterator i = dcps.begin(); i != dcps.end(); ++i) {
- wxListItem item;
- int const n = _dcps->GetItemCount ();
- item.SetId (n);
- _dcps->InsertItem (item);
- _dcps->SetItem (n, 0, std_to_wx (i->string ()));
-
- if (dcps.size() == 1 || i->string() == film->dcp_name ()) {
- _dcps->SetItemState (n, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
+ , _film (film)
+{
+ /* Main sizers */
+ wxBoxSizer* horizontal = new wxBoxSizer (wxHORIZONTAL);
+ wxBoxSizer* left = new wxBoxSizer (wxVERTICAL);
+ wxBoxSizer* right = new wxBoxSizer (wxVERTICAL);
+
+ horizontal->Add (left, 1, wxEXPAND | wxRIGHT, DCPOMATIC_SIZER_X_GAP * 4);
+ horizontal->Add (right, 1, wxEXPAND);
+
+ /* Font for sub-headings */
+ wxFont subheading_font (*wxNORMAL_FONT);
+ subheading_font.SetWeight (wxFONTWEIGHT_BOLD);
+
+ /* Sub-heading: Screens */
+ wxStaticText* h = new StaticText (this, _("Screens"));
+ h->SetFont (subheading_font);
+ left->Add (h, 0, wxALIGN_CENTER_VERTICAL | wxBOTTOM, DCPOMATIC_SIZER_Y_GAP);
+ _screens = new ScreensPanel (this);
+ left->Add (_screens, 1, wxEXPAND | wxBOTTOM, DCPOMATIC_SIZER_Y_GAP);
+
+ /* Sub-heading: Timing */
+ /// TRANSLATORS: translate the word "Timing" here; do not include the "KDM|" prefix
+ h = new StaticText (this, S_("KDM|Timing"));
+ h->SetFont (subheading_font);
+ right->Add (h, 0, wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_Y_GAP * 2);
+ _timing = new KDMTimingPanel (this);
+ right->Add (_timing);
+
+ /* Sub-heading: CPL */
+ h = new StaticText (this, _("CPL"));
+ h->SetFont (subheading_font);
+ right->Add (h, 0, wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_Y_GAP * 2);
+
+ vector<CPLSummary> cpls;
+ BOOST_FOREACH (CPLSummary const & i, film->cpls()) {
+ if (i.encrypted) {
+ cpls.push_back (i);