2 Copyright (C) 2015-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/>.
23 #include "lib/change_signaller.h"
25 #include "lib/warnings.h"
26 DCPOMATIC_DISABLE_WARNINGS
28 DCPOMATIC_ENABLE_WARNINGS
29 #include <boost/signals2.hpp>
33 class wxColourPickerCtrl;
36 class RGBAColourPicker;
37 class FFmpegSubtitleStream;
44 class SubtitleAppearanceDialog : public wxDialog
47 SubtitleAppearanceDialog (wxWindow* parent, std::shared_ptr<const Film> film, std::shared_ptr<Content> content, std::shared_ptr<TextContent> caption);
52 void setup_sensitivity ();
54 wxCheckBox* set_to (wxWindow* w, int& r);
55 void content_change (ChangeType type);
56 void active_jobs_changed (boost::optional<std::string> last);
59 std::weak_ptr<const Film> _film;
60 wxCheckBox* _force_colour;
61 wxColourPickerCtrl* _colour;
62 wxCheckBox* _force_effect;
64 wxCheckBox* _force_effect_colour;
65 wxColourPickerCtrl* _effect_colour;
66 wxCheckBox* _force_fade_in;
67 Timecode<dcpomatic::ContentTime>* _fade_in;
68 wxCheckBox* _force_fade_out;
69 Timecode<dcpomatic::ContentTime>* _fade_out;
70 wxSpinCtrl* _outline_width;
71 wxGridBagSizer* _table;
72 std::map<RGBA, RGBAColourPicker*> _pickers;
74 wxBoxSizer* _overall_sizer;
75 wxScrolled<wxPanel>* _colours_panel;
76 wxStaticText* _finding = nullptr;
77 wxFlexGridSizer* _colour_table;
79 std::shared_ptr<Content> _content;
80 std::shared_ptr<TextContent> _text;
81 std::shared_ptr<FFmpegSubtitleStream> _stream;
83 boost::signals2::scoped_connection _content_connection;
84 boost::signals2::scoped_connection _job_manager_connection;
86 std::weak_ptr<Job> _job;
88 static int const NONE;
89 static int const OUTLINE;
90 static int const SHADOW;