- _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);
- _from_date = new wxDatePickerCtrl (this, wxID_ANY);
- table->Add (_from_date, 1, wxEXPAND);
- _from_time = new wxTimePickerCtrl (this, wxID_ANY);
- table->Add (_from_time, 1, wxEXPAND);
-
- add_label_to_sizer (table, this, "Until", true);
- _until_date = new wxDatePickerCtrl (this, wxID_ANY);
- table->Add (_until_date, 1, wxEXPAND);
- _until_time = new wxTimePickerCtrl (this, wxID_ANY);
- table->Add (_until_time, 1, wxEXPAND);
-
- add_label_to_sizer (table, this, "Write to", true);
-
-#ifdef __WXMSW__
- _folder = new DirPickerCtrl (this);
-#else
- _folder = new wxDirPickerCtrl (this, wxDD_DIR_MUST_EXIST);
-#endif
-
- table->Add (_folder, 1, wxEXPAND);
-
- vertical->Add (table, 0, wxEXPAND | wxALL, 6);
+ /* Font for sub-headings */
+ wxFont subheading_font (*wxNORMAL_FONT);
+ subheading_font.SetWeight (wxFONTWEIGHT_BOLD);
+
+ /* Sub-heading: Screens */
+ wxStaticText* h = new wxStaticText (this, wxID_ANY, _("Screens"));
+ h->SetFont (subheading_font);
+ vertical->Add (h, 0, wxALIGN_CENTER_VERTICAL);
+ _screens = new ScreensPanel (this);
+ vertical->Add (_screens, 1, wxEXPAND);
+
+ /* Sub-heading: Timing */
+ h = new wxStaticText (this, wxID_ANY, S_("KDM|Timing"));
+ h->SetFont (subheading_font);
+ vertical->Add (h, 0, wxALIGN_CENTER_VERTICAL | wxTOP, DCPOMATIC_SIZER_Y_GAP * 2);
+ _timing = new KDMTimingPanel (this);
+ vertical->Add (_timing);
+
+ /* Sub-heading: CPL */
+ h = new wxStaticText (this, wxID_ANY, _("CPL"));
+ h->SetFont (subheading_font);
+ vertical->Add (h, 0, wxALIGN_CENTER_VERTICAL | wxTOP, DCPOMATIC_SIZER_Y_GAP * 2);
+
+ /* CPL choice */
+ wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
+ add_label_to_sizer (s, this, _("CPL"), true);
+ _cpl = new wxChoice (this, wxID_ANY);
+ s->Add (_cpl, 1, wxEXPAND);
+ _cpl_browse = new wxButton (this, wxID_ANY, _("Browse..."));
+ s->Add (_cpl_browse, 0);
+ vertical->Add (s, 0, wxEXPAND | wxTOP, DCPOMATIC_SIZER_GAP + 2);
+
+ /* CPL details */
+ wxFlexGridSizer* table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
+ add_label_to_sizer (table, this, _("DCP directory"), true);
+ _dcp_directory = new wxStaticText (this, wxID_ANY, "");
+ table->Add (_dcp_directory);
+ add_label_to_sizer (table, this, _("CPL ID"), true);
+ _cpl_id = new wxStaticText (this, wxID_ANY, "");
+ table->Add (_cpl_id);
+ add_label_to_sizer (table, this, _("CPL annotation text"), true);
+ _cpl_annotation_text = new wxStaticText (this, wxID_ANY, "");
+ table->Add (_cpl_annotation_text);
+ vertical->Add (table, 0, wxEXPAND | wxTOP, DCPOMATIC_SIZER_GAP + 2);
+
+ _cpls = film->cpls ();
+ update_cpl_choice ();
+
+ /* Sub-heading: Output */
+ h = new wxStaticText (this, wxID_ANY, _("Output"));
+ h->SetFont (subheading_font);
+ vertical->Add (h, 0, wxALIGN_CENTER_VERTICAL | wxTOP, DCPOMATIC_SIZER_Y_GAP * 2);
+ _output = new KDMOutputPanel (this, film->interop ());
+ vertical->Add (_output, 0, wxEXPAND | wxTOP, DCPOMATIC_SIZER_GAP);
+
+ /* Make an overall sizer to get a nice border, and put some buttons in */
+
+ wxBoxSizer* overall_sizer = new wxBoxSizer (wxVERTICAL);
+ overall_sizer->Add (vertical, 0, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, DCPOMATIC_DIALOG_BORDER);