2 Copyright (C) 2013-2021 Carl Hetherington <cth@carlh.net>
4 This file is part of DCP-o-matic.
6 DCP-o-matic is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 DCP-o-matic is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
22 #include "dcp_panel.h"
23 #include "dcp_timeline_dialog.h"
24 #include "film_editor.h"
26 #include "lib/compose.hpp"
27 #include "lib/cross.h"
29 #include "lib/playlist.h"
30 #include <dcp/warnings.h>
31 LIBDCP_DISABLE_WARNINGS
32 #include <wx/graphics.h>
33 LIBDCP_ENABLE_WARNINGS
38 using std::shared_ptr;
41 #if BOOST_VERSION >= 106100
42 using namespace boost::placeholders;
46 DCPTimelineDialog::DCPTimelineDialog(wxWindow* parent, shared_ptr<Film> film)
54 /* I can't get wxFRAME_FLOAT_ON_PARENT to work on OS X, and although wxSTAY_ON_TOP keeps
55 the window above all others (and not just our own) it's better than nothing for now.
57 wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxFULL_REPAINT_ON_RESIZE | wxSTAY_ON_TOP
59 wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxFULL_REPAINT_ON_RESIZE | wxFRAME_FLOAT_ON_PARENT
62 , _timeline(this, film)
64 auto sizer = new wxBoxSizer(wxVERTICAL);
65 sizer->Add (&_timeline, 1, wxEXPAND | wxALL, 12);
67 #ifdef DCPOMATIC_LINUX
68 auto buttons = CreateSeparatedButtonSizer (wxCLOSE);
70 sizer->Add (buttons, wxSizerFlags().Expand().DoubleBorder());
76 sizer->SetSizeHints(this);