2 Copyright (C) 2015-2018 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 "lib/change_signaller.h"
24 #include "lib/warnings.h"
25 DCPOMATIC_DISABLE_WARNINGS
27 DCPOMATIC_ENABLE_WARNINGS
28 #include <boost/signals2.hpp>
31 class wxColourPickerCtrl;
34 class RGBAColourPicker;
35 class FFmpegSubtitleStream;
41 class SubtitleAppearanceDialog : public wxDialog
44 SubtitleAppearanceDialog (wxWindow* parent, std::shared_ptr<const Film> film, std::shared_ptr<Content> content, std::shared_ptr<TextContent> caption);
49 void setup_sensitivity ();
51 wxCheckBox* set_to (wxWindow* w, int& r);
52 void content_change (ChangeType type);
53 void active_jobs_changed (boost::optional<std::string> last);
56 std::weak_ptr<const Film> _film;
57 wxCheckBox* _force_colour;
58 wxColourPickerCtrl* _colour;
59 wxCheckBox* _force_effect;
61 wxCheckBox* _force_effect_colour;
62 wxColourPickerCtrl* _effect_colour;
63 wxCheckBox* _force_fade_in;
64 Timecode<dcpomatic::ContentTime>* _fade_in;
65 wxCheckBox* _force_fade_out;
66 Timecode<dcpomatic::ContentTime>* _fade_out;
67 wxSpinCtrl* _outline_width;
68 wxGridBagSizer* _table;
69 std::map<RGBA, RGBAColourPicker*> _pickers;
71 wxBoxSizer* _overall_sizer;
72 wxScrolled<wxPanel>* _colours_panel;
73 wxStaticText* _finding;
74 wxFlexGridSizer* _colour_table;
76 std::shared_ptr<Content> _content;
77 std::shared_ptr<TextContent> _caption;
78 std::shared_ptr<FFmpegSubtitleStream> _stream;
80 boost::signals2::scoped_connection _content_connection;
81 boost::signals2::scoped_connection _job_manager_connection;
83 std::weak_ptr<Job> _job;
85 static int const NONE;
86 static int const OUTLINE;
87 static int const SHADOW;