_content = new wxListCtrl (_panel, wxID_ANY, wxDefaultPosition, wxSize (320, 160), wxLC_REPORT | wxLC_NO_HEADER);
_content->DragAcceptFiles (true);
s->Add (_content, 1, wxEXPAND | wxTOP | wxBOTTOM, 6);
_content = new wxListCtrl (_panel, wxID_ANY, wxDefaultPosition, wxSize (320, 160), wxLC_REPORT | wxLC_NO_HEADER);
_content->DragAcceptFiles (true);
s->Add (_content, 1, wxEXPAND | wxTOP | wxBOTTOM, 6);
_content->SetColumnWidth (0, 512);
wxBoxSizer* b = new wxBoxSizer (wxVERTICAL);
_content->SetColumnWidth (0, 512);
wxBoxSizer* b = new wxBoxSizer (wxVERTICAL);
_add_file = new wxButton (_panel, wxID_ANY, _("Add file(s)..."));
_add_file->SetToolTip (_("Add video, image or sound files to the film."));
b->Add (_add_file, 0, wxEXPAND | wxALL, DCPOMATIC_BUTTON_STACK_GAP);
_add_file = new wxButton (_panel, wxID_ANY, _("Add file(s)..."));
_add_file->SetToolTip (_("Add video, image or sound files to the film."));
b->Add (_add_file, 0, wxEXPAND | wxALL, DCPOMATIC_BUTTON_STACK_GAP);
_add_folder = new wxButton (_panel, wxID_ANY, _("Add folder..."));
_add_folder->SetToolTip (_("Add a folder of image files (which will be used as a moving image sequence) or a DCP."));
b->Add (_add_folder, 1, wxEXPAND | wxALL, DCPOMATIC_BUTTON_STACK_GAP);
_add_folder = new wxButton (_panel, wxID_ANY, _("Add folder..."));
_add_folder->SetToolTip (_("Add a folder of image files (which will be used as a moving image sequence) or a DCP."));
b->Add (_add_folder, 1, wxEXPAND | wxALL, DCPOMATIC_BUTTON_STACK_GAP);
_remove = new wxButton (_panel, wxID_ANY, _("Remove"));
_remove->SetToolTip (_("Remove the selected piece of content from the film."));
b->Add (_remove, 0, wxEXPAND | wxALL, DCPOMATIC_BUTTON_STACK_GAP);
_remove = new wxButton (_panel, wxID_ANY, _("Remove"));
_remove->SetToolTip (_("Remove the selected piece of content from the film."));
b->Add (_remove, 0, wxEXPAND | wxALL, DCPOMATIC_BUTTON_STACK_GAP);
_earlier = new wxButton (_panel, wxID_ANY, _("Up"));
_earlier->SetToolTip (_("Move the selected piece of content earlier in the film."));
b->Add (_earlier, 0, wxEXPAND | wxALL, DCPOMATIC_BUTTON_STACK_GAP);
_earlier = new wxButton (_panel, wxID_ANY, _("Up"));
_earlier->SetToolTip (_("Move the selected piece of content earlier in the film."));
b->Add (_earlier, 0, wxEXPAND | wxALL, DCPOMATIC_BUTTON_STACK_GAP);
_later = new wxButton (_panel, wxID_ANY, _("Down"));
_later->SetToolTip (_("Move the selected piece of content later in the film."));
b->Add (_later, 0, wxEXPAND | wxALL, DCPOMATIC_BUTTON_STACK_GAP);
_later = new wxButton (_panel, wxID_ANY, _("Down"));
_later->SetToolTip (_("Move the selected piece of content later in the film."));
b->Add (_later, 0, wxEXPAND | wxALL, DCPOMATIC_BUTTON_STACK_GAP);
_timeline = new wxButton (_panel, wxID_ANY, _("Timeline..."));
_timeline->SetToolTip (_("Open the timeline for the film."));
b->Add (_timeline, 0, wxEXPAND | wxALL, DCPOMATIC_BUTTON_STACK_GAP);
_timeline = new wxButton (_panel, wxID_ANY, _("Timeline..."));
_timeline->SetToolTip (_("Open the timeline for the film."));
b->Add (_timeline, 0, wxEXPAND | wxALL, DCPOMATIC_BUTTON_STACK_GAP);
for (ContentList::iterator i = c.begin(); i != c.end(); ++i) {
shared_ptr<VideoContent> t = dynamic_pointer_cast<VideoContent> (*i);
if (t) {
for (ContentList::iterator i = c.begin(); i != c.end(); ++i) {
shared_ptr<VideoContent> t = dynamic_pointer_cast<VideoContent> (*i);
if (t) {
for (ContentList::iterator i = c.begin(); i != c.end(); ++i) {
shared_ptr<AudioContent> t = dynamic_pointer_cast<AudioContent> (*i);
if (t) {
for (ContentList::iterator i = c.begin(); i != c.end(); ++i) {
shared_ptr<AudioContent> t = dynamic_pointer_cast<AudioContent> (*i);
if (t) {
for (ContentList::iterator i = c.begin(); i != c.end(); ++i) {
shared_ptr<SubtitleContent> t = dynamic_pointer_cast<SubtitleContent> (*i);
if (t) {
for (ContentList::iterator i = c.begin(); i != c.end(); ++i) {
shared_ptr<SubtitleContent> t = dynamic_pointer_cast<SubtitleContent> (*i);
if (t) {
for (ContentList::iterator i = c.begin(); i != c.end(); ++i) {
shared_ptr<FFmpegContent> t = dynamic_pointer_cast<FFmpegContent> (*i);
if (t) {
for (ContentList::iterator i = c.begin(); i != c.end(); ++i) {
shared_ptr<FFmpegContent> t = dynamic_pointer_cast<FFmpegContent> (*i);
if (t) {
ImageSequenceDialog* e = new ImageSequenceDialog (_panel);
r = e->ShowModal ();
float const frame_rate = e->frame_rate ();
ImageSequenceDialog* e = new ImageSequenceDialog (_panel);
r = e->ShowModal ();
float const frame_rate = e->frame_rate ();
try {
shared_ptr<ImageContent> content (new ImageContent (_film, path));
content->set_video_frame_rate (frame_rate);
try {
shared_ptr<ImageContent> content (new ImageContent (_film, path));
content->set_video_frame_rate (frame_rate);
_timeline_dialog = new TimelineDialog (this, _film);
_timeline_dialog->Show ();
}
_timeline_dialog = new TimelineDialog (this, _film);
_timeline_dialog->Show ();
}
for (list<ContentSubPanel*>::iterator i = _panels.begin(); i != _panels.end(); ++i) {
(*i)->film_content_changed (property);
}
for (list<ContentSubPanel*>::iterator i = _panels.begin(); i != _panels.end(); ++i) {
(*i)->film_content_changed (property);
}
{
ContentList content = _film->content ();
sort (content.begin(), content.end(), ContentSorter ());
{
ContentList content = _film->content ();
sort (content.begin(), content.end(), ContentSorter ());
string selected_summary;
int const s = _content->GetNextItem (-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
if (s != -1) {
selected_summary = wx_to_std (_content->GetItemText (s));
}
string selected_summary;
int const s = _content->GetNextItem (-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
if (s != -1) {
selected_summary = wx_to_std (_content->GetItemText (s));
}
_content->DeleteAllItems ();
for (ContentList::iterator i = content.begin(); i != content.end(); ++i) {
_content->DeleteAllItems ();
for (ContentList::iterator i = content.begin(); i != content.end(); ++i) {
wxString* paths = event.GetFiles ();
list<boost::filesystem::path> path_list;
for (int i = 0; i < event.GetNumberOfFiles(); i++) {
wxString* paths = event.GetFiles ();
list<boost::filesystem::path> path_list;
for (int i = 0; i < event.GetNumberOfFiles(); i++) {
/* It has been reported that the paths returned from e.g. wxFileDialog are not always sorted;
I can't reproduce that, but sort them anyway.
*/
/* It has been reported that the paths returned from e.g. wxFileDialog are not always sorted;
I can't reproduce that, but sort them anyway.
*/