2 Copyright (C) 2012-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 "content_sub_panel.h"
27 class LanguageTagWidget;
31 class SubtitleAnalysis;
34 class TextPanel : public ContentSubPanel
37 TextPanel (ContentPanel *, TextType t);
39 void film_changed (Film::Property);
40 void film_content_changed (int);
41 void content_selection_changed ();
47 void x_offset_changed ();
48 void y_offset_changed ();
49 void x_scale_changed ();
50 void y_scale_changed ();
51 void line_spacing_changed ();
52 void dcp_track_changed ();
53 void stream_changed ();
54 void text_view_clicked ();
55 void fonts_dialog_clicked ();
56 void reference_clicked ();
57 void appearance_dialog_clicked ();
58 void outline_subtitles_changed ();
59 TextType current_type () const;
60 void update_dcp_tracks ();
61 void update_dcp_track_selection ();
63 void try_to_load_analysis ();
64 void analysis_finished ();
65 void language_changed ();
66 void language_is_additional_changed ();
68 void setup_sensitivity ();
69 void setup_visibility ();
71 void update_outline_subtitles_in_viewer ();
72 void clear_outline_subtitles ();
74 wxCheckBox* _reference;
75 wxStaticText* _reference_note;
76 wxCheckBox* _outline_subtitles = nullptr;
80 wxStaticText* _offset_label;
81 wxStaticText* _x_offset_label;
82 wxStaticText* _x_offset_pc_label;
83 wxStaticText* _y_offset_label;
84 wxStaticText* _y_offset_pc_label;
87 wxStaticText* _scale_label;
88 wxStaticText* _x_scale_label;
89 wxStaticText* _x_scale_pc_label;
90 wxStaticText* _y_scale_label;
91 wxStaticText* _y_scale_pc_label;
94 wxStaticText* _line_spacing_label;
95 wxStaticText* _line_spacing_pc_label;
96 SpinCtrl* _line_spacing;
97 wxStaticText* _dcp_track_label = nullptr;
98 wxChoice* _dcp_track = nullptr;
99 wxStaticText* _stream_label;
101 wxButton* _text_view_button;
102 TextView* _text_view = nullptr;
103 wxButton* _fonts_dialog_button;
104 FontsDialog* _fonts_dialog = nullptr;
105 wxButton* _appearance_dialog_button;
106 TextType _original_type;
107 wxStaticText* _language_label = nullptr;
108 LanguageTagWidget* _language = nullptr;
109 wxSizer* _language_sizer = nullptr;
110 wxChoice* _language_type = nullptr;
112 int _outline_subtitles_row;
113 int _ccap_track_or_language_row;
115 std::weak_ptr<Content> _analysis_content;
116 boost::signals2::scoped_connection _analysis_finished_connection;
117 std::shared_ptr<SubtitleAnalysis> _analysis;
118 bool _loading_analysis = false;