diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-09-14 20:10:36 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-09-14 20:10:36 +0100 |
| commit | 45dcdd17c7f860e92d7b1d75598afea64c5fbc50 (patch) | |
| tree | 6de56b0737eb9a38553598d3ce37bddf4b214c53 /src/wx | |
| parent | 15895d47cebc0988aecf0a6b84947f4b6bae9aa3 (diff) | |
Basic dual-screen mode for player.
Diffstat (limited to 'src/wx')
| -rw-r--r-- | src/wx/cinema_player_dialog.cc | 41 | ||||
| -rw-r--r-- | src/wx/cinema_player_dialog.h | 36 | ||||
| -rw-r--r-- | src/wx/controls.cc | 22 | ||||
| -rw-r--r-- | src/wx/controls.h | 2 | ||||
| -rw-r--r-- | src/wx/wscript | 1 |
5 files changed, 93 insertions, 9 deletions
diff --git a/src/wx/cinema_player_dialog.cc b/src/wx/cinema_player_dialog.cc new file mode 100644 index 000000000..3545608ed --- /dev/null +++ b/src/wx/cinema_player_dialog.cc @@ -0,0 +1,41 @@ +/* + Copyright (C) 2018 Carl Hetherington <cth@carlh.net> + + This file is part of DCP-o-matic. + + DCP-o-matic is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + DCP-o-matic is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>. + +*/ + +#include "cinema_player_dialog.h" +#include "controls.h" +#include "player_information.h" +#include <boost/shared_ptr.hpp> + +using boost::shared_ptr; + +CinemaPlayerDialog::CinemaPlayerDialog (wxWindow* parent, shared_ptr<FilmViewer> viewer) + : wxDialog (parent, wxID_ANY, _("DCP-o-matic Player")) +{ + _controls = new Controls (this, viewer, false, false, false); + _info = new PlayerInformation (this, viewer); + + wxBoxSizer* s = new wxBoxSizer (wxVERTICAL); + s->Add (_controls, 0, wxEXPAND | wxALL, 6); + s->Add (_info, 0, wxEXPAND | wxALL, 6); + + SetSize (640, -1); + + SetSizer (s); +} diff --git a/src/wx/cinema_player_dialog.h b/src/wx/cinema_player_dialog.h new file mode 100644 index 000000000..045dafb28 --- /dev/null +++ b/src/wx/cinema_player_dialog.h @@ -0,0 +1,36 @@ +/* + Copyright (C) 2018 Carl Hetherington <cth@carlh.net> + + This file is part of DCP-o-matic. + + DCP-o-matic is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + DCP-o-matic is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>. + +*/ + +#include <wx/wx.h> +#include <boost/shared_ptr.hpp> + +class Controls; +class PlayerInformation; +class FilmViewer; + +class CinemaPlayerDialog : public wxDialog +{ +public: + CinemaPlayerDialog (wxWindow* parent, boost::shared_ptr<FilmViewer> viewer); + +private: + Controls* _controls; + PlayerInformation* _info; +}; diff --git a/src/wx/controls.cc b/src/wx/controls.cc index de0060d64..feef2e91c 100644 --- a/src/wx/controls.cc +++ b/src/wx/controls.cc @@ -15,7 +15,7 @@ using boost::weak_ptr; /** @param outline_content true if viewer should present an "outline content" checkbox. * @param jump_to_selected true if viewer should present a "jump to selected" checkbox. */ -Controls::Controls (wxWindow* parent, shared_ptr<FilmViewer> viewer, bool outline_content, bool jump_to_selected) +Controls::Controls (wxWindow* parent, shared_ptr<FilmViewer> viewer, bool outline_content, bool jump_to_selected, bool eye) : wxPanel (parent) , _viewer (viewer) , _slider_being_moved (false) @@ -40,11 +40,13 @@ Controls::Controls (wxWindow* parent, shared_ptr<FilmViewer> viewer, bool outlin view_options->Add (_outline_content, 0, wxRIGHT | wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_GAP); } - _eye = new wxChoice (this, wxID_ANY); - _eye->Append (_("Left")); - _eye->Append (_("Right")); - _eye->SetSelection (0); - view_options->Add (_eye, 0, wxLEFT | wxRIGHT | wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_GAP); + if (eye) { + _eye = new wxChoice (this, wxID_ANY); + _eye->Append (_("Left")); + _eye->Append (_("Right")); + _eye->SetSelection (0); + view_options->Add (_eye, 0, wxLEFT | wxRIGHT | wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_GAP); + } if (jump_to_selected) { _jump_to_selected = new wxCheckBox (this, wxID_ANY, _("Jump to selected content")); @@ -73,7 +75,9 @@ Controls::Controls (wxWindow* parent, shared_ptr<FilmViewer> viewer, bool outlin _back_button->SetMinSize (wxSize (32, -1)); _forward_button->SetMinSize (wxSize (32, -1)); - _eye->Bind (wxEVT_CHOICE, boost::bind (&Controls::eye_changed, this)); + if (_eye) { + _eye->Bind (wxEVT_CHOICE, boost::bind (&Controls::eye_changed, this)); + } if (_outline_content) { _outline_content->Bind (wxEVT_CHECKBOX, boost::bind (&Controls::outline_content_changed, this)); } @@ -314,7 +318,9 @@ Controls::setup_sensitivity () _jump_to_selected->Enable (c); } - _eye->Enable (c && _film->three_d ()); + if (_eye) { + _eye->Enable (c && _film->three_d ()); + } } void diff --git a/src/wx/controls.h b/src/wx/controls.h index 1795612af..1c8474e54 100644 --- a/src/wx/controls.h +++ b/src/wx/controls.h @@ -15,7 +15,7 @@ class wxToggleButton; class Controls : public wxPanel { public: - Controls (wxWindow* parent, boost::shared_ptr<FilmViewer>, bool outline_content = true, bool jump_to_selected = true); + Controls (wxWindow* parent, boost::shared_ptr<FilmViewer>, bool outline_content = true, bool jump_to_selected = true, bool eyes = true); boost::shared_ptr<Film> film () const; void back_frame (); diff --git a/src/wx/wscript b/src/wx/wscript index ad0292a47..0c9f0c731 100644 --- a/src/wx/wscript +++ b/src/wx/wscript @@ -38,6 +38,7 @@ sources = """ text_view.cc christie_certificate_panel.cc cinema_dialog.cc + cinema_player_dialog.cc colour_conversion_editor.cc config_dialog.cc config_move_dialog.cc |
