Remove subtitle language from text content.
[dcpomatic.git] / src / wx / text_panel.h
1 /*
2     Copyright (C) 2012-2020 Carl Hetherington <cth@carlh.net>
3
4     This file is part of DCP-o-matic.
5
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.
10
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.
15
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/>.
18
19 */
20
21 #include "content_sub_panel.h"
22
23 class wxCheckBox;
24 class wxSpinCtrl;
25 class TextView;
26 class FontsDialog;
27 class SubtitleAnalysis;
28
29 class TextPanel : public ContentSubPanel
30 {
31 public:
32         TextPanel (ContentPanel *, TextType t);
33
34         void film_changed (Film::Property);
35         void film_content_changed (int);
36         void content_selection_changed ();
37
38 private:
39         void use_toggled ();
40         void type_changed ();
41         void burn_toggled ();
42         void x_offset_changed ();
43         void y_offset_changed ();
44         void x_scale_changed ();
45         void y_scale_changed ();
46         void line_spacing_changed ();
47         void dcp_track_changed ();
48         void stream_changed ();
49         void text_view_clicked ();
50         void fonts_dialog_clicked ();
51         void reference_clicked ();
52         void appearance_dialog_clicked ();
53         void outline_subtitles_changed ();
54         TextType current_type () const;
55         void update_dcp_tracks ();
56         void update_dcp_track_selection ();
57         void add_to_grid ();
58         void try_to_load_analysis ();
59         void analysis_finished ();
60
61         void setup_sensitivity ();
62         void setup_visibility ();
63
64         void update_outline_subtitles_in_viewer ();
65         void clear_outline_subtitles ();
66
67         wxCheckBox* _reference;
68         wxStaticText* _reference_note;
69         wxCheckBox* _outline_subtitles;
70         wxCheckBox* _use;
71         wxChoice* _type;
72         wxCheckBox* _burn;
73         wxStaticText* _offset_label;
74         wxStaticText* _x_offset_label;
75         wxStaticText* _x_offset_pc_label;
76         wxStaticText* _y_offset_label;
77         wxStaticText* _y_offset_pc_label;
78         wxSpinCtrl* _x_offset;
79         wxSpinCtrl* _y_offset;
80         wxStaticText* _scale_label;
81         wxStaticText* _x_scale_label;
82         wxStaticText* _x_scale_pc_label;
83         wxStaticText* _y_scale_label;
84         wxStaticText* _y_scale_pc_label;
85         wxSpinCtrl* _x_scale;
86         wxSpinCtrl* _y_scale;
87         wxStaticText* _line_spacing_label;
88         wxStaticText* _line_spacing_pc_label;
89         wxSpinCtrl* _line_spacing;
90         wxStaticText* _dcp_track_label;
91         wxChoice* _dcp_track;
92         wxStaticText* _stream_label;
93         wxChoice* _stream;
94         wxButton* _text_view_button;
95         TextView* _text_view;
96         wxButton* _fonts_dialog_button;
97         FontsDialog* _fonts_dialog;
98         wxButton* _appearance_dialog_button;
99         TextType _original_type;
100
101         int _outline_subtitles_row;
102         int _ccap_track_row;
103
104         boost::weak_ptr<Content> _analysis_content;
105         boost::signals2::scoped_connection _analysis_finished_connection;
106         boost::shared_ptr<SubtitleAnalysis> _analysis;
107         bool _loading_analysis;
108 };