#include "wx/file_dialog_wrapper.h"
#include "wx/new_dkdm_folder_dialog.h"
#include "wx/editable_list.h"
+#include "wx/static_text.h"
#include "lib/config.h"
#include "lib/util.h"
#include "lib/screen.h"
wxFont subheading_font (*wxNORMAL_FONT);
subheading_font.SetWeight (wxFONTWEIGHT_BOLD);
- wxStaticText* h = new wxStaticText (overall_panel, wxID_ANY, _("Screens"));
+ wxStaticText* h = new StaticText (overall_panel, _("Screens"));
h->SetFont (subheading_font);
left->Add (h, 0, wxALIGN_CENTER_VERTICAL | wxBOTTOM, DCPOMATIC_SIZER_Y_GAP);
_screens = new ScreensPanel (overall_panel);
left->Add (_screens, 1, wxEXPAND | wxBOTTOM, DCPOMATIC_SIZER_Y_GAP);
/// TRANSLATORS: translate the word "Timing" here; do not include the "KDM|" prefix
- h = new wxStaticText (overall_panel, wxID_ANY, S_("KDM|Timing"));
+ h = new StaticText (overall_panel, S_("KDM|Timing"));
h->SetFont (subheading_font);
right->Add (h, 0, wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_Y_GAP * 2);
_timing = new KDMTimingPanel (overall_panel);
right->Add (_timing, 0, wxALL, DCPOMATIC_SIZER_Y_GAP);
- h = new wxStaticText (overall_panel, wxID_ANY, _("DKDM"));
+ h = new StaticText (overall_panel, _("DKDM"));
h->SetFont (subheading_font);
right->Add (h, 0, wxALIGN_CENTER_VERTICAL | wxTOP, DCPOMATIC_SIZER_Y_GAP * 2);
wxBoxSizer* dkdm_sizer = new wxBoxSizer (wxHORIZONTAL);
add_dkdm_view (Config::instance()->dkdms());
- h = new wxStaticText (overall_panel, wxID_ANY, _("Output"));
+ h = new StaticText (overall_panel, _("Output"));
h->SetFont (subheading_font);
right->Add (h, 0, wxALIGN_CENTER_VERTICAL | wxTOP, DCPOMATIC_SIZER_Y_GAP * 2);
/* XXX: hard-coded non-interop here */
#include "wx/wx_util.h"
#include "wx/wx_signal_manager.h"
+#include "wx/static_text.h"
#include "lib/util.h"
#include "lib/encoded_log_entry.h"
#include "lib/encode_server.h"
wxFlexGridSizer* state_sizer = new wxFlexGridSizer (2, DCPOMATIC_SIZER_GAP, DCPOMATIC_SIZER_GAP);
add_label_to_sizer (state_sizer, this, _("Frames per second"), true);
- _fps = new wxStaticText (this, wxID_ANY, wxT(""));
+ _fps = new StaticText (this, wxT(""));
state_sizer->Add (_fps);
wxFlexGridSizer* log_sizer = new wxFlexGridSizer (1, DCPOMATIC_SIZER_GAP, DCPOMATIC_SIZER_GAP);
/*
- Copyright (C) 2013-2017 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "about_dialog.h"
#include "wx_util.h"
+#include "static_text.h"
#include "lib/version.h"
#include "lib/compose.hpp"
#include <wx/notebook.h>
wxFont version_font (*wxNORMAL_FONT);
version_font.SetWeight (wxFONTWEIGHT_BOLD);
- wxStaticText* t = new wxStaticText (this, wxID_ANY, _("DCP-o-matic"));
+ wxStaticText* t = new StaticText (this, _("DCP-o-matic"));
t->SetFont (title_font);
sizer->Add (t, wxSizerFlags().Centre().Border(wxALL, 16));
wxString s;
if (strcmp (dcpomatic_git_commit, "release") == 0) {
- t = new wxStaticText (this, wxID_ANY, std_to_wx (String::compose ("Version %1", dcpomatic_version)));
+ t = new StaticText (this, std_to_wx(String::compose("Version %1", dcpomatic_version)));
} else {
- t = new wxStaticText (this, wxID_ANY, std_to_wx (String::compose ("Version %1 git %2", dcpomatic_version, dcpomatic_git_commit)));
+ t = new StaticText (this, std_to_wx(String::compose("Version %1 git %2", dcpomatic_version, dcpomatic_git_commit)));
}
t->SetFont (version_font);
sizer->Add (t, wxSizerFlags().Centre().Border(wxALL, 2));
sizer->AddSpacer (12);
- t = new wxStaticText (
- this, wxID_ANY,
+ t = new StaticText (
+ this,
_("Free, open-source DCP creation from almost anything."),
wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER
);
sizer->Add (h, wxSizerFlags().Centre().Border(wxALL, 8));
- t = new wxStaticText (
- this, wxID_ANY,
+ t = new StaticText (
+ this,
_("(C) 2012-2018 Carl Hetherington, Terrence Meiczinger\n Ole Laursen, Brecht Sanders"),
wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER
);
#include "audio_dialog.h"
#include "audio_plot.h"
#include "wx_util.h"
+#include "static_text.h"
+#include "check_box.h"
#include "lib/audio_analysis.h"
#include "lib/film.h"
#include "lib/analyse_audio_job.h"
wxBoxSizer* left = new wxBoxSizer (wxVERTICAL);
- _cursor = new wxStaticText (this, wxID_ANY, wxT("Cursor: none"));
+ _cursor = new StaticText (this, wxT("Cursor: none"));
left->Add (_cursor, 0, wxTOP, DCPOMATIC_SIZER_Y_GAP);
_plot = new AudioPlot (this);
left->Add (_plot, 1, wxTOP | wxEXPAND, 12);
- _sample_peak = new wxStaticText (this, wxID_ANY, wxT (""));
+ _sample_peak = new StaticText (this, wxT (""));
left->Add (_sample_peak, 0, wxTOP, DCPOMATIC_SIZER_Y_GAP);
- _true_peak = new wxStaticText (this, wxID_ANY, wxT (""));
+ _true_peak = new StaticText (this, wxT (""));
left->Add (_true_peak, 0, wxTOP, DCPOMATIC_SIZER_Y_GAP);
- _integrated_loudness = new wxStaticText (this, wxID_ANY, wxT (""));
+ _integrated_loudness = new StaticText (this, wxT (""));
left->Add (_integrated_loudness, 0, wxTOP, DCPOMATIC_SIZER_Y_GAP);
- _loudness_range = new wxStaticText (this, wxID_ANY, wxT (""));
+ _loudness_range = new StaticText (this, wxT (""));
left->Add (_loudness_range, 0, wxTOP, DCPOMATIC_SIZER_Y_GAP);
lr_sizer->Add (left, 1, wxALL | wxEXPAND, 12);
wxBoxSizer* right = new wxBoxSizer (wxVERTICAL);
{
- wxStaticText* m = new wxStaticText (this, wxID_ANY, _("Channels"));
+ wxStaticText* m = new StaticText (this, _("Channels"));
m->SetFont (subheading_font);
right->Add (m, 1, wxALIGN_CENTER_VERTICAL | wxTOP | wxBOTTOM, 16);
}
for (int i = 0; i < _channels; ++i) {
- _channel_checkbox[i] = new wxCheckBox (this, wxID_ANY, std_to_wx (audio_channel_name (i)));
+ _channel_checkbox[i] = new CheckBox (this, std_to_wx(audio_channel_name(i)));
_channel_checkbox[i]->SetForegroundColour(wxColour(_plot->colour(i)));
right->Add (_channel_checkbox[i], 0, wxEXPAND | wxALL, 3);
_channel_checkbox[i]->Bind (wxEVT_CHECKBOX, boost::bind (&AudioDialog::channel_clicked, this, _1));
}
{
- wxStaticText* m = new wxStaticText (this, wxID_ANY, _("Type"));
+ wxStaticText* m = new StaticText (this, _("Type"));
m->SetFont (subheading_font);
right->Add (m, 1, wxALIGN_CENTER_VERTICAL | wxTOP, 16);
}
};
for (int i = 0; i < AudioPoint::COUNT; ++i) {
- _type_checkbox[i] = new wxCheckBox (this, wxID_ANY, types[i]);
+ _type_checkbox[i] = new CheckBox (this, types[i]);
right->Add (_type_checkbox[i], 0, wxEXPAND | wxALL, 3);
_type_checkbox[i]->Bind (wxEVT_CHECKBOX, boost::bind (&AudioDialog::type_clicked, this, _1));
}
{
- wxStaticText* m = new wxStaticText (this, wxID_ANY, _("Smoothing"));
+ wxStaticText* m = new StaticText (this, _("Smoothing"));
m->SetFont (subheading_font);
right->Add (m, 1, wxALIGN_CENTER_VERTICAL | wxTOP, 16);
}
/*
- Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "gain_calculator_dialog.h"
#include "content_panel.h"
#include "audio_dialog.h"
+#include "static_text.h"
+#include "check_box.h"
#include "lib/config.h"
#include "lib/ffmpeg_audio_stream.h"
#include "lib/ffmpeg_content.h"
: ContentSubPanel (p, _("Audio"))
, _audio_dialog (0)
{
- _reference = new wxCheckBox (this, wxID_ANY, _("Use this DCP's audio as OV and make VF"));
- _reference_note = new wxStaticText (this, wxID_ANY, wxT(""));
+ _reference = new CheckBox (this, _("Use this DCP's audio as OV and make VF"));
+ _reference_note = new StaticText (this, wxT(""));
_reference_note->Wrap (200);
wxFont font = _reference_note->GetFont();
font.SetStyle(wxFONTSTYLE_ITALIC);
_reference_note->SetFont(font);
_show = new wxButton (this, wxID_ANY, _("Show graph of audio levels..."));
- _peak = new wxStaticText (this, wxID_ANY, wxT (""));
+ _peak = new StaticText (this, wxT (""));
_gain_label = create_label (this, _("Gain"), true);
_gain = new ContentSpinCtrlDouble<AudioContent> (
_mapping = new AudioMappingView (this);
_sizer->Add (_mapping, 1, wxEXPAND | wxALL, 6);
- _description = new wxStaticText (this, wxID_ANY, wxT (" \n"), wxDefaultPosition, wxDefaultSize);
+ _description = new StaticText (this, wxT(" \n"), wxDefaultPosition, wxDefaultSize);
_sizer->Add (_description, 0, wxALL, 12);
_description->SetFont (font);
--- /dev/null
+/*
+ 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 "check_box.h"
+
+using std::cout;
+
+CheckBox::CheckBox (wxWindow* parent, wxString label)
+ : wxCheckBox (parent, wxID_ANY, label)
+ , I18NHook (this)
+{
+
+}
+
+void
+CheckBox::set_text (wxString text)
+{
+ SetLabel (text);
+}
+
+wxString
+CheckBox::get_text () const
+{
+ return GetLabel ();
+}
--- /dev/null
+/*
+ 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/>.
+
+*/
+
+#ifndef DCPOMATIC_CHECK_BOX_H
+#define DCPOMATIC_CHECK_BOX_H
+
+#include "i18n_hook.h"
+#include <wx/wx.h>
+
+class CheckBox : public wxCheckBox, public I18NHook
+{
+public:
+ CheckBox (wxWindow* parent, wxString label);
+
+ void set_text (wxString text);
+ wxString get_text () const;
+};
+
+#endif
/*
- Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
*/
#include "wx_util.h"
+#include "static_text.h"
#include "colour_conversion_editor.h"
+#include "check_box.h"
#include "lib/colour_conversion.h"
#include <dcp/locale_convert.h>
#include <dcp/gamma_transfer_function.h>
wxFlexGridSizer* rgb_to_xyz_sizer = new wxFlexGridSizer (3, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
for (int i = 0; i < 3; ++i) {
for (int j = 0; j < 3; ++j) {
- _rgb_to_xyz[i][j] = new wxStaticText (this, wxID_ANY, wxT (""), wxDefaultPosition, size, 0);
+ _rgb_to_xyz[i][j] = new StaticText (this, wxT (""), wxDefaultPosition, size, 0);
rgb_to_xyz_sizer->Add (_rgb_to_xyz[i][j]);
}
}
subhead (table, this, _("White point adjustment"), r);
- _adjust_white = new wxCheckBox (this, wxID_ANY, _("Adjust white point to"));
+ _adjust_white = new CheckBox (this, _("Adjust white point to"));
table->Add (_adjust_white, wxGBPosition (r, 0));
_adjusted_white_x = new wxTextCtrl (this, wxID_ANY, wxT (""), wxDefaultPosition, size, 0, validator);
table->Add (_adjusted_white_x, wxGBPosition (r, 1));
wxFlexGridSizer* bradford_sizer = new wxFlexGridSizer (3, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
for (int i = 0; i < 3; ++i) {
for (int j = 0; j < 3; ++j) {
- _bradford[i][j] = new wxStaticText (this, wxID_ANY, wxT (""), wxDefaultPosition, size, 0);
+ _bradford[i][j] = new StaticText (this, wxT (""), wxDefaultPosition, size, 0);
bradford_sizer->Add (_bradford[i][j]);
}
}
subhead (table, this, _("Output gamma correction"), r);
- _output = new wxCheckBox (this, wxID_ANY, _("Inverse 2.6 gamma correction on output"));
+ _output = new CheckBox (this, _("Inverse 2.6 gamma correction on output"));
table->Add (_output, wxGBPosition (r, 0), wxGBSpan (1, 2));
_input_gamma->SetRange (0.1, 4.0);
wxStaticText *
ColourConversionEditor::subhead (wxGridBagSizer* sizer, wxWindow* parent, wxString text, int& row) const
{
- wxStaticText* m = new wxStaticText (parent, wxID_ANY, text);
+ wxStaticText* m = new StaticText (parent, text);
wxFont font (*wxNORMAL_FONT);
font.SetWeight (wxFONTWEIGHT_BOLD);
m->SetFont (font);
*/
#include "config_dialog.h"
+#include "static_text.h"
+#include "check_box.h"
#include "nag_dialog.h"
using std::string;
void
GeneralPage::add_language_controls (wxGridBagSizer* table, int& r)
{
- _set_language = new wxCheckBox (_panel, wxID_ANY, _("Set language"));
+ _set_language = new CheckBox (_panel, _("Set language"));
table->Add (_set_language, wxGBPosition (r, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
_language = new wxChoice (_panel, wxID_ANY);
vector<pair<string, string> > languages;
void
GeneralPage::add_play_sound_controls (wxGridBagSizer* table, int& r)
{
- _sound = new wxCheckBox (_panel, wxID_ANY, _("Play sound via"));
+ _sound = new CheckBox (_panel, _("Play sound via"));
table->Add (_sound, wxGBPosition (r, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
_sound_output = new wxChoice (_panel, wxID_ANY);
table->Add (_sound_output, wxGBPosition (r, 1));
void
GeneralPage::add_update_controls (wxGridBagSizer* table, int& r)
{
- _check_for_updates = new wxCheckBox (_panel, wxID_ANY, _("Check for updates on startup"));
+ _check_for_updates = new CheckBox (_panel, _("Check for updates on startup"));
table->Add (_check_for_updates, wxGBPosition (r, 0), wxGBSpan (1, 2));
++r;
- _check_for_test_updates = new wxCheckBox (_panel, wxID_ANY, _("Check for testing updates on startup"));
+ _check_for_test_updates = new CheckBox (_panel, _("Check for testing updates on startup"));
table->Add (_check_for_test_updates, wxGBPosition (r, 0), wxGBSpan (1, 2));
++r;
_sizer = new wxBoxSizer (wxVERTICAL);
{
- wxStaticText* m = new wxStaticText (this, wxID_ANY, title);
+ wxStaticText* m = new StaticText (this, title);
m->SetFont (subheading_font);
_sizer->Add (m, 0, wxALL, border);
}
int r = 0;
add_label_to_sizer (table, this, _("Leaf private key"), true, wxGBPosition (r, 0));
- _private_key = new wxStaticText (this, wxID_ANY, wxT (""));
+ _private_key = new StaticText (this, wxT(""));
wxFont font = _private_key->GetFont ();
font.SetFamily (wxFONTFAMILY_TELETYPE);
_private_key->SetFont (font);
table->Add (_button_sizer, wxGBPosition (r, 0), wxGBSpan (1, 4));
++r;
- _private_key_bad = new wxStaticText (this, wxID_ANY, _("Leaf private key does not match leaf certificate!"));
+ _private_key_bad = new StaticText (this, _("Leaf private key does not match leaf certificate!"));
font = *wxSMALL_FONT;
font.SetWeight (wxFONTWEIGHT_BOLD);
_private_key_bad->SetFont (font);
wxSizer* sizer = _panel->GetSizer();
{
- wxStaticText* m = new wxStaticText (_panel, wxID_ANY, _("Decrypting KDMs"));
+ wxStaticText* m = new StaticText (_panel, _("Decrypting KDMs"));
m->SetFont (subheading_font);
sizer->Add (m, 0, wxALL, _border);
}
decryption_advanced->Bind (wxEVT_BUTTON, bind (&KeysPage::decryption_advanced, this));
{
- wxStaticText* m = new wxStaticText (_panel, wxID_ANY, _("Signing DCPs and KDMs"));
+ wxStaticText* m = new StaticText (_panel, _("Signing DCPs and KDMs"));
m->SetFont (subheading_font);
sizer->Add (m, 0, wxALL, _border);
}
/*
- Copyright (C) 2017 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2017-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "config_move_dialog.h"
#include "wx_util.h"
+#include "static_text.h"
#include <boost/filesystem.hpp>
ConfigMoveDialog::ConfigMoveDialog (wxWindow* parent, boost::filesystem::path new_file)
std_to_wx(new_file.string()).data()
);
- _sizer->Add (new wxStaticText (this, wxID_ANY, message), 1, wxEXPAND | wxALL, DCPOMATIC_DIALOG_BORDER);
+ _sizer->Add (new StaticText (this, message), 1, wxEXPAND | wxALL, DCPOMATIC_DIALOG_BORDER);
layout ();
}
/*
- Copyright (C) 2016 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2016-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "confirm_kdm_email_dialog.h"
#include "wx_util.h"
+#include "static_text.h"
+#include "check_box.h"
#include "lib/config.h"
#include "lib/cinema_kdms.h"
#include <boost/foreach.hpp>
message += "\t" + std_to_wx (i) + "\n";
}
- _sizer->Add (new wxStaticText (this, wxID_ANY, message), 1, wxEXPAND | wxALL, DCPOMATIC_DIALOG_BORDER);
+ _sizer->Add (new StaticText (this, message), 1, wxEXPAND | wxALL, DCPOMATIC_DIALOG_BORDER);
- wxCheckBox* shut_up = new wxCheckBox (this, wxID_ANY, _("Don't ask this again"));
+ wxCheckBox* shut_up = new CheckBox (this, _("Don't ask this again"));
_sizer->Add (shut_up, 0, wxALL, DCPOMATIC_DIALOG_BORDER);
shut_up->Bind (wxEVT_CHECKBOX, bind (&ConfirmKDMEmailDialog::shut_up, this, _1));
/*
- Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
*/
-#include "lib/colour_conversion.h"
-#include "lib/config.h"
-#include "lib/util.h"
#include "wx_util.h"
+#include "check_box.h"
#include "content_colour_conversion_dialog.h"
#include "colour_conversion_editor.h"
+#include "lib/colour_conversion.h"
+#include "lib/config.h"
+#include "lib/util.h"
#include <wx/statline.h>
#include <boost/foreach.hpp>
#include <iostream>
SetSizer (overall_sizer);
wxFlexGridSizer* table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_Y_GAP - 2, DCPOMATIC_SIZER_X_GAP);
- _preset_check = new wxCheckBox (this, wxID_ANY, _("Use preset"));
+ _preset_check = new CheckBox (this, _("Use preset"));
table->Add (_preset_check, 0, wxALIGN_CENTER_VERTICAL);
_preset_choice = new wxChoice (this, wxID_ANY);
table->Add (_preset_choice);
/*
- Copyright (C) 2015 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2015-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "content_properties_dialog.h"
#include "wx_util.h"
+#include "static_text.h"
#include "lib/content.h"
#include "lib/video_content.h"
#include "lib/audio_content.h"
break;
}
- wxStaticText* m = new wxStaticText (this, wxID_ANY, category_name);
+ wxStaticText* m = new StaticText (this, category_name);
wxFont font (*wxNORMAL_FONT);
font.SetWeight (wxFONTWEIGHT_BOLD);
m->SetFont (font);
BOOST_FOREACH (UserProperty j, i->second) {
add (std_to_wx (j.key), true);
- add (new wxStaticText (this, wxID_ANY, std_to_wx (j.value + " " + j.unit)));
+ add (new StaticText (this, std_to_wx (j.value + " " + j.unit)));
}
}
#include "playhead_to_timecode_dialog.h"
#include "playhead_to_frame_dialog.h"
#include "content_view.h"
+#include "static_text.h"
+#include "check_box.h"
#include "lib/job_manager.h"
#include "lib/player_video.h"
#include "lib/dcp_content.h"
, _rewind_button (new wxButton (this, wxID_ANY, wxT("|<")))
, _back_button (new wxButton (this, wxID_ANY, wxT("<")))
, _forward_button (new wxButton (this, wxID_ANY, wxT(">")))
- , _frame_number (new wxStaticText (this, wxID_ANY, wxT("")))
- , _timecode (new wxStaticText (this, wxID_ANY, wxT("")))
+ , _frame_number (new StaticText (this, wxT("")))
+ , _timecode (new StaticText (this, wxT("")))
{
_v_sizer = new wxBoxSizer (wxVERTICAL);
SetSizer (_v_sizer);
wxBoxSizer* view_options = new wxBoxSizer (wxHORIZONTAL);
if (editor_controls) {
- _outline_content = new wxCheckBox (this, wxID_ANY, _("Outline content"));
+ _outline_content = new CheckBox (this, _("Outline content"));
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);
- _jump_to_selected = new wxCheckBox (this, wxID_ANY, _("Jump to selected content"));
+ _jump_to_selected = new CheckBox (this, _("Jump to selected content"));
view_options->Add (_jump_to_selected, 0, wxLEFT | wxRIGHT | wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_GAP);
}
/*
- Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "isdcf_metadata_dialog.h"
#include "audio_dialog.h"
#include "focus_manager.h"
+#include "check_box.h"
+#include "static_text.h"
+#include "check_box.h"
#include "lib/ratio.h"
#include "lib/config.h"
#include "lib/dcp_content_type.h"
_name = new wxTextCtrl (_panel, wxID_ANY);
FocusManager::instance()->add(_name);
- _use_isdcf_name = new wxCheckBox (_panel, wxID_ANY, _("Use ISDCF name"));
+ _use_isdcf_name = new CheckBox (_panel, _("Use ISDCF name"));
_edit_isdcf_button = new wxButton (_panel, wxID_ANY, _("Details..."));
_copy_isdcf_name_button = new wxButton (_panel, wxID_ANY, _("Copy as name"));
/* wxST_ELLIPSIZE_MIDDLE works around a bug in GTK2 and/or wxWidgets, see
http://trac.wxwidgets.org/ticket/12539
*/
- _dcp_name = new wxStaticText (
- _panel, wxID_ANY, wxT (""), wxDefaultPosition, wxDefaultSize,
+ _dcp_name = new StaticText (
+ _panel, wxT (""), wxDefaultPosition, wxDefaultSize,
wxALIGN_CENTRE_HORIZONTAL | wxST_NO_AUTORESIZE | wxST_ELLIPSIZE_MIDDLE
);
_dcp_content_type_label = create_label (_panel, _("Content Type"), true);
_dcp_content_type = new wxChoice (_panel, wxID_ANY);
- _signed = new wxCheckBox (_panel, wxID_ANY, _("Signed"));
- _encrypted = new wxCheckBox (_panel, wxID_ANY, _("Encrypted"));
+ _signed = new CheckBox (_panel, _("Signed"));
+ _encrypted = new CheckBox (_panel, _("Encrypted"));
wxClientDC dc (_panel);
wxSize size = dc.GetTextExtent (wxT ("GGGGGGGG..."));
size.SetHeight (-1);
_key_label = create_label (_panel, _("Key"), true);
- _key = new wxStaticText (_panel, wxID_ANY, "", wxDefaultPosition, size);
+ _key = new StaticText (_panel, "", wxDefaultPosition, size);
_edit_key = new wxButton (_panel, wxID_ANY, _("Edit..."));
_reels_label = create_label (_panel, _("Reels"), true);
_standard_label = create_label (_panel, _("Standard"), true);
_standard = new wxChoice (_panel, wxID_ANY);
- _upload_after_make_dcp = new wxCheckBox (_panel, wxID_ANY, _("Upload DCP to TMS after it is made"));
+ _upload_after_make_dcp = new CheckBox (_panel, _("Upload DCP to TMS after it is made"));
_notebook = new wxNotebook (_panel, wxID_ANY);
_sizer->Add (_notebook, 1, wxEXPAND | wxTOP, 6);
_container_label = create_label (panel, _("Container"), true);
_container = new wxChoice (panel, wxID_ANY);
- _container_size = new wxStaticText (panel, wxID_ANY, wxT (""));
+ _container_size = new StaticText (panel, wxT (""));
_resolution_label = create_label (panel, _("Resolution"), true);
_resolution = new wxChoice (panel, wxID_ANY);
_best_frame_rate = new wxButton (panel, wxID_ANY, _("Use best"));
_frame_rate_sizer->Add (_best_frame_rate, 1, wxALIGN_CENTER_VERTICAL);
- _three_d = new wxCheckBox (panel, wxID_ANY, _("3D"));
+ _three_d = new CheckBox (panel, _("3D"));
_j2k_bandwidth_label = create_label (panel, _("JPEG2000 bandwidth\nfor newly-encoded data"), true);
_j2k_bandwidth = new wxSpinCtrl (panel, wxID_ANY);
_mbits_label = create_label (panel, _("Mbit/s"), false);
- _reencode_j2k = new wxCheckBox (panel, wxID_ANY, _("Re-encode JPEG2000 data from input"));
+ _reencode_j2k = new CheckBox (panel, _("Re-encode JPEG2000 data from input"));
_container->Bind (wxEVT_CHOICE, boost::bind(&DCPPanel::container_changed, this));
_frame_rate_choice->Bind (wxEVT_CHOICE, boost::bind(&DCPPanel::frame_rate_choice_changed, this));
*/
+#include "dir_picker_ctrl.h"
+#include "wx_util.h"
+#include "static_text.h"
#include <wx/wx.h>
#include <wx/stdpaths.h>
#include <wx/filepicker.h>
#include <boost/filesystem.hpp>
-#include "dir_picker_ctrl.h"
-#include "wx_util.h"
using namespace std;
using namespace boost;
{
_sizer = new wxBoxSizer (wxHORIZONTAL);
- _folder = new wxStaticText (this, wxID_ANY, wxT (""));
+ _folder = new StaticText (this, wxT(""));
_sizer->Add (_folder, 1, wxEXPAND | wxALL, 6);
_browse = new wxButton (this, wxID_ANY, _("Browse..."));
_sizer->Add (_browse, 0);
/*
- Copyright (C) 2014-2015 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2014-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "christie_certificate_panel.h"
#include "gdc_certificate_panel.h"
#include "download_certificate_dialog.h"
+#include "static_text.h"
#include "wx_util.h"
using boost::optional;
_download = new wxButton (this, wxID_ANY, _("Download"));
sizer->Add (_download, 0, wxEXPAND | wxALL, DCPOMATIC_SIZER_GAP);
- _message = new wxStaticText (this, wxID_ANY, wxT (""));
+ _message = new StaticText (this, wxT (""));
sizer->Add (_message, 0, wxALL, DCPOMATIC_SIZER_GAP);
wxFont font = _message->GetFont();
font.SetStyle (wxFONTSTYLE_ITALIC);
#include "export_dialog.h"
#include "file_picker_ctrl.h"
#include "wx_util.h"
+#include "check_box.h"
#include <wx/filepicker.h>
#include <boost/bind.hpp>
_format = new wxChoice (this, wxID_ANY);
add (_format);
add_spacer ();
- _mixdown = new wxCheckBox (this, wxID_ANY, _("Mix audio down to stereo"));
+ _mixdown = new CheckBox (this, _("Mix audio down to stereo"));
add (_mixdown, false);
add_spacer ();
- _split_reels = new wxCheckBox (this, wxID_ANY, _("Write reels into separate files"));
+ _split_reels = new CheckBox (this, _("Write reels into separate files"));
add (_split_reels, false);
_x264_crf_label[0] = add (_("Quality"), true);
_x264_crf = new wxSlider (this, wxID_ANY, 23, 0, 51, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
/*
- Copyright (C) 2012-2017 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "wx_util.h"
#include "film_name_location_dialog.h"
+#include "check_box.h"
#ifdef DCPOMATIC_USE_OWN_PICKER
#include "dir_picker_ctrl.h"
#endif
add (_folder);
if (offer_templates) {
- _use_template = new wxCheckBox (this, wxID_ANY, _("From template"));
+ _use_template = new CheckBox (this, _("From template"));
add (_use_template);
_template_name = new wxChoice (this, wxID_ANY);
add (_template_name);
/*
- Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
* @brief A panel to select FFmpeg filters.
*/
-#include <iostream>
-#include <algorithm>
-#include "lib/filter.h"
#include "filter_editor.h"
#include "wx_util.h"
+#include "static_text.h"
+#include "check_box.h"
+#include "lib/filter.h"
+#include <iostream>
+#include <algorithm>
using namespace std;
for (CategoryMap::iterator i = categories.begin(); i != categories.end(); ++i) {
- wxStaticText* c = new wxStaticText (this, wxID_ANY, std_to_wx (i->first));
+ wxStaticText* c = new StaticText (this, std_to_wx(i->first));
wxFont font = c->GetFont();
font.SetWeight(wxFONTWEIGHT_BOLD);
c->SetFont(font);
sizer->Add (c);
for (list<Filter const *>::iterator j = i->second.begin(); j != i->second.end(); ++j) {
- wxCheckBox* b = new wxCheckBox (this, wxID_ANY, std_to_wx ((*j)->name ()));
+ wxCheckBox* b = new CheckBox (this, std_to_wx ((*j)->name ()));
bool const a = find (active.begin(), active.end(), *j) != active.end ();
b->SetValue (a);
_filters[*j] = b;
/*
- Copyright (C) 2015 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2015-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "font_files_dialog.h"
#include "system_font_dialog.h"
+#include "static_text.h"
using boost::bind;
for (int i = 0; i < FontFiles::VARIANTS; ++i) {
add (labels[i], true);
- _name[i] = new wxStaticText (
- this, wxID_ANY,
+ _name[i] = new StaticText (
+ this,
std_to_wx(_files.get(static_cast<FontFiles::Variant>(i)).get_value_or("").string()),
wxDefaultPosition,
wxSize (200, -1)
#include "nag_dialog.h"
#include "config_move_dialog.h"
#include "config_dialog.h"
+#include "static_text.h"
+#include "check_box.h"
#include "lib/config.h"
#include "lib/ratio.h"
#include "lib/filter.h"
add_play_sound_controls (table, r);
#ifdef DCPOMATIC_HAVE_EBUR128_PATCHED_FFMPEG
- _analyse_ebur128 = new wxCheckBox (_panel, wxID_ANY, _("Find integrated loudness, true peak and loudness range when analysing audio"));
+ _analyse_ebur128 = new CheckBox (_panel, _("Find integrated loudness, true peak and loudness range when analysing audio"));
table->Add (_analyse_ebur128, wxGBPosition (r, 0), wxGBSpan (1, 2));
++r;
#endif
- _automatic_audio_analysis = new wxCheckBox (_panel, wxID_ANY, _("Automatically analyse content audio"));
+ _automatic_audio_analysis = new CheckBox (_panel, _("Automatically analyse content audio"));
table->Add (_automatic_audio_analysis, wxGBPosition (r, 0), wxGBSpan (1, 2));
++r;
table->Add (_kdm_directory, 1, wxEXPAND);
- _upload_after_make_dcp = new wxCheckBox (_panel, wxID_ANY, _("Default to enabling upload of DCP to TMS"));
+ _upload_after_make_dcp = new CheckBox (_panel, _("Default to enabling upload of DCP to TMS"));
table->Add (_upload_after_make_dcp, 1, wxEXPAND);
_still_length->SetRange (1, 3600);
private:
void setup ()
{
- _use_any_servers = new wxCheckBox (_panel, wxID_ANY, _("Search network for servers"));
+ _use_any_servers = new CheckBox (_panel, _("Search network for servers"));
_panel->GetSizer()->Add (_use_any_servers, 0, wxALL, _border);
vector<string> columns;
table->AddGrowableCol (1, 1);
_panel->GetSizer()->Add (table, 1, wxEXPAND | wxALL, _border);
- _enable_message_box = new wxCheckBox (_panel, wxID_ANY, _("Message box"));
+ _enable_message_box = new CheckBox (_panel, _("Message box"));
table->Add (_enable_message_box, 1, wxEXPAND | wxALL);
table->AddSpacer (0);
- _enable_email = new wxCheckBox (_panel, wxID_ANY, _("Email"));
+ _enable_email = new CheckBox (_panel, _("Email"));
table->Add (_enable_email, 1, wxEXPAND | wxALL);
table->AddSpacer (0);
flags |= wxALIGN_RIGHT;
text += wxT (":");
#endif
- wxStaticText* m = new wxStaticText (parent, wxID_ANY, text);
+ wxStaticText* m = new StaticText (parent, text);
table->Add (m, 0, flags, DCPOMATIC_SIZER_Y_GAP);
}
table->Add (s, 1);
}
- _allow_any_dcp_frame_rate = new wxCheckBox (_panel, wxID_ANY, _("Allow any DCP frame rate"));
+ _allow_any_dcp_frame_rate = new CheckBox (_panel, _("Allow any DCP frame rate"));
table->Add (_allow_any_dcp_frame_rate, 1, wxEXPAND | wxALL);
table->AddSpacer (0);
- _allow_any_container = new wxCheckBox (_panel, wxID_ANY, _("Allow non-standard container ratios"));
+ _allow_any_container = new CheckBox (_panel, _("Allow non-standard container ratios"));
table->Add (_allow_any_container, 1, wxEXPAND | wxALL);
table->AddSpacer (0);
restart->SetFont (font);
table->AddSpacer (0);
- _only_servers_encode = new wxCheckBox (_panel, wxID_ANY, _("Only servers encode"));
+ _only_servers_encode = new CheckBox (_panel, _("Only servers encode"));
table->Add (_only_servers_encode, 1, wxEXPAND | wxALL);
table->AddSpacer (0);
{
add_top_aligned_label_to_sizer (table, _panel, _("Log"));
wxBoxSizer* t = new wxBoxSizer (wxVERTICAL);
- _log_general = new wxCheckBox (_panel, wxID_ANY, _("General"));
+ _log_general = new CheckBox (_panel, _("General"));
t->Add (_log_general, 1, wxEXPAND | wxALL);
- _log_warning = new wxCheckBox (_panel, wxID_ANY, _("Warnings"));
+ _log_warning = new CheckBox (_panel, _("Warnings"));
t->Add (_log_warning, 1, wxEXPAND | wxALL);
- _log_error = new wxCheckBox (_panel, wxID_ANY, _("Errors"));
+ _log_error = new CheckBox (_panel, _("Errors"));
t->Add (_log_error, 1, wxEXPAND | wxALL);
/// TRANSLATORS: translate the word "Timing" here; do not include the "Config|" prefix
- _log_timing = new wxCheckBox (_panel, wxID_ANY, S_("Config|Timing"));
+ _log_timing = new CheckBox (_panel, S_("Config|Timing"));
t->Add (_log_timing, 1, wxEXPAND | wxALL);
- _log_debug_decode = new wxCheckBox (_panel, wxID_ANY, _("Debug: decode"));
+ _log_debug_decode = new CheckBox (_panel, _("Debug: decode"));
t->Add (_log_debug_decode, 1, wxEXPAND | wxALL);
- _log_debug_encode = new wxCheckBox (_panel, wxID_ANY, _("Debug: encode"));
+ _log_debug_encode = new CheckBox (_panel, _("Debug: encode"));
t->Add (_log_debug_encode, 1, wxEXPAND | wxALL);
- _log_debug_email = new wxCheckBox (_panel, wxID_ANY, _("Debug: email sending"));
+ _log_debug_email = new CheckBox (_panel, _("Debug: email sending"));
t->Add (_log_debug_email, 1, wxEXPAND | wxALL);
table->Add (t, 0, wxALL, 6);
}
#ifdef DCPOMATIC_WINDOWS
- _win32_console = new wxCheckBox (_panel, wxID_ANY, _("Open console window"));
+ _win32_console = new CheckBox (_panel, _("Open console window"));
table->Add (_win32_console, 1, wxEXPAND | wxALL);
table->AddSpacer (0);
#endif
#include "hints_dialog.h"
#include "wx_util.h"
+#include "static_text.h"
+#include "check_box.h"
#include "lib/film.h"
#include "lib/hints.h"
#include "lib/config.h"
_gauge = new wxGauge (this, wxID_ANY, 100);
sizer->Add (_gauge, 0, wxALL | wxEXPAND, DCPOMATIC_SIZER_GAP);
- _gauge_message = new wxStaticText (this, wxID_ANY, wxT(""));
+ _gauge_message = new StaticText (this, wxT(""));
sizer->Add (_gauge_message, 0, wxALL | wxEXPAND, DCPOMATIC_SIZER_GAP);
_text = new wxRichTextCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (400, 300), wxRE_READONLY);
sizer->Add (_text, 1, wxEXPAND | wxALL, 6);
if (!ok) {
- wxCheckBox* b = new wxCheckBox (this, wxID_ANY, _("Don't show hints again"));
+ wxCheckBox* b = new CheckBox (this, _("Don't show hints again"));
sizer->Add (b, 0, wxALL, 6);
b->Bind (wxEVT_CHECKBOX, bind (&HintsDialog::shut_up, this, _1));
}
--- /dev/null
+/*
+ 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 "i18n_hook.h"
+#include "instant_i18n_dialog.h"
+#include "wx_util.h"
+#include "lib/cross.h"
+#include <wx/wx.h>
+#include <boost/bind.hpp>
+#include <boost/filesystem.hpp>
+
+I18NHook::I18NHook (wxWindow* window)
+ : _window (window)
+{
+ _window->Bind (wxEVT_MIDDLE_DOWN, bind(&I18NHook::handle, this, _1));
+}
+
+void
+I18NHook::handle (wxMouseEvent& ev)
+{
+ wxString const original = get_text ();
+
+ InstantI18NDialog* d = new InstantI18NDialog (_window, get_text());
+ d->ShowModal();
+ set_text (d->get());
+ _window->GetContainingSizer()->Layout();
+ ev.Skip ();
+
+ boost::filesystem::path file = "instant_i18n";
+
+ FILE* f = fopen_boost (file, "a");
+ if (!f) {
+ error_dialog (_window, wxString::Format(_("Could not open translation file %s"), std_to_wx(file.string()).data()));
+ return;
+ }
+ fprintf (f, "%s\n", wx_to_std(original).c_str());
+ fprintf (f, "%s\n", wx_to_std(get_text()).c_str());
+ fclose (f);
+}
--- /dev/null
+/*
+ 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/>.
+
+*/
+
+#ifndef DCPOMATIC_I18N_HOOK_H
+#define DCPOMATIC_I18N_HOOK_H
+
+#include <wx/wx.h>
+
+class I18NHook
+{
+public:
+ I18NHook (wxWindow* window);
+
+ virtual void set_text (wxString text) = 0;
+ virtual wxString get_text () const = 0;
+
+private:
+ void handle (wxMouseEvent &);
+
+ wxWindow* _window;
+};
+
+#endif
*/
#include "initial_setup_dialog.h"
+#include "static_text.h"
#include "lib/config.h"
#include <boost/bind.hpp>
: wxDialog (0, wxID_ANY, _("DCP-o-matic setup"))
{
wxBoxSizer* sizer = new wxBoxSizer (wxVERTICAL);
- wxStaticText* text1 = new wxStaticText (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(600, -1));
+ wxStaticText* text1 = new StaticText (this, wxEmptyString, wxDefaultPosition, wxSize(600, -1));
sizer->Add (text1, 1, wxEXPAND | wxALL, 12);
text1->SetLabelMarkup (
_full->SetValue (true);
}
- wxStaticText* text2 = new wxStaticText (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(400, -1));
+ wxStaticText* text2 = new StaticText (this, wxEmptyString, wxDefaultPosition, wxSize(400, -1));
sizer->Add (text2, 0, wxEXPAND | wxALL, 12);
text2->SetLabelMarkup (_("\nYou can change the mode at any time from the General page of Preferences."));
--- /dev/null
+/*
+ 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 "instant_i18n_dialog.h"
+#include "wx_util.h"
+#include <boost/bind.hpp>
+
+using boost::bind;
+
+InstantI18NDialog::InstantI18NDialog (wxWindow* parent, wxString text)
+ : wxDialog (parent, wxID_ANY, _("Translate"))
+{
+ wxBoxSizer* overall_sizer = new wxBoxSizer (wxVERTICAL);
+
+ _text = new wxTextCtrl (this, wxID_ANY, text, wxDefaultPosition, wxSize(200, -1), wxTE_PROCESS_ENTER);
+
+ _text->Bind (wxEVT_TEXT_ENTER, bind(&InstantI18NDialog::close, this));
+
+ overall_sizer->Add (_text, 0, wxEXPAND | wxALL, DCPOMATIC_DIALOG_BORDER);
+ SetSizerAndFit (overall_sizer);
+}
+
+wxString
+InstantI18NDialog::get () const
+{
+ return _text->GetValue ();
+}
+
+void
+InstantI18NDialog::close ()
+{
+ Close ();
+}
--- /dev/null
+/*
+ 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>
+
+class InstantI18NDialog : public wxDialog
+{
+public:
+ InstantI18NDialog (wxWindow* parent, wxString text);
+
+ wxString get () const;
+
+private:
+ void close ();
+
+ wxTextCtrl* _text;
+};
/*
- Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "isdcf_metadata_dialog.h"
#include "wx_util.h"
+#include "check_box.h"
#include "lib/film.h"
#include <wx/wx.h>
#include <wx/sizer.h>
add (_("Facility (e.g. DLA)"), true);
_facility = add (new wxTextCtrl (this, wxID_ANY));
- _temp_version = add (new wxCheckBox (this, wxID_ANY, _("Temp version")));
+ _temp_version = add (new CheckBox(this, _("Temp version")));
add_spacer ();
- _pre_release = add (new wxCheckBox (this, wxID_ANY, _("Pre-release")));
+ _pre_release = add (new CheckBox(this, _("Pre-release")));
add_spacer ();
- _red_band = add (new wxCheckBox (this, wxID_ANY, _("Red band")));
+ _red_band = add (new CheckBox(this, _("Red band")));
add_spacer ();
add (_("Chain"), true);
_chain = add (new wxTextCtrl (this, wxID_ANY));
- _two_d_version_of_three_d = add (new wxCheckBox (this, wxID_ANY, _("2D version of content available in 3D")));
+ _two_d_version_of_three_d = add (new CheckBox(this, _("2D version of content available in 3D")));
add_spacer ();
if (threed) {
#include "job_view.h"
#include "wx_util.h"
#include "message_dialog.h"
+#include "static_text.h"
+#include "check_box.h"
#include "lib/job.h"
#include "lib/job_manager.h"
#include "lib/compose.hpp"
/* This seems to be required to allow the gauge to shrink under OS X */
_gauge->SetMinSize (wxSize (0, -1));
_gauge_message->Add (_gauge, 0, wxEXPAND | wxLEFT | wxRIGHT);
- _message = new wxStaticText (_container, wxID_ANY, wxT (" \n "), wxDefaultPosition, wxDefaultSize, wxST_ELLIPSIZE_MIDDLE);
+ _message = new StaticText (_container, wxT(" \n "), wxDefaultPosition, wxDefaultSize, wxST_ELLIPSIZE_MIDDLE);
_gauge_message->Add (_message, 1, wxEXPAND | wxALIGN_CENTER_VERTICAL | wxALL, 6);
_table->Insert (n, _gauge_message, 1, wxEXPAND | wxLEFT | wxRIGHT);
++n;
_controls = new wxBoxSizer (wxVERTICAL);
_controls->Add (_buttons);
- _notify = new wxCheckBox (_container, wxID_ANY, _("Notify when complete"));
+ _notify = new CheckBox (_container, _("Notify when complete"));
_notify->Bind (wxEVT_CHECKBOX, bind (&JobView::notify_clicked, this));
_notify->SetValue (Config::instance()->default_notify());
_controls->Add (_notify);
*/
#include "kdm_advanced_dialog.h"
+#include "check_box.h"
KDMAdvancedDialog::KDMAdvancedDialog (wxWindow* parent, bool forensic_mark_video, bool forensic_mark_audio)
: TableDialog (parent, _("Advanced KDM options"), 2, 1, false)
{
- _forensic_mark_video = new wxCheckBox (this, wxID_ANY, _("Forensically mark video"));
+ _forensic_mark_video = new CheckBox (this, _("Forensically mark video"));
_forensic_mark_video->SetValue (forensic_mark_video);
add (_forensic_mark_video);
add_spacer ();
- _forensic_mark_audio = new wxCheckBox (this, wxID_ANY, _("Forensically mark audio"));
+ _forensic_mark_audio = new CheckBox (this, _("Forensically mark audio"));
_forensic_mark_audio->SetValue (forensic_mark_audio);
add (_forensic_mark_audio);
add_spacer ();
/*
- Copyright (C) 2015 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2015-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "kdm_cpl_panel.h"
#include "wx_util.h"
+#include "static_text.h"
#include <libcxml/cxml.h>
using std::vector;
/* CPL details */
wxFlexGridSizer* table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
add_label_to_sizer (table, this, _("DCP directory"), true);
- _dcp_directory = new wxStaticText (this, wxID_ANY, "");
+ _dcp_directory = new StaticText (this, "");
table->Add (_dcp_directory);
add_label_to_sizer (table, this, _("CPL ID"), true);
- _cpl_id = new wxStaticText (this, wxID_ANY, "");
+ _cpl_id = new StaticText (this, "");
table->Add (_cpl_id);
add_label_to_sizer (table, this, _("CPL annotation text"), true);
- _cpl_annotation_text = new wxStaticText (this, wxID_ANY, "");
+ _cpl_annotation_text = new StaticText (this, "");
table->Add (_cpl_annotation_text);
vertical->Add (table, 0, wxEXPAND | wxTOP, DCPOMATIC_SIZER_GAP + 2);
/*
- Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "kdm_output_panel.h"
#include "kdm_cpl_panel.h"
#include "confirm_kdm_email_dialog.h"
+#include "static_text.h"
#include "lib/film.h"
#include "lib/screen.h"
#include "lib/screen_kdm.h"
subheading_font.SetWeight (wxFONTWEIGHT_BOLD);
/* Sub-heading: Screens */
- wxStaticText* h = new wxStaticText (this, wxID_ANY, _("Screens"));
+ wxStaticText* h = new StaticText (this, _("Screens"));
h->SetFont (subheading_font);
left->Add (h, 0, wxALIGN_CENTER_VERTICAL | wxBOTTOM, DCPOMATIC_SIZER_Y_GAP);
_screens = new ScreensPanel (this);
/* Sub-heading: Timing */
/// TRANSLATORS: translate the word "Timing" here; do not include the "KDM|" prefix
- h = new wxStaticText (this, wxID_ANY, S_("KDM|Timing"));
+ h = new StaticText (this, S_("KDM|Timing"));
h->SetFont (subheading_font);
right->Add (h, 0, wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_Y_GAP * 2);
_timing = new KDMTimingPanel (this);
right->Add (_timing);
/* Sub-heading: CPL */
- h = new wxStaticText (this, wxID_ANY, _("CPL"));
+ h = new StaticText (this, _("CPL"));
h->SetFont (subheading_font);
right->Add (h, 0, wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_Y_GAP * 2);
_cpl = new KDMCPLPanel (this, film->cpls ());
right->Add (_cpl, 0, wxEXPAND);
/* Sub-heading: Output */
- h = new wxStaticText (this, wxID_ANY, _("Output"));
+ h = new StaticText (this, _("Output"));
h->SetFont (subheading_font);
right->Add (h, 0, wxALIGN_CENTER_VERTICAL | wxTOP, DCPOMATIC_SIZER_Y_GAP * 2);
_output = new KDMOutputPanel (this, film->interop ());
#include "wx_util.h"
#include "kdm_advanced_dialog.h"
#include "name_format_editor.h"
+#include "check_box.h"
#include <dcp/exceptions.h>
#include <dcp/types.h>
#ifdef DCPOMATIC_USE_OWN_PICKER
_filename_format = new NameFormatEditor (this, Config::instance()->kdm_filename_format(), titles, ex, ".xml");
table->Add (_filename_format->panel(), 1, wxEXPAND);
- _write_to = new wxCheckBox (this, wxID_ANY, _("Write to"));
+ _write_to = new CheckBox (this, _("Write to"));
table->Add (_write_to, 1, wxEXPAND);
#ifdef DCPOMATIC_USE_OWN_PICKER
table->AddSpacer (0);
table->Add (write_options);
- _email = new wxCheckBox (this, wxID_ANY, _("Send by email"));
+ _email = new CheckBox (this, _("Send by email"));
table->Add (_email, 1, wxEXPAND);
table->AddSpacer (0);
/*
- Copyright (C) 2015-2016 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2015-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "kdm_timing_panel.h"
#include "wx_util.h"
#include "time_picker.h"
+#include "static_text.h"
#include <wx/datectrl.h>
#include <wx/dateevt.h>
overall_sizer->Add (table);
- _warning = new wxStaticText (this, wxID_ANY, wxT (""));
+ _warning = new StaticText (this, wxT(""));
overall_sizer->Add (_warning, 0, wxTOP, DCPOMATIC_SIZER_GAP);
wxFont font = _warning->GetFont();
font.SetStyle(wxFONTSTYLE_ITALIC);
/*
- Copyright (C) 2014-2015 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2014-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
*/
#include "make_chain_dialog.h"
+#include "static_text.h"
#include <boost/algorithm/string.hpp>
using std::string;
{
wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
- s->Add (new wxStaticText (this, wxID_ANY, wxT (".")), 0, wxALIGN_CENTER_VERTICAL);
+ s->Add (new StaticText (this, wxT (".")), 0, wxALIGN_CENTER_VERTICAL);
s->Add (_root_common_name = new wxTextCtrl (
this, wxID_ANY, std_to_wx (root_common_name), wxDefaultPosition, wxDefaultSize, 0, validator), 1, wxALIGN_CENTER_VERTICAL
);
{
wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
- s->Add (new wxStaticText (this, wxID_ANY, wxT (".")), 0, wxALIGN_CENTER_VERTICAL);
+ s->Add (new StaticText (this, wxT (".")), 0, wxALIGN_CENTER_VERTICAL);
s->Add (_intermediate_common_name = new wxTextCtrl (
this, wxID_ANY, std_to_wx (intermediate_common_name), wxDefaultPosition, wxDefaultSize, 0, validator), 1, wxALIGN_CENTER_VERTICAL
);
{
wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
- s->Add (new wxStaticText (this, wxID_ANY, wxT ("CS.")), 0, wxALIGN_CENTER_VERTICAL);
+ s->Add (new StaticText (this, wxT ("CS.")), 0, wxALIGN_CENTER_VERTICAL);
s->Add (_leaf_common_name = new wxTextCtrl (
this, wxID_ANY, std_to_wx (leaf_common_name), wxDefaultPosition, wxDefaultSize, 0, validator), 1, wxALIGN_CENTER_VERTICAL
);
#include "message_dialog.h"
#include "wx_util.h"
+#include "static_text.h"
MessageDialog::MessageDialog (wxWindow* parent, wxString title, wxString message)
: wxDialog (parent, wxID_ANY, title)
{
wxSizer* sizer = new wxBoxSizer (wxVERTICAL);
- wxStaticText* text = new wxStaticText (this, wxID_ANY, message);
+ wxStaticText* text = new StaticText (this, message);
sizer->Add (text, 1, wxALL, DCPOMATIC_DIALOG_BORDER);
wxSizer* buttons = CreateSeparatedButtonSizer (wxCLOSE);
if (buttons) {
/*
- Copyright (C) 2017 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2017-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "nag_dialog.h"
#include "wx_util.h"
+#include "static_text.h"
+#include "check_box.h"
#include <wx/richtext/richtextctrl.h>
#include <boost/foreach.hpp>
, _nag (nag)
{
wxBoxSizer* sizer = new wxBoxSizer (wxVERTICAL);
- _text = new wxStaticText (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (400, 300));
+ _text = new StaticText (this, wxEmptyString, wxDefaultPosition, wxSize (400, 300));
sizer->Add (_text, 1, wxEXPAND | wxALL, 6);
- wxCheckBox* b = new wxCheckBox (this, wxID_ANY, _("Don't show this message again"));
+ wxCheckBox* b = new CheckBox (this, _("Don't show this message again"));
sizer->Add (b, 0, wxALL, 6);
b->Bind (wxEVT_CHECKBOX, bind (&NagDialog::shut_up, this, _1));
/*
- Copyright (C) 2016-2017 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2016-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "name_format_editor.h"
#include "wx_util.h"
+#include "static_text.h"
#include "lib/util.h"
using std::string;
NameFormatEditor::NameFormatEditor (wxWindow* parent, dcp::NameFormat name, dcp::NameFormat::Map titles, dcp::NameFormat::Map examples, string suffix)
: _panel (new wxPanel (parent))
- , _example (new wxStaticText (_panel, wxID_ANY, ""))
+ , _example (new StaticText (_panel, ""))
, _sizer (new wxBoxSizer (wxVERTICAL))
, _specification (new wxTextCtrl (_panel, wxID_ANY, ""))
, _name (name)
_panel->SetSizer (_sizer);
for (dcp::NameFormat::Map::const_iterator i = titles.begin(); i != titles.end(); ++i) {
- wxStaticText* t = new wxStaticText (_panel, wxID_ANY, std_to_wx (String::compose ("%%%1 %2", i->first, i->second)));
+ wxStaticText* t = new StaticText (_panel, std_to_wx (String::compose ("%%%1 %2", i->first, i->second)));
_sizer->Add (t);
wxFont font = t->GetFont();
font.SetStyle (wxFONTSTYLE_ITALIC);
*/
#include "paste_dialog.h"
+#include "check_box.h"
PasteDialog::PasteDialog (wxWindow* parent, bool video, bool audio, bool text)
: TableDialog (parent, _("Paste"), 1, 0, true)
{
- _video = new wxCheckBox (this, wxID_ANY, _("Paste video settings"));
+ _video = new CheckBox (this, _("Paste video settings"));
_video->Enable (video);
add (_video);
- _audio = new wxCheckBox (this, wxID_ANY, _("Paste audio settings"));
+ _audio = new CheckBox (this, _("Paste audio settings"));
_audio->Enable (audio);
add (_audio);
- _text = new wxCheckBox (this, wxID_ANY, _("Paste subtitle and caption settings"));
+ _text = new CheckBox (this, _("Paste subtitle and caption settings"));
_text->Enable (text);
add (_text);
#include "name_format_editor.h"
#include "nag_dialog.h"
#include "monitor_dialog.h"
+#include "check_box.h"
#include "lib/config.h"
#include "lib/ratio.h"
#include "lib/filter.h"
table->Add (_image_display, wxGBPosition(r, 1));
++r;
- _respect_kdm = new wxCheckBox (_panel, wxID_ANY, _("Respect KDM validity periods"));
+ _respect_kdm = new CheckBox (_panel, _("Respect KDM validity periods"));
table->Add (_respect_kdm, wxGBPosition(r, 0), wxGBSpan(1, 2));
++r;
#include "recreate_chain_dialog.h"
#include "wx_util.h"
+#include "static_text.h"
+#include "check_box.h"
#include "lib/config.h"
#include "lib/cinema_kdms.h"
#include <boost/foreach.hpp>
"which will prevent DCPs from being validated correctly on some systems. Do you want to re-create\n"
"the certificate chain for signing DCPs and KDMs?");
- _sizer->Add (new wxStaticText (this, wxID_ANY, message), 1, wxEXPAND | wxALL, DCPOMATIC_DIALOG_BORDER);
+ _sizer->Add (new StaticText (this, message), 1, wxEXPAND | wxALL, DCPOMATIC_DIALOG_BORDER);
- wxCheckBox* shut_up = new wxCheckBox (this, wxID_ANY, _("Don't ask this again"));
+ wxCheckBox* shut_up = new CheckBox (this, _("Don't ask this again"));
_sizer->Add (shut_up, 0, wxALL, DCPOMATIC_DIALOG_BORDER);
shut_up->Bind (wxEVT_CHECKBOX, bind (&RecreateChainDialog::shut_up, this, _1));
/*
- Copyright (C) 2014-2015 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2014-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "report_problem_dialog.h"
#include "wx_util.h"
+#include "static_text.h"
+#include "check_box.h"
#include "lib/config.h"
#include "lib/job_manager.h"
#include "lib/send_problem_report_job.h"
flags |= wxALIGN_RIGHT;
t += wxT (":");
#endif
- wxStaticText* m = new wxStaticText (this, wxID_ANY, t);
+ wxStaticText* m = new StaticText (this, t);
_table->Add (m, 1, flags, 6);
_summary = new wxTextCtrl (this, wxID_ANY, wxT (""), wxDefaultPosition, wxSize (320, 240), wxTE_MULTILINE);
_table->Add (_summary, 1, wxEXPAND | wxALIGN_TOP);
- _send_logs = new wxCheckBox (this, wxID_ANY, _("Send logs"));
+ _send_logs = new CheckBox (this, _("Send logs"));
_send_logs->SetValue (true);
_table->Add (_send_logs, 1, wxEXPAND);
_table->AddSpacer (0);
}
}
- wxStaticText* n = new wxStaticText (this, wxID_ANY, wxT (""));
+ wxStaticText* n = new StaticText (this, wxT (""));
n->SetLabelMarkup (out);
_table->AddSpacer (0);
_table->Add (n, 1, wxEXPAND);
/*
- Copyright (C) 2016 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2016-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "rgba_colour_picker.h"
#include "wx_util.h"
+#include "static_text.h"
#include <wx/clrpicker.h>
RGBAColourPicker::RGBAColourPicker (wxWindow* parent, RGBA colour)
_picker = new wxColourPickerCtrl (this, wxID_ANY);
_picker->SetColour (wxColour (colour.r, colour.g, colour.b));
sizer->Add (_picker, 1, wxEXPAND | wxALL, DCPOMATIC_SIZER_X_GAP);
- sizer->Add (new wxStaticText (this, wxID_ANY, _("Alpha 0")), 0, wxALIGN_CENTRE_VERTICAL);
+ sizer->Add (new StaticText (this, _("Alpha 0")), 0, wxALIGN_CENTRE_VERTICAL);
_alpha = new wxSlider (this, wxID_ANY, colour.a, 0, 255);
sizer->Add (_alpha, 1, wxEXPAND | wxALL, DCPOMATIC_SIZER_X_GAP);
- sizer->Add (new wxStaticText (this, wxID_ANY, _("255")), 0, wxALIGN_CENTRE_VERTICAL);
+ sizer->Add (new StaticText (this, _("255")), 0, wxALIGN_CENTRE_VERTICAL);
SetSizer (sizer);
}
/*
- Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "screen_dialog.h"
#include "wx_util.h"
#include "file_dialog_wrapper.h"
+#include "static_text.h"
#include "download_certificate_dialog.h"
#include "table_dialog.h"
#include "lib/compose.hpp"
add_label_to_sizer (_sizer, this, _("Recipient certificate"), true, wxGBPosition (r, 0));
wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
- _recipient_thumbprint = new wxStaticText (this, wxID_ANY, wxT (""), wxDefaultPosition, size);
+ _recipient_thumbprint = new StaticText (this, wxT (""), wxDefaultPosition, size);
_recipient_thumbprint->SetFont (font);
set_recipient (recipient);
_get_recipient_from_file = new wxButton (this, wxID_ANY, _("Get from file..."));
#include "wx_util.h"
#include "kdm_output_panel.h"
#include "kdm_cpl_panel.h"
+#include "static_text.h"
#include "lib/film.h"
#include "lib/screen.h"
#include "lib/config.h"
subheading_font.SetWeight (wxFONTWEIGHT_BOLD);
/* Sub-heading: CPL */
- wxStaticText* h = new wxStaticText (this, wxID_ANY, _("CPL"));
+ wxStaticText* h = new StaticText (this, _("CPL"));
h->SetFont (subheading_font);
vertical->Add (h, 0, wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_Y_GAP * 2);
_cpl = new KDMCPLPanel (this, film->cpls ());
vertical->Add (_cpl);
/* Sub-heading: output */
- h = new wxStaticText (this, wxID_ANY, _("Output"));
+ h = new StaticText (this, _("Output"));
h->SetFont (subheading_font);
vertical->Add (h, 0, wxALIGN_CENTER_VERTICAL | wxTOP, DCPOMATIC_SIZER_Y_GAP * 2);
--- /dev/null
+/*
+ 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 "static_text.h"
+
+StaticText::StaticText (wxWindow* parent, wxString label, wxPoint pos, wxSize size, long style)
+ : wxStaticText (parent, wxID_ANY, label, pos, size, style)
+ , I18NHook (this)
+{
+
+}
+
+void
+StaticText::set_text (wxString text)
+{
+ SetLabel (text);
+}
+
+wxString
+StaticText::get_text () const
+{
+ return GetLabel ();
+}
--- /dev/null
+/*
+ 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 "i18n_hook.h"
+#include <wx/wx.h>
+
+class StaticText : public wxStaticText, public I18NHook
+{
+public:
+ StaticText (wxWindow* parent, wxString label, wxPoint pos = wxDefaultPosition, wxSize = wxDefaultSize, long style = 0);
+
+ void set_text (wxString text);
+ wxString get_text () const;
+};
#include "subtitle_appearance_dialog.h"
#include "rgba_colour_picker.h"
+#include "static_text.h"
+#include "check_box.h"
#include "lib/string_text_file_content.h"
#include "lib/text_content.h"
#include "lib/ffmpeg_subtitle_stream.h"
map<RGBA, RGBA> colours = _stream->colours ();
- wxStaticText* t = new wxStaticText (colours_panel, wxID_ANY, "");
+ wxStaticText* t = new StaticText (colours_panel, "");
t->SetLabelMarkup (_("<b>Original colour</b>"));
table->Add (t, 1, wxEXPAND);
- t = new wxStaticText (colours_panel, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE_HORIZONTAL);
+ t = new StaticText (colours_panel, "", wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE_HORIZONTAL);
t->SetLabelMarkup (_("<b>New colour</b>"));
table->Add (t, 1, wxALIGN_CENTER);
SubtitleAppearanceDialog::set_to (wxWindow* w, int& r)
{
wxSizer* s = new wxBoxSizer (wxHORIZONTAL);
- wxCheckBox* set_to = new wxCheckBox (this, wxID_ANY, _("Set to"));
+ wxCheckBox* set_to = new CheckBox (this, _("Set to"));
s->Add (set_to, 0, wxRIGHT | wxALIGN_CENTER_VERTICAL, 8);
s->Add (w, 0, wxALIGN_CENTER_VERTICAL);
_table->Add (s, wxGBPosition (r, 1));
/*
- Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2014-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "table_dialog.h"
#include "wx_util.h"
+#include "static_text.h"
TableDialog::TableDialog (wxWindow* parent, wxString title, int columns, int growable, bool cancel)
: wxDialog (parent, wxID_ANY, title)
text += wxT (":");
}
#endif
- wxStaticText* m = new wxStaticText (this, wxID_ANY, wxT (""));
+ wxStaticText* m = new StaticText (this, wxT (""));
m->SetLabelMarkup (text);
_table->Add (m, 0, flags, 6);
return m;
#include "fonts_dialog.h"
#include "dcp_text_track_dialog.h"
#include "subtitle_appearance_dialog.h"
+#include "static_text.h"
+#include "check_box.h"
#include "lib/ffmpeg_content.h"
#include "lib/string_text_file_content.h"
#include "lib/ffmpeg_subtitle_stream.h"
refer = _("Use this DCP's closed caption as OV and make VF");
}
- _reference = new wxCheckBox (this, wxID_ANY, refer);
- _reference_note = new wxStaticText (this, wxID_ANY, wxT(""));
+ _reference = new CheckBox (this, refer);
+ _reference_note = new StaticText (this, wxT(""));
_reference_note->Wrap (200);
wxFont font = _reference_note->GetFont();
font.SetStyle(wxFONTSTYLE_ITALIC);
font.SetPointSize(font.GetPointSize() - 1);
_reference_note->SetFont(font);
- _use = new wxCheckBox (this, wxID_ANY, _("Use as"));
+ _use = new CheckBox (this, _("Use as"));
_type = new wxChoice (this, wxID_ANY);
_type->Append (_("open subtitles"));
_type->Append (_("closed captions"));
- _burn = new wxCheckBox (this, wxID_ANY, _("Burn subtitles into image"));
+ _burn = new CheckBox (this, _("Burn subtitles into image"));
_offset_label = create_label (this, _("Offset"), true);
_x_offset_label = create_label (this, _("X"), true);
_x_offset = new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(64, -1));
- _x_offset_pc_label = new wxStaticText (this, wxID_ANY, _("%"));
+ _x_offset_pc_label = new StaticText (this, _("%"));
_y_offset_label = create_label (this, _("Y"), true);
_y_offset = new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(64, -1));
- _y_offset_pc_label = new wxStaticText (this, wxID_ANY, _("%"));
+ _y_offset_pc_label = new StaticText (this, _("%"));
_scale_label = create_label (this, _("Scale"), true);
_x_scale_label = create_label (this, _("X"), true);
_x_scale = new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(64, -1));
- _x_scale_pc_label = new wxStaticText (this, wxID_ANY, _("%"));
+ _x_scale_pc_label = new StaticText (this, _("%"));
_y_scale_label = create_label (this, _("Y"), true);
_y_scale = new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(64, -1));
- _y_scale_pc_label = new wxStaticText (this, wxID_ANY, _("%"));
+ _y_scale_pc_label = new StaticText (this, _("%"));
_line_spacing_label = create_label (this, _("Line spacing"), true);
_line_spacing = new wxSpinCtrl (this);
- _line_spacing_pc_label = new wxStaticText (this, wxID_ANY, _("%"));
+ _line_spacing_pc_label = new StaticText (this, _("%"));
_dcp_track_label = create_label (this, _("DCP track"), true);
_dcp_track = new wxChoice (this, wxID_ANY);
/*
- Copyright (C) 2016 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2016-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "time_picker.h"
#include "wx_util.h"
+#include "static_text.h"
#include <dcp/locale_convert.h>
#include <wx/spinctrl.h>
#include <boost/bind.hpp>
wxBoxSizer* sizer = new wxBoxSizer (wxHORIZONTAL);
_hours = new wxSpinCtrl (this, wxID_ANY, wxT(""), wxDefaultPosition, size);
sizer->Add (_hours, 1, wxEXPAND | wxLEFT | wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_GAP);
- sizer->Add (new wxStaticText (this, wxID_ANY, wxT (":")), 0, wxALIGN_CENTER_VERTICAL);
+ sizer->Add (new StaticText (this, wxT (":")), 0, wxALIGN_CENTER_VERTICAL);
_minutes = new wxSpinCtrl (this, wxID_ANY, wxT(""), wxDefaultPosition, size);
sizer->Add (_minutes, 1, wxEXPAND | wxRIGHT | wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_GAP);
/*
- Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "timecode.h"
#include "content_panel.h"
#include "move_to_dialog.h"
+#include "static_text.h"
#include "lib/content.h"
#include "lib/image_content.h"
#include "lib/text_content.h"
}
//// TRANSLATORS: this is an abbreviation for "hours"
- _h_label = new wxStaticText (this, wxID_ANY, _("h"), wxDefaultPosition, size, wxALIGN_CENTRE_HORIZONTAL);
+ _h_label = new StaticText (this, _("h"), wxDefaultPosition, size, wxALIGN_CENTRE_HORIZONTAL);
#ifdef DCPOMATIC_LINUX
/* Hack to work around failure to centre text on GTK */
gtk_label_set_line_wrap (GTK_LABEL(_h_label->GetHandle()), FALSE);
#endif
//// TRANSLATORS: this is an abbreviation for "minutes"
- _m_label = new wxStaticText (this, wxID_ANY, _("m"), wxDefaultPosition, size, wxALIGN_CENTRE_HORIZONTAL);
+ _m_label = new StaticText (this, _("m"), wxDefaultPosition, size, wxALIGN_CENTRE_HORIZONTAL);
#ifdef DCPOMATIC_LINUX
gtk_label_set_line_wrap (GTK_LABEL (_m_label->GetHandle()), FALSE);
#endif
//// TRANSLATORS: this is an abbreviation for "seconds"
- _s_label = new wxStaticText (this, wxID_ANY, _("s"), wxDefaultPosition, size, wxALIGN_CENTRE_HORIZONTAL);
+ _s_label = new StaticText (this, _("s"), wxDefaultPosition, size, wxALIGN_CENTRE_HORIZONTAL);
#ifdef DCPOMATIC_LINUX
gtk_label_set_line_wrap (GTK_LABEL(_s_label->GetHandle()), FALSE);
#endif
//// TRANSLATORS: this is an abbreviation for "frames"
- _f_label = new wxStaticText (this, wxID_ANY, _("f"), wxDefaultPosition, size, wxALIGN_CENTRE_HORIZONTAL);
+ _f_label = new StaticText (this, _("f"), wxDefaultPosition, size, wxALIGN_CENTRE_HORIZONTAL);
#ifdef DCPOMATIC_LINUX
gtk_label_set_line_wrap (GTK_LABEL(_f_label->GetHandle()), FALSE);
#endif
}
}
- _tip = new wxStaticText (this, wxID_ANY, wxT (""));
+ _tip = new StaticText (this, wxT (""));
_tip->SetLabelMarkup (out);
#ifdef DCPOMATIC_OSX
/* Hack to stop hidden text on some versions of OS X */
/*
- Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
*/
-#include <wx/hyperlink.h>
#include "update_dialog.h"
+#include "static_text.h"
#include "wx_util.h"
+#include <wx/hyperlink.h>
using std::string;
using boost::optional;
wxStaticText* message;
if ((stable || test) && !(stable && test)) {
- message = new wxStaticText (this, wxID_ANY, _("A new version of DCP-o-matic is available."));
+ message = new StaticText (this, _("A new version of DCP-o-matic is available."));
} else {
- message = new wxStaticText (this, wxID_ANY, _("New versions of DCP-o-matic are available."));
+ message = new StaticText (this, _("New versions of DCP-o-matic are available."));
}
overall_sizer->Add (message, 1, wxTOP | wxLEFT | wxRIGHT, DCPOMATIC_DIALOG_BORDER);
/*
- Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "content_colour_conversion_dialog.h"
#include "content_widget.h"
#include "content_panel.h"
+#include "static_text.h"
+#include "check_box.h"
#include "lib/filter.h"
#include "lib/ffmpeg_content.h"
#include "lib/colour_conversion.h"
VideoPanel::VideoPanel (ContentPanel* p)
: ContentSubPanel (p, _("Video"))
{
- _reference = new wxCheckBox (this, wxID_ANY, _("Use this DCP's video as OV and make VF"));
- _reference_note = new wxStaticText (this, wxID_ANY, wxT(""));
+ _reference = new CheckBox (this, _("Use this DCP's video as OV and make VF"));
+ _reference_note = new StaticText (this, wxT(""));
_reference_note->Wrap (200);
wxFont font = _reference_note->GetFont();
font.SetStyle(wxFONTSTYLE_ITALIC);
size.SetHeight (-1);
_filters_label = create_label (this, _("Filters"), true);
- _filters = new wxStaticText (this, wxID_ANY, _("None"), wxDefaultPosition, size);
+ _filters = new StaticText (this, _("None"), wxDefaultPosition, size);
_filters_button = new wxButton (this, wxID_ANY, _("Edit..."));
_colour_conversion_label = create_label (this, _("Colour conversion"), true);
_colour_conversion->Append (S_("Colour|Custom"));
_edit_colour_conversion_button = new wxButton (this, wxID_ANY, _("Edit..."));
- _description = new wxStaticText (this, wxID_ANY, wxT ("\n \n \n \n \n"), wxDefaultPosition, wxDefaultSize);
+ _description = new StaticText (this, wxT ("\n \n \n \n \n"), wxDefaultPosition, wxDefaultSize);
_description->SetFont(font);
_left_crop->wrapped()->SetRange (0, 4096);
#include "video_waveform_plot.h"
#include "film_viewer.h"
#include "wx_util.h"
+#include "static_text.h"
#include <boost/bind.hpp>
#include <iostream>
wxBoxSizer* position = new wxBoxSizer (wxHORIZONTAL);
add_label_to_sizer (position, this, _("Image X position"), true);
- _x_position = new wxStaticText (this, wxID_ANY, "");
+ _x_position = new StaticText (this, "");
_x_position->SetMinSize (wxSize (64, -1));
position->Add (_x_position, 0, wxALL, DCPOMATIC_SIZER_X_GAP);
add_label_to_sizer (position, this, _("component value"), true);
- _value = new wxStaticText (this, wxID_ANY, "");
+ _value = new StaticText (this, "");
_value->SetMinSize (wxSize (64, -1));
position->Add (_value, 0, wxALL, DCPOMATIC_SIZER_X_GAP);
overall_sizer->Add (position, 0, wxEXPAND | wxALL, DCPOMATIC_SIZER_Y_GAP);
subtitle_appearance_dialog.cc
text_panel.cc
text_view.cc
+ check_box.cc
christie_certificate_panel.cc
cinema_dialog.cc
colour_conversion_editor.cc
gdc_certificate_panel.cc
hints_dialog.cc
initial_setup_dialog.cc
+ instant_i18n_dialog.cc
+ i18n_hook.cc
job_view.cc
job_view_dialog.cc
job_manager_view.cc
server_dialog.cc
servers_list_dialog.cc
standard_controls.cc
+ static_text.cc
swaroop_controls.cc
system_font_dialog.cc
table_dialog.cc
#include "wx_util.h"
#include "file_picker_ctrl.h"
+#include "static_text.h"
#include "lib/config.h"
#include "lib/job_manager.h"
#include "lib/util.h"
t += wxT (":");
}
#endif
- return new wxStaticText (p, wxID_ANY, t);
+ return new StaticText (p, t);
}
/** Add a wxStaticText to a wxSizer, aligning it at vertical centre.