Use the new much shorter event names
This commit is contained in:
parent
7c68c81ea3
commit
038eb6e58b
41 changed files with 224 additions and 224 deletions
|
@ -74,11 +74,11 @@ AudioKaraoke::AudioKaraoke(wxWindow *parent, agi::Context *c)
|
||||||
|
|
||||||
cancel_button = new wxBitmapButton(this, -1, GETIMAGE(kara_split_cancel_16));
|
cancel_button = new wxBitmapButton(this, -1, GETIMAGE(kara_split_cancel_16));
|
||||||
cancel_button->SetToolTip(_("Discard all uncommitted splits"));
|
cancel_button->SetToolTip(_("Discard all uncommitted splits"));
|
||||||
cancel_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&AudioKaraoke::CancelSplit, this));
|
cancel_button->Bind(wxEVT_BUTTON, bind(&AudioKaraoke::CancelSplit, this));
|
||||||
|
|
||||||
accept_button = new wxBitmapButton(this, -1, GETIMAGE(kara_split_accept_16));
|
accept_button = new wxBitmapButton(this, -1, GETIMAGE(kara_split_accept_16));
|
||||||
accept_button->SetToolTip(_("Commit splits"));
|
accept_button->SetToolTip(_("Commit splits"));
|
||||||
accept_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&AudioKaraoke::AcceptSplit, this));
|
accept_button->Bind(wxEVT_BUTTON, bind(&AudioKaraoke::AcceptSplit, this));
|
||||||
|
|
||||||
split_area = new wxPanel(this);
|
split_area = new wxPanel(this);
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ void AudioKaraoke::RenderText() {
|
||||||
|
|
||||||
void AudioKaraoke::AddMenuItem(wxMenu &menu, std::string const& tag, wxString const& help, std::string const& selected) {
|
void AudioKaraoke::AddMenuItem(wxMenu &menu, std::string const& tag, wxString const& help, std::string const& selected) {
|
||||||
wxMenuItem *item = menu.AppendCheckItem(-1, to_wx(tag), help);
|
wxMenuItem *item = menu.AppendCheckItem(-1, to_wx(tag), help);
|
||||||
menu.Bind(wxEVT_COMMAND_MENU_SELECTED, std::bind(&AudioKaraoke::SetTagType, this, tag), item->GetId());
|
menu.Bind(wxEVT_MENU, std::bind(&AudioKaraoke::SetTagType, this, tag), item->GetId());
|
||||||
item->Check(tag == selected);
|
item->Check(tag == selected);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -498,7 +498,7 @@ namespace Automation4 {
|
||||||
|
|
||||||
auto make_button = [&](wxWindowID id, int button_pushed, wxString const& text) -> wxButton *{
|
auto make_button = [&](wxWindowID id, int button_pushed, wxString const& text) -> wxButton *{
|
||||||
auto button = new wxButton(window, id, text);
|
auto button = new wxButton(window, id, text);
|
||||||
button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [=](wxCommandEvent &evt) {
|
button->Bind(wxEVT_BUTTON, [=](wxCommandEvent &evt) {
|
||||||
this->button_pushed = button_pushed;
|
this->button_pushed = button_pushed;
|
||||||
dialog->TransferDataFromWindow();
|
dialog->TransferDataFromWindow();
|
||||||
dialog->EndModal(0);
|
dialog->EndModal(0);
|
||||||
|
|
|
@ -31,7 +31,7 @@ ColourButton::ColourButton(wxWindow *parent, wxSize const& size, bool alpha, agi
|
||||||
, colour(std::move(col))
|
, colour(std::move(col))
|
||||||
{
|
{
|
||||||
UpdateBitmap();
|
UpdateBitmap();
|
||||||
Bind(wxEVT_COMMAND_BUTTON_CLICKED, [=](wxCommandEvent&) {
|
Bind(wxEVT_BUTTON, [=](wxCommandEvent&) {
|
||||||
GetColorFromUser(GetParent(), colour, alpha, [=](agi::Color new_color) {
|
GetColorFromUser(GetParent(), colour, alpha, [=](agi::Color new_color) {
|
||||||
colour = new_color;
|
colour = new_color;
|
||||||
UpdateBitmap();
|
UpdateBitmap();
|
||||||
|
|
|
@ -82,14 +82,14 @@ DialogAttachments::DialogAttachments(wxWindow *parent, AssFile *ass)
|
||||||
SetSizerAndFit(mainSizer);
|
SetSizerAndFit(mainSizer);
|
||||||
CenterOnParent();
|
CenterOnParent();
|
||||||
|
|
||||||
attachFont->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogAttachments::OnAttachFont, this);
|
attachFont->Bind(wxEVT_BUTTON, &DialogAttachments::OnAttachFont, this);
|
||||||
attachGraphics->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogAttachments::OnAttachGraphics, this);
|
attachGraphics->Bind(wxEVT_BUTTON, &DialogAttachments::OnAttachGraphics, this);
|
||||||
extractButton->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogAttachments::OnExtract, this);
|
extractButton->Bind(wxEVT_BUTTON, &DialogAttachments::OnExtract, this);
|
||||||
deleteButton->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogAttachments::OnDelete, this);
|
deleteButton->Bind(wxEVT_BUTTON, &DialogAttachments::OnDelete, this);
|
||||||
|
|
||||||
listView->Bind(wxEVT_COMMAND_LIST_ITEM_SELECTED, &DialogAttachments::OnListClick, this);
|
listView->Bind(wxEVT_LIST_ITEM_SELECTED, &DialogAttachments::OnListClick, this);
|
||||||
listView->Bind(wxEVT_COMMAND_LIST_ITEM_DESELECTED, &DialogAttachments::OnListClick, this);
|
listView->Bind(wxEVT_LIST_ITEM_DESELECTED, &DialogAttachments::OnListClick, this);
|
||||||
listView->Bind(wxEVT_COMMAND_LIST_ITEM_FOCUSED, &DialogAttachments::OnListClick, this);
|
listView->Bind(wxEVT_LIST_ITEM_FOCUSED, &DialogAttachments::OnListClick, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogAttachments::UpdateList() {
|
void DialogAttachments::UpdateList() {
|
||||||
|
|
|
@ -77,13 +77,13 @@ DialogAutomation::DialogAutomation(agi::Context *c)
|
||||||
wxButton *reload_autoload_button = new wxButton(this, -1, _("Re&scan Autoload Dir"));
|
wxButton *reload_autoload_button = new wxButton(this, -1, _("Re&scan Autoload Dir"));
|
||||||
wxButton *close_button = new wxButton(this, wxID_CANCEL, _("&Close"));
|
wxButton *close_button = new wxButton(this, wxID_CANCEL, _("&Close"));
|
||||||
|
|
||||||
list->Bind(wxEVT_COMMAND_LIST_ITEM_SELECTED, std::bind(&DialogAutomation::UpdateDisplay, this));
|
list->Bind(wxEVT_LIST_ITEM_SELECTED, std::bind(&DialogAutomation::UpdateDisplay, this));
|
||||||
list->Bind(wxEVT_COMMAND_LIST_ITEM_DESELECTED, std::bind(&DialogAutomation::UpdateDisplay, this));
|
list->Bind(wxEVT_LIST_ITEM_DESELECTED, std::bind(&DialogAutomation::UpdateDisplay, this));
|
||||||
add_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogAutomation::OnAdd, this);
|
add_button->Bind(wxEVT_BUTTON, &DialogAutomation::OnAdd, this);
|
||||||
remove_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogAutomation::OnRemove, this);
|
remove_button->Bind(wxEVT_BUTTON, &DialogAutomation::OnRemove, this);
|
||||||
reload_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogAutomation::OnReload, this);
|
reload_button->Bind(wxEVT_BUTTON, &DialogAutomation::OnReload, this);
|
||||||
info_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogAutomation::OnInfo, this);
|
info_button->Bind(wxEVT_BUTTON, &DialogAutomation::OnInfo, this);
|
||||||
reload_autoload_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogAutomation::OnReloadAutoload, this);
|
reload_autoload_button->Bind(wxEVT_BUTTON, &DialogAutomation::OnReloadAutoload, this);
|
||||||
|
|
||||||
// add headers to list view
|
// add headers to list view
|
||||||
list->InsertColumn(0, "", wxLIST_FORMAT_CENTER, 20);
|
list->InsertColumn(0, "", wxLIST_FORMAT_CENTER, 20);
|
||||||
|
|
|
@ -42,12 +42,12 @@ DialogAutosave::DialogAutosave(wxWindow *parent)
|
||||||
|
|
||||||
wxSizer *files_box = new wxStaticBoxSizer(wxVERTICAL, this, _("Files"));
|
wxSizer *files_box = new wxStaticBoxSizer(wxVERTICAL, this, _("Files"));
|
||||||
file_list = new wxListBox(this, -1);
|
file_list = new wxListBox(this, -1);
|
||||||
file_list->Bind(wxEVT_COMMAND_LISTBOX_SELECTED, &DialogAutosave::OnSelectFile, this);
|
file_list->Bind(wxEVT_LISTBOX, &DialogAutosave::OnSelectFile, this);
|
||||||
files_box->Add(file_list, wxSizerFlags(1).Expand().Border());
|
files_box->Add(file_list, wxSizerFlags(1).Expand().Border());
|
||||||
|
|
||||||
wxSizer *versions_box = new wxStaticBoxSizer(wxVERTICAL, this, _("Versions"));
|
wxSizer *versions_box = new wxStaticBoxSizer(wxVERTICAL, this, _("Versions"));
|
||||||
version_list = new wxListBox(this, -1);
|
version_list = new wxListBox(this, -1);
|
||||||
version_list->Bind(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, [=](wxCommandEvent&) { EndModal(wxID_OK); });
|
version_list->Bind(wxEVT_LISTBOX_DCLICK, [=](wxCommandEvent&) { EndModal(wxID_OK); });
|
||||||
versions_box->Add(version_list, wxSizerFlags(1).Expand().Border());
|
versions_box->Add(version_list, wxSizerFlags(1).Expand().Border());
|
||||||
|
|
||||||
wxSizer *boxes_sizer = new wxBoxSizer(wxHORIZONTAL);
|
wxSizer *boxes_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
|
|
@ -677,17 +677,17 @@ DialogColorPicker::DialogColorPicker(wxWindow *parent, agi::Color initial_color,
|
||||||
|
|
||||||
using std::bind;
|
using std::bind;
|
||||||
for (int i = 0; i < 3; ++i) {
|
for (int i = 0; i < 3; ++i) {
|
||||||
rgb_input[i]->Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, bind(&DialogColorPicker::UpdateFromRGB, this, true));
|
rgb_input[i]->Bind(wxEVT_SPINCTRL, bind(&DialogColorPicker::UpdateFromRGB, this, true));
|
||||||
rgb_input[i]->Bind(wxEVT_COMMAND_TEXT_UPDATED, bind(&DialogColorPicker::UpdateFromRGB, this, true));
|
rgb_input[i]->Bind(wxEVT_TEXT, bind(&DialogColorPicker::UpdateFromRGB, this, true));
|
||||||
hsl_input[i]->Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, bind(&DialogColorPicker::UpdateFromHSL, this, true));
|
hsl_input[i]->Bind(wxEVT_SPINCTRL, bind(&DialogColorPicker::UpdateFromHSL, this, true));
|
||||||
hsl_input[i]->Bind(wxEVT_COMMAND_TEXT_UPDATED, bind(&DialogColorPicker::UpdateFromHSL, this, true));
|
hsl_input[i]->Bind(wxEVT_TEXT, bind(&DialogColorPicker::UpdateFromHSL, this, true));
|
||||||
hsv_input[i]->Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, bind(&DialogColorPicker::UpdateFromHSV, this, true));
|
hsv_input[i]->Bind(wxEVT_SPINCTRL, bind(&DialogColorPicker::UpdateFromHSV, this, true));
|
||||||
hsv_input[i]->Bind(wxEVT_COMMAND_TEXT_UPDATED, bind(&DialogColorPicker::UpdateFromHSV, this, true));
|
hsv_input[i]->Bind(wxEVT_TEXT, bind(&DialogColorPicker::UpdateFromHSV, this, true));
|
||||||
}
|
}
|
||||||
ass_input->Bind(wxEVT_COMMAND_TEXT_UPDATED, bind(&DialogColorPicker::UpdateFromAss, this));
|
ass_input->Bind(wxEVT_TEXT, bind(&DialogColorPicker::UpdateFromAss, this));
|
||||||
html_input->Bind(wxEVT_COMMAND_TEXT_UPDATED, bind(&DialogColorPicker::UpdateFromHTML, this));
|
html_input->Bind(wxEVT_TEXT, bind(&DialogColorPicker::UpdateFromHTML, this));
|
||||||
alpha_input->Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, bind(&DialogColorPicker::UpdateFromAlpha, this));
|
alpha_input->Bind(wxEVT_SPINCTRL, bind(&DialogColorPicker::UpdateFromAlpha, this));
|
||||||
alpha_input->Bind(wxEVT_COMMAND_TEXT_UPDATED, bind(&DialogColorPicker::UpdateFromAlpha, this));
|
alpha_input->Bind(wxEVT_TEXT, bind(&DialogColorPicker::UpdateFromAlpha, this));
|
||||||
|
|
||||||
screen_dropper_icon->Bind(wxEVT_MOTION, &DialogColorPicker::OnDropperMouse, this);
|
screen_dropper_icon->Bind(wxEVT_MOTION, &DialogColorPicker::OnDropperMouse, this);
|
||||||
screen_dropper_icon->Bind(wxEVT_LEFT_DOWN, &DialogColorPicker::OnDropperMouse, this);
|
screen_dropper_icon->Bind(wxEVT_LEFT_DOWN, &DialogColorPicker::OnDropperMouse, this);
|
||||||
|
@ -703,9 +703,9 @@ DialogColorPicker::DialogColorPicker(wxWindow *parent, agi::Color initial_color,
|
||||||
recent_box->Bind(EVT_RECENT_SELECT, &DialogColorPicker::OnRecentSelect, this);
|
recent_box->Bind(EVT_RECENT_SELECT, &DialogColorPicker::OnRecentSelect, this);
|
||||||
screen_dropper->Bind(EVT_DROPPER_SELECT, &DialogColorPicker::OnRecentSelect, this);
|
screen_dropper->Bind(EVT_DROPPER_SELECT, &DialogColorPicker::OnRecentSelect, this);
|
||||||
|
|
||||||
colorspace_choice->Bind(wxEVT_COMMAND_CHOICE_SELECTED, &DialogColorPicker::OnChangeMode, this);
|
colorspace_choice->Bind(wxEVT_CHOICE, &DialogColorPicker::OnChangeMode, this);
|
||||||
|
|
||||||
button_sizer->GetHelpButton()->Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&HelpButton::OpenPage, "Colour Picker"));
|
button_sizer->GetHelpButton()->Bind(wxEVT_BUTTON, bind(&HelpButton::OpenPage, "Colour Picker"));
|
||||||
}
|
}
|
||||||
|
|
||||||
template<int N, class Control>
|
template<int N, class Control>
|
||||||
|
|
|
@ -116,7 +116,7 @@ DialogDummyVideo::DialogDummyVideo(wxWindow *parent)
|
||||||
AddCtrl("", length_display = new wxStaticText(this, -1, ""));
|
AddCtrl("", length_display = new wxStaticText(this, -1, ""));
|
||||||
|
|
||||||
wxStdDialogButtonSizer *btn_sizer = CreateStdDialogButtonSizer(wxOK | wxCANCEL | wxHELP);
|
wxStdDialogButtonSizer *btn_sizer = CreateStdDialogButtonSizer(wxOK | wxCANCEL | wxHELP);
|
||||||
btn_sizer->GetHelpButton()->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&HelpButton::OpenPage, "Dummy Video"));
|
btn_sizer->GetHelpButton()->Bind(wxEVT_BUTTON, std::bind(&HelpButton::OpenPage, "Dummy Video"));
|
||||||
|
|
||||||
auto main_sizer = new wxBoxSizer(wxVERTICAL);
|
auto main_sizer = new wxBoxSizer(wxVERTICAL);
|
||||||
main_sizer->Add(sizer, wxSizerFlags(1).Border().Expand());
|
main_sizer->Add(sizer, wxSizerFlags(1).Border().Expand());
|
||||||
|
@ -128,9 +128,9 @@ DialogDummyVideo::DialogDummyVideo(wxWindow *parent)
|
||||||
SetSizerAndFit(main_sizer);
|
SetSizerAndFit(main_sizer);
|
||||||
CenterOnParent();
|
CenterOnParent();
|
||||||
|
|
||||||
Bind(wxEVT_COMMAND_COMBOBOX_SELECTED, &DialogDummyVideo::OnResolutionShortcut, this);
|
Bind(wxEVT_COMBOBOX, &DialogDummyVideo::OnResolutionShortcut, this);
|
||||||
color_btn->Bind(EVT_COLOR, [=](wxThreadEvent& e) { color = color_btn->GetColor(); });
|
color_btn->Bind(EVT_COLOR, [=](wxThreadEvent& e) { color = color_btn->GetColor(); });
|
||||||
Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, [=](wxCommandEvent&) {
|
Bind(wxEVT_SPINCTRL, [=](wxCommandEvent&) {
|
||||||
TransferDataFromWindow();
|
TransferDataFromWindow();
|
||||||
UpdateLengthDisplay();
|
UpdateLengthDisplay();
|
||||||
});
|
});
|
||||||
|
|
|
@ -85,8 +85,8 @@ DialogExport::DialogExport(agi::Context *c)
|
||||||
|
|
||||||
std::vector<std::string> filters = exporter->GetAllFilterNames();
|
std::vector<std::string> filters = exporter->GetAllFilterNames();
|
||||||
filter_list = new wxCheckListBox(this, -1, wxDefaultPosition, wxSize(200, 100), to_wx(filters));
|
filter_list = new wxCheckListBox(this, -1, wxDefaultPosition, wxSize(200, 100), to_wx(filters));
|
||||||
filter_list->Bind(wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, [=](wxCommandEvent&) { RefreshOptions(); });
|
filter_list->Bind(wxEVT_CHECKLISTBOX, [=](wxCommandEvent&) { RefreshOptions(); });
|
||||||
filter_list->Bind(wxEVT_COMMAND_LISTBOX_SELECTED, &DialogExport::OnChange, this);
|
filter_list->Bind(wxEVT_LISTBOX, &DialogExport::OnChange, this);
|
||||||
|
|
||||||
// Get selected filters
|
// Get selected filters
|
||||||
std::string selected = c->ass->GetScriptInfo("Export filters");
|
std::string selected = c->ass->GetScriptInfo("Export filters");
|
||||||
|
@ -102,10 +102,10 @@ DialogExport::DialogExport(agi::Context *c)
|
||||||
wxButton *btn_all = new wxButton(this, -1, _("Select &All"), wxDefaultPosition, wxSize(80, -1));
|
wxButton *btn_all = new wxButton(this, -1, _("Select &All"), wxDefaultPosition, wxSize(80, -1));
|
||||||
wxButton *btn_none = new wxButton(this, -1, _("Select &None"), wxDefaultPosition, wxSize(80, -1));
|
wxButton *btn_none = new wxButton(this, -1, _("Select &None"), wxDefaultPosition, wxSize(80, -1));
|
||||||
|
|
||||||
btn_up->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [=](wxCommandEvent&) { swap(filter_list, filter_list->GetSelection() - 1, 0); });
|
btn_up->Bind(wxEVT_BUTTON, [=](wxCommandEvent&) { swap(filter_list, filter_list->GetSelection() - 1, 0); });
|
||||||
btn_down->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [=](wxCommandEvent&) { swap(filter_list, filter_list->GetSelection() - 1, 0); });
|
btn_down->Bind(wxEVT_BUTTON, [=](wxCommandEvent&) { swap(filter_list, filter_list->GetSelection() - 1, 0); });
|
||||||
btn_all->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [=](wxCommandEvent&) { SetAll(true); });
|
btn_all->Bind(wxEVT_BUTTON, [=](wxCommandEvent&) { SetAll(true); });
|
||||||
btn_none->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [=](wxCommandEvent&) { SetAll(false); });
|
btn_none->Bind(wxEVT_BUTTON, [=](wxCommandEvent&) { SetAll(false); });
|
||||||
|
|
||||||
wxSizer *top_buttons = new wxBoxSizer(wxHORIZONTAL);
|
wxSizer *top_buttons = new wxBoxSizer(wxHORIZONTAL);
|
||||||
top_buttons->Add(btn_up, wxSizerFlags(1).Expand());
|
top_buttons->Add(btn_up, wxSizerFlags(1).Expand());
|
||||||
|
@ -132,8 +132,8 @@ DialogExport::DialogExport(agi::Context *c)
|
||||||
|
|
||||||
wxStdDialogButtonSizer *btn_sizer = CreateStdDialogButtonSizer(wxOK | wxCANCEL | wxHELP);
|
wxStdDialogButtonSizer *btn_sizer = CreateStdDialogButtonSizer(wxOK | wxCANCEL | wxHELP);
|
||||||
btn_sizer->GetAffirmativeButton()->SetLabelText(_("Export..."));
|
btn_sizer->GetAffirmativeButton()->SetLabelText(_("Export..."));
|
||||||
Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogExport::OnProcess, this, wxID_OK);
|
Bind(wxEVT_BUTTON, &DialogExport::OnProcess, this, wxID_OK);
|
||||||
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&HelpButton::OpenPage, "Export"), wxID_HELP);
|
Bind(wxEVT_BUTTON, std::bind(&HelpButton::OpenPage, "Export"), wxID_HELP);
|
||||||
|
|
||||||
wxSizer *horz_sizer = new wxBoxSizer(wxHORIZONTAL);
|
wxSizer *horz_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
opt_sizer = new wxBoxSizer(wxVERTICAL);
|
opt_sizer = new wxBoxSizer(wxVERTICAL);
|
||||||
|
|
|
@ -244,10 +244,10 @@ DialogFontsCollector::DialogFontsCollector(agi::Context *c)
|
||||||
wxCommandEvent evt;
|
wxCommandEvent evt;
|
||||||
OnRadio(evt);
|
OnRadio(evt);
|
||||||
|
|
||||||
start_btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogFontsCollector::OnStart, this);
|
start_btn->Bind(wxEVT_BUTTON, &DialogFontsCollector::OnStart, this);
|
||||||
dest_browse_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogFontsCollector::OnBrowse, this);
|
dest_browse_button->Bind(wxEVT_BUTTON, &DialogFontsCollector::OnBrowse, this);
|
||||||
collection_mode->Bind(wxEVT_COMMAND_RADIOBOX_SELECTED, &DialogFontsCollector::OnRadio, this);
|
collection_mode->Bind(wxEVT_RADIOBOX, &DialogFontsCollector::OnRadio, this);
|
||||||
button_sizer->GetHelpButton()->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&HelpButton::OpenPage, "Fonts Collector"));
|
button_sizer->GetHelpButton()->Bind(wxEVT_BUTTON, std::bind(&HelpButton::OpenPage, "Fonts Collector"));
|
||||||
Bind(EVT_ADD_TEXT, &DialogFontsCollector::OnAddText, this);
|
Bind(EVT_ADD_TEXT, &DialogFontsCollector::OnAddText, this);
|
||||||
Bind(EVT_COLLECTION_DONE, &DialogFontsCollector::OnCollectionComplete, this);
|
Bind(EVT_COLLECTION_DONE, &DialogFontsCollector::OnCollectionComplete, this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,10 +80,10 @@ DialogJumpTo::DialogJumpTo(agi::Context *c)
|
||||||
CenterOnParent();
|
CenterOnParent();
|
||||||
|
|
||||||
Bind(wxEVT_INIT_DIALOG, &DialogJumpTo::OnInitDialog, this);
|
Bind(wxEVT_INIT_DIALOG, &DialogJumpTo::OnInitDialog, this);
|
||||||
Bind(wxEVT_COMMAND_TEXT_ENTER, &DialogJumpTo::OnOK, this);
|
Bind(wxEVT_TEXT_ENTER, &DialogJumpTo::OnOK, this);
|
||||||
Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogJumpTo::OnOK, this, wxID_OK);
|
Bind(wxEVT_BUTTON, &DialogJumpTo::OnOK, this, wxID_OK);
|
||||||
JumpTime->Bind(wxEVT_COMMAND_TEXT_UPDATED, &DialogJumpTo::OnEditTime, this);
|
JumpTime->Bind(wxEVT_TEXT, &DialogJumpTo::OnEditTime, this);
|
||||||
JumpFrame->Bind(wxEVT_COMMAND_TEXT_UPDATED, &DialogJumpTo::OnEditFrame, this);
|
JumpFrame->Bind(wxEVT_TEXT, &DialogJumpTo::OnEditFrame, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogJumpTo::OnInitDialog(wxInitDialogEvent&) {
|
void DialogJumpTo::OnInitDialog(wxInitDialogEvent&) {
|
||||||
|
|
|
@ -528,14 +528,14 @@ DialogKanjiTimer::DialogKanjiTimer(agi::Context *c)
|
||||||
Bind(wxEVT_KEY_DOWN, &DialogKanjiTimer::OnKeyDown, this);
|
Bind(wxEVT_KEY_DOWN, &DialogKanjiTimer::OnKeyDown, this);
|
||||||
display->Bind(wxEVT_KEY_DOWN, &DialogKanjiTimer::OnKeyDown, this);
|
display->Bind(wxEVT_KEY_DOWN, &DialogKanjiTimer::OnKeyDown, this);
|
||||||
|
|
||||||
CloseKT->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogKanjiTimer::OnClose, this);
|
CloseKT->Bind(wxEVT_BUTTON, &DialogKanjiTimer::OnClose, this);
|
||||||
Start->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogKanjiTimer::OnStart, this);
|
Start->Bind(wxEVT_BUTTON, &DialogKanjiTimer::OnStart, this);
|
||||||
Link->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogKanjiTimer::OnLink, this);
|
Link->Bind(wxEVT_BUTTON, &DialogKanjiTimer::OnLink, this);
|
||||||
Unlink->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogKanjiTimer::OnUnlink, this);
|
Unlink->Bind(wxEVT_BUTTON, &DialogKanjiTimer::OnUnlink, this);
|
||||||
SkipSourceLine->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogKanjiTimer::OnSkipSource, this);
|
SkipSourceLine->Bind(wxEVT_BUTTON, &DialogKanjiTimer::OnSkipSource, this);
|
||||||
SkipDestLine->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogKanjiTimer::OnSkipDest, this);
|
SkipDestLine->Bind(wxEVT_BUTTON, &DialogKanjiTimer::OnSkipDest, this);
|
||||||
GoBackLine->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogKanjiTimer::OnGoBack, this);
|
GoBackLine->Bind(wxEVT_BUTTON, &DialogKanjiTimer::OnGoBack, this);
|
||||||
AcceptLine->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogKanjiTimer::OnAccept, this);
|
AcceptLine->Bind(wxEVT_BUTTON, &DialogKanjiTimer::OnAccept, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogKanjiTimer::OnClose(wxCommandEvent &) {
|
void DialogKanjiTimer::OnClose(wxCommandEvent &) {
|
||||||
|
|
|
@ -73,7 +73,7 @@ public:
|
||||||
wxDialog *d = new DialogType(c);
|
wxDialog *d = new DialogType(c);
|
||||||
created_dialogs[&typeid(DialogType)] = d;
|
created_dialogs[&typeid(DialogType)] = d;
|
||||||
d->Bind(wxEVT_CLOSE_WINDOW, &DialogManager::OnClose<wxCloseEvent>, this);
|
d->Bind(wxEVT_CLOSE_WINDOW, &DialogManager::OnClose<wxCloseEvent>, this);
|
||||||
d->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogManager::OnClose<wxCommandEvent>, this, wxID_CANCEL);
|
d->Bind(wxEVT_BUTTON, &DialogManager::OnClose<wxCommandEvent>, this, wxID_CANCEL);
|
||||||
d->Show();
|
d->Show();
|
||||||
SetFloatOnParent(d);
|
SetFloatOnParent(d);
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,7 @@ public:
|
||||||
~DialogManager() {
|
~DialogManager() {
|
||||||
for (auto const& it : created_dialogs) {
|
for (auto const& it : created_dialogs) {
|
||||||
it.second->Unbind(wxEVT_CLOSE_WINDOW, &DialogManager::OnClose<wxCloseEvent>, this);
|
it.second->Unbind(wxEVT_CLOSE_WINDOW, &DialogManager::OnClose<wxCloseEvent>, this);
|
||||||
it.second->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogManager::OnClose<wxCommandEvent>, this, wxID_CANCEL);
|
it.second->Unbind(wxEVT_BUTTON, &DialogManager::OnClose<wxCommandEvent>, this, wxID_CANCEL);
|
||||||
it.second->Destroy();
|
it.second->Destroy();
|
||||||
}
|
}
|
||||||
created_dialogs.clear();
|
created_dialogs.clear();
|
||||||
|
|
|
@ -80,18 +80,18 @@ DialogPasteOver::DialogPasteOver(wxWindow *parent)
|
||||||
wxSizer *TopButtonSizer = new wxBoxSizer(wxHORIZONTAL);
|
wxSizer *TopButtonSizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
|
||||||
TopButtonSizer->Add(btn = new wxButton(this, -1, _("&All")), wxSizerFlags(1));
|
TopButtonSizer->Add(btn = new wxButton(this, -1, _("&All")), wxSizerFlags(1));
|
||||||
btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&DialogPasteOver::CheckAll, this, true));
|
btn->Bind(wxEVT_BUTTON, std::bind(&DialogPasteOver::CheckAll, this, true));
|
||||||
TopButtonSizer->Add(btn = new wxButton(this, -1, _("&None")), wxSizerFlags(1));
|
TopButtonSizer->Add(btn = new wxButton(this, -1, _("&None")), wxSizerFlags(1));
|
||||||
btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&DialogPasteOver::CheckAll, this, false));
|
btn->Bind(wxEVT_BUTTON, std::bind(&DialogPasteOver::CheckAll, this, false));
|
||||||
TopButtonSizer->Add(btn = new wxButton(this, -1, _("&Times")), wxSizerFlags(1));
|
TopButtonSizer->Add(btn = new wxButton(this, -1, _("&Times")), wxSizerFlags(1));
|
||||||
btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogPasteOver::OnTimes, this);
|
btn->Bind(wxEVT_BUTTON, &DialogPasteOver::OnTimes, this);
|
||||||
TopButtonSizer->Add(btn = new wxButton(this, -1, _("T&ext")), wxSizerFlags(1));
|
TopButtonSizer->Add(btn = new wxButton(this, -1, _("T&ext")), wxSizerFlags(1));
|
||||||
btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogPasteOver::OnText, this);
|
btn->Bind(wxEVT_BUTTON, &DialogPasteOver::OnText, this);
|
||||||
|
|
||||||
// Buttons
|
// Buttons
|
||||||
wxStdDialogButtonSizer *ButtonSizer = CreateStdDialogButtonSizer(wxOK | wxCANCEL | wxHELP);
|
wxStdDialogButtonSizer *ButtonSizer = CreateStdDialogButtonSizer(wxOK | wxCANCEL | wxHELP);
|
||||||
Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogPasteOver::OnOK, this, wxID_OK);
|
Bind(wxEVT_BUTTON, &DialogPasteOver::OnOK, this, wxID_OK);
|
||||||
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&HelpButton::OpenPage, "Paste Over"), wxID_HELP);
|
Bind(wxEVT_BUTTON, std::bind(&HelpButton::OpenPage, "Paste Over"), wxID_HELP);
|
||||||
|
|
||||||
// Main sizer
|
// Main sizer
|
||||||
wxSizer *MainSizer = new wxBoxSizer(wxVERTICAL);
|
wxSizer *MainSizer = new wxBoxSizer(wxVERTICAL);
|
||||||
|
|
|
@ -164,7 +164,7 @@ void DialogProgress::Run(std::function<void(agi::ProgressSink*)> task, int prior
|
||||||
|
|
||||||
// Unbind the cancel handler so that the default behavior happens (i.e. the
|
// Unbind the cancel handler so that the default behavior happens (i.e. the
|
||||||
// dialog is closed) as there's no longer a task to cancel
|
// dialog is closed) as there's no longer a task to cancel
|
||||||
Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogProgress::OnCancel, this, wxID_CANCEL);
|
Unbind(wxEVT_BUTTON, &DialogProgress::OnCancel, this, wxID_CANCEL);
|
||||||
|
|
||||||
// If it ran to completion and there is debug output, leave the window open
|
// If it ran to completion and there is debug output, leave the window open
|
||||||
// so the user can read the debug output and switch the cancel button to a
|
// so the user can read the debug output and switch the cancel button to a
|
||||||
|
@ -185,7 +185,7 @@ void DialogProgress::Run(std::function<void(agi::ProgressSink*)> task, int prior
|
||||||
void DialogProgress::OnShow(wxShowEvent&) {
|
void DialogProgress::OnShow(wxShowEvent&) {
|
||||||
// Restore the cancel button in case it was previously switched to a close
|
// Restore the cancel button in case it was previously switched to a close
|
||||||
// button
|
// button
|
||||||
Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogProgress::OnCancel, this, wxID_CANCEL);
|
Bind(wxEVT_BUTTON, &DialogProgress::OnCancel, this, wxID_CANCEL);
|
||||||
cancel_button->SetLabelText(_("Cancel"));
|
cancel_button->SetLabelText(_("Cancel"));
|
||||||
cancel_button->Enable();
|
cancel_button->Enable();
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ DialogProperties::DialogProperties(agi::Context *c)
|
||||||
if (!c->videoController->IsLoaded())
|
if (!c->videoController->IsLoaded())
|
||||||
FromVideo->Enable(false);
|
FromVideo->Enable(false);
|
||||||
else
|
else
|
||||||
FromVideo->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogProperties::OnSetFromVideo, this);
|
FromVideo->Bind(wxEVT_BUTTON, &DialogProperties::OnSetFromVideo, this);
|
||||||
|
|
||||||
ResSizer->Add(ResX,1,wxRIGHT | wxALIGN_CENTER_VERTICAL,5);
|
ResSizer->Add(ResX,1,wxRIGHT | wxALIGN_CENTER_VERTICAL,5);
|
||||||
ResSizer->Add(ResText,0,wxALIGN_CENTER | wxRIGHT,5);
|
ResSizer->Add(ResText,0,wxALIGN_CENTER | wxRIGHT,5);
|
||||||
|
@ -117,8 +117,8 @@ DialogProperties::DialogProperties(agi::Context *c)
|
||||||
|
|
||||||
// Button sizer
|
// Button sizer
|
||||||
wxStdDialogButtonSizer *ButtonSizer = CreateStdDialogButtonSizer(wxOK | wxCANCEL | wxHELP);
|
wxStdDialogButtonSizer *ButtonSizer = CreateStdDialogButtonSizer(wxOK | wxCANCEL | wxHELP);
|
||||||
Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogProperties::OnOK, this, wxID_OK);
|
Bind(wxEVT_BUTTON, &DialogProperties::OnOK, this, wxID_OK);
|
||||||
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&HelpButton::OpenPage, "Properties"), wxID_HELP);
|
Bind(wxEVT_BUTTON, std::bind(&HelpButton::OpenPage, "Properties"), wxID_HELP);
|
||||||
|
|
||||||
// MainSizer
|
// MainSizer
|
||||||
wxSizer *MainSizer = new wxBoxSizer(wxVERTICAL);
|
wxSizer *MainSizer = new wxBoxSizer(wxVERTICAL);
|
||||||
|
|
|
@ -109,11 +109,11 @@ DialogResample::DialogResample(agi::Context *c, ResampleSettings &settings)
|
||||||
|
|
||||||
// Bind events
|
// Bind events
|
||||||
using std::bind;
|
using std::bind;
|
||||||
Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&HelpButton::OpenPage, "Resample resolution"), wxID_HELP);
|
Bind(wxEVT_BUTTON, bind(&HelpButton::OpenPage, "Resample resolution"), wxID_HELP);
|
||||||
from_video->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogResample::SetDestFromVideo, this);
|
from_video->Bind(wxEVT_BUTTON, &DialogResample::SetDestFromVideo, this);
|
||||||
symmetrical->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &DialogResample::OnSymmetrical, this);
|
symmetrical->Bind(wxEVT_CHECKBOX, &DialogResample::OnSymmetrical, this);
|
||||||
margin_ctrl[LEFT]->Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, bind(&DialogResample::OnMarginChange, this, margin_ctrl[LEFT], margin_ctrl[RIGHT]));
|
margin_ctrl[LEFT]->Bind(wxEVT_SPINCTRL, bind(&DialogResample::OnMarginChange, this, margin_ctrl[LEFT], margin_ctrl[RIGHT]));
|
||||||
margin_ctrl[TOP]->Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, bind(&DialogResample::OnMarginChange, this, margin_ctrl[TOP], margin_ctrl[BOTTOM]));
|
margin_ctrl[TOP]->Bind(wxEVT_SPINCTRL, bind(&DialogResample::OnMarginChange, this, margin_ctrl[TOP], margin_ctrl[BOTTOM]));
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogResample::SetDestFromVideo(wxCommandEvent &) {
|
void DialogResample::SetDestFromVideo(wxCommandEvent &) {
|
||||||
|
|
|
@ -120,9 +120,9 @@ DialogSearchReplace::DialogSearchReplace(agi::Context* c, bool replace)
|
||||||
find_edit->SetFocus();
|
find_edit->SetFocus();
|
||||||
find_edit->SelectAll();
|
find_edit->SelectAll();
|
||||||
|
|
||||||
find_next->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&DialogSearchReplace::FindReplace, this, &SearchReplaceEngine::FindNext));
|
find_next->Bind(wxEVT_BUTTON, std::bind(&DialogSearchReplace::FindReplace, this, &SearchReplaceEngine::FindNext));
|
||||||
replace_next->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&DialogSearchReplace::FindReplace, this, &SearchReplaceEngine::ReplaceNext));
|
replace_next->Bind(wxEVT_BUTTON, std::bind(&DialogSearchReplace::FindReplace, this, &SearchReplaceEngine::ReplaceNext));
|
||||||
replace_all->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&DialogSearchReplace::FindReplace, this, &SearchReplaceEngine::ReplaceAll));
|
replace_all->Bind(wxEVT_BUTTON, std::bind(&DialogSearchReplace::FindReplace, this, &SearchReplaceEngine::ReplaceAll));
|
||||||
}
|
}
|
||||||
|
|
||||||
DialogSearchReplace::~DialogSearchReplace() {
|
DialogSearchReplace::~DialogSearchReplace() {
|
||||||
|
|
|
@ -30,8 +30,8 @@ SelectedChoicesDialog::SelectedChoicesDialog(wxWindow *parent, wxString const& m
|
||||||
|
|
||||||
wxButton *selAll = new wxButton(this, -1, _("Select &All"));
|
wxButton *selAll = new wxButton(this, -1, _("Select &All"));
|
||||||
wxButton *selNone = new wxButton(this, -1, _("Select &None"));
|
wxButton *selNone = new wxButton(this, -1, _("Select &None"));
|
||||||
selAll->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &SelectedChoicesDialog::SelectAll, this);
|
selAll->Bind(wxEVT_BUTTON, &SelectedChoicesDialog::SelectAll, this);
|
||||||
selNone->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [=](wxCommandEvent&) { SetSelections(wxArrayInt()); });
|
selNone->Bind(wxEVT_BUTTON, [=](wxCommandEvent&) { SetSelections(wxArrayInt()); });
|
||||||
|
|
||||||
auto buttonSizer = new wxBoxSizer(wxHORIZONTAL);
|
auto buttonSizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
buttonSizer->Add(selAll, wxSizerFlags(0).Left());
|
buttonSizer->Add(selAll, wxSizerFlags(0).Left());
|
||||||
|
|
|
@ -150,10 +150,10 @@ wxDialog (c->parent, -1, _("Select"), wxDefaultPosition, wxDefaultSize, wxCAPTIO
|
||||||
select_matching_lines->SetValue(!select_unmatching_lines->GetValue());
|
select_matching_lines->SetValue(!select_unmatching_lines->GetValue());
|
||||||
match_mode->SetSelection(OPT_GET("Tool/Select Lines/Mode")->GetInt());
|
match_mode->SetSelection(OPT_GET("Tool/Select Lines/Mode")->GetInt());
|
||||||
|
|
||||||
Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogSelection::Process, this, wxID_OK);
|
Bind(wxEVT_BUTTON, &DialogSelection::Process, this, wxID_OK);
|
||||||
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&HelpButton::OpenPage, "Select Lines"), wxID_HELP);
|
Bind(wxEVT_BUTTON, std::bind(&HelpButton::OpenPage, "Select Lines"), wxID_HELP);
|
||||||
apply_to_comments->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, std::bind(&DialogSelection::OnDialogueCheckbox, this, apply_to_dialogue));
|
apply_to_comments->Bind(wxEVT_CHECKBOX, std::bind(&DialogSelection::OnDialogueCheckbox, this, apply_to_dialogue));
|
||||||
apply_to_dialogue->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, std::bind(&DialogSelection::OnDialogueCheckbox, this, apply_to_comments));
|
apply_to_dialogue->Bind(wxEVT_CHECKBOX, std::bind(&DialogSelection::OnDialogueCheckbox, this, apply_to_comments));
|
||||||
}
|
}
|
||||||
|
|
||||||
DialogSelection::~DialogSelection() {
|
DialogSelection::~DialogSelection() {
|
||||||
|
|
|
@ -111,11 +111,11 @@ DialogShiftTimes::DialogShiftTimes(agi::Context *context)
|
||||||
// Create controls
|
// Create controls
|
||||||
shift_by_time = new wxRadioButton(this, -1, _("&Time: "), wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
|
shift_by_time = new wxRadioButton(this, -1, _("&Time: "), wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
|
||||||
shift_by_time->SetToolTip(_("Shift by time"));
|
shift_by_time->SetToolTip(_("Shift by time"));
|
||||||
shift_by_time->Bind(wxEVT_COMMAND_RADIOBUTTON_SELECTED, &DialogShiftTimes::OnByTime, this);
|
shift_by_time->Bind(wxEVT_RADIOBUTTON, &DialogShiftTimes::OnByTime, this);
|
||||||
|
|
||||||
shift_by_frames = new wxRadioButton(this, -1 , _("&Frames: "));
|
shift_by_frames = new wxRadioButton(this, -1 , _("&Frames: "));
|
||||||
shift_by_frames->SetToolTip(_("Shift by frames"));
|
shift_by_frames->SetToolTip(_("Shift by frames"));
|
||||||
shift_by_frames->Bind(wxEVT_COMMAND_RADIOBUTTON_SELECTED, &DialogShiftTimes::OnByFrames, this);
|
shift_by_frames->Bind(wxEVT_RADIOBUTTON, &DialogShiftTimes::OnByFrames, this);
|
||||||
|
|
||||||
shift_time = new TimeEdit(this, -1, context);
|
shift_time = new TimeEdit(this, -1, context);
|
||||||
shift_time->SetToolTip(_("Enter time in h:mm:ss.cs notation"));
|
shift_time->SetToolTip(_("Enter time in h:mm:ss.cs notation"));
|
||||||
|
@ -138,7 +138,7 @@ DialogShiftTimes::DialogShiftTimes(agi::Context *context)
|
||||||
history_box = new wxListBox(this, -1, wxDefaultPosition, wxSize(350, 100), 0, nullptr, wxLB_HSCROLL);
|
history_box = new wxListBox(this, -1, wxDefaultPosition, wxSize(350, 100), 0, nullptr, wxLB_HSCROLL);
|
||||||
|
|
||||||
wxButton *clear_button = new wxButton(this, -1, _("&Clear"));
|
wxButton *clear_button = new wxButton(this, -1, _("&Clear"));
|
||||||
clear_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogShiftTimes::OnClear, this);
|
clear_button->Bind(wxEVT_BUTTON, &DialogShiftTimes::OnClear, this);
|
||||||
|
|
||||||
// Set initial control states
|
// Set initial control states
|
||||||
OnTimecodesLoaded(context->videoController->FPS());
|
OnTimecodesLoaded(context->videoController->FPS());
|
||||||
|
@ -192,10 +192,10 @@ DialogShiftTimes::DialogShiftTimes(agi::Context *context)
|
||||||
SetSizerAndFit(main_sizer);
|
SetSizerAndFit(main_sizer);
|
||||||
CenterOnParent();
|
CenterOnParent();
|
||||||
|
|
||||||
Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogShiftTimes::Process, this, wxID_OK);
|
Bind(wxEVT_BUTTON, &DialogShiftTimes::Process, this, wxID_OK);
|
||||||
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&HelpButton::OpenPage, "Shift Times"), wxID_HELP);
|
Bind(wxEVT_BUTTON, std::bind(&HelpButton::OpenPage, "Shift Times"), wxID_HELP);
|
||||||
shift_time->Bind(wxEVT_COMMAND_TEXT_ENTER, &DialogShiftTimes::Process, this);
|
shift_time->Bind(wxEVT_TEXT_ENTER, &DialogShiftTimes::Process, this);
|
||||||
history_box->Bind(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, &DialogShiftTimes::OnHistoryClick, this);
|
history_box->Bind(wxEVT_LISTBOX_DCLICK, &DialogShiftTimes::OnHistoryClick, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
DialogShiftTimes::~DialogShiftTimes() {
|
DialogShiftTimes::~DialogShiftTimes() {
|
||||||
|
|
|
@ -78,14 +78,14 @@ DialogSpellChecker::DialogSpellChecker(agi::Context *context)
|
||||||
current_word_sizer->Add(new wxStaticText(this, -1, _("Replace with:")), 0, wxALIGN_CENTER_VERTICAL);
|
current_word_sizer->Add(new wxStaticText(this, -1, _("Replace with:")), 0, wxALIGN_CENTER_VERTICAL);
|
||||||
current_word_sizer->Add(replace_word = new wxTextCtrl(this, -1, ""), wxSizerFlags(1).Expand());
|
current_word_sizer->Add(replace_word = new wxTextCtrl(this, -1, ""), wxSizerFlags(1).Expand());
|
||||||
|
|
||||||
replace_word->Bind(wxEVT_COMMAND_TEXT_UPDATED, [=](wxCommandEvent&) {
|
replace_word->Bind(wxEVT_TEXT, [=](wxCommandEvent&) {
|
||||||
remove_button->Enable(spellchecker->CanRemoveWord(from_wx(replace_word->GetValue())));
|
remove_button->Enable(spellchecker->CanRemoveWord(from_wx(replace_word->GetValue())));
|
||||||
});
|
});
|
||||||
|
|
||||||
// List of suggested corrections
|
// List of suggested corrections
|
||||||
suggest_list = new wxListBox(this, -1, wxDefaultPosition, wxSize(300, 150));
|
suggest_list = new wxListBox(this, -1, wxDefaultPosition, wxSize(300, 150));
|
||||||
suggest_list->Bind(wxEVT_COMMAND_LISTBOX_SELECTED, &DialogSpellChecker::OnChangeSuggestion, this);
|
suggest_list->Bind(wxEVT_LISTBOX, &DialogSpellChecker::OnChangeSuggestion, this);
|
||||||
suggest_list->Bind(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, &DialogSpellChecker::OnReplace, this);
|
suggest_list->Bind(wxEVT_LISTBOX_DCLICK, &DialogSpellChecker::OnReplace, this);
|
||||||
bottom_left_sizer->Add(suggest_list, wxSizerFlags(1).Expand());
|
bottom_left_sizer->Add(suggest_list, wxSizerFlags(1).Expand());
|
||||||
|
|
||||||
// List of supported spellchecker languages
|
// List of supported spellchecker languages
|
||||||
|
@ -114,7 +114,7 @@ DialogSpellChecker::DialogSpellChecker(agi::Context *context)
|
||||||
if (cur_lang_index == wxNOT_FOUND) cur_lang_index = dictionary_lang_codes.Index("en_US");
|
if (cur_lang_index == wxNOT_FOUND) cur_lang_index = dictionary_lang_codes.Index("en_US");
|
||||||
if (cur_lang_index == wxNOT_FOUND) cur_lang_index = 0;
|
if (cur_lang_index == wxNOT_FOUND) cur_lang_index = 0;
|
||||||
language->SetSelection(cur_lang_index);
|
language->SetSelection(cur_lang_index);
|
||||||
language->Bind(wxEVT_COMMAND_COMBOBOX_SELECTED, &DialogSpellChecker::OnChangeLanguage, this);
|
language->Bind(wxEVT_COMBOBOX, &DialogSpellChecker::OnChangeLanguage, this);
|
||||||
|
|
||||||
bottom_left_sizer->Add(language, wxSizerFlags().Expand().Border(wxTOP, 5));
|
bottom_left_sizer->Add(language, wxSizerFlags().Expand().Border(wxTOP, 5));
|
||||||
}
|
}
|
||||||
|
@ -126,7 +126,7 @@ DialogSpellChecker::DialogSpellChecker(agi::Context *context)
|
||||||
auto checkbox = new wxCheckBox(this, -1, text);
|
auto checkbox = new wxCheckBox(this, -1, text);
|
||||||
actions_sizer->Add(checkbox, button_flags);
|
actions_sizer->Add(checkbox, button_flags);
|
||||||
checkbox->SetValue(OPT_GET(opt)->GetBool());
|
checkbox->SetValue(OPT_GET(opt)->GetBool());
|
||||||
checkbox->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED,
|
checkbox->Bind(wxEVT_CHECKBOX,
|
||||||
[=](wxCommandEvent &evt) { OPT_SET(opt)->SetBool(!!evt.GetInt()); });
|
[=](wxCommandEvent &evt) { OPT_SET(opt)->SetBool(!!evt.GetInt()); });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -136,32 +136,32 @@ DialogSpellChecker::DialogSpellChecker(agi::Context *context)
|
||||||
wxButton *button;
|
wxButton *button;
|
||||||
|
|
||||||
actions_sizer->Add(button = new wxButton(this, -1, _("&Replace")), button_flags);
|
actions_sizer->Add(button = new wxButton(this, -1, _("&Replace")), button_flags);
|
||||||
button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogSpellChecker::OnReplace, this);
|
button->Bind(wxEVT_BUTTON, &DialogSpellChecker::OnReplace, this);
|
||||||
|
|
||||||
actions_sizer->Add(button = new wxButton(this, -1, _("Replace &all")), button_flags);
|
actions_sizer->Add(button = new wxButton(this, -1, _("Replace &all")), button_flags);
|
||||||
button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [=](wxCommandEvent&) {
|
button->Bind(wxEVT_BUTTON, [=](wxCommandEvent&) {
|
||||||
auto_replace[from_wx(orig_word->GetValue())] = from_wx(replace_word->GetValue());
|
auto_replace[from_wx(orig_word->GetValue())] = from_wx(replace_word->GetValue());
|
||||||
Replace();
|
Replace();
|
||||||
FindNext();
|
FindNext();
|
||||||
});
|
});
|
||||||
|
|
||||||
actions_sizer->Add(button = new wxButton(this, -1, _("&Ignore")), button_flags);
|
actions_sizer->Add(button = new wxButton(this, -1, _("&Ignore")), button_flags);
|
||||||
button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [=](wxCommandEvent&) { FindNext(); });
|
button->Bind(wxEVT_BUTTON, [=](wxCommandEvent&) { FindNext(); });
|
||||||
|
|
||||||
actions_sizer->Add(button = new wxButton(this, -1, _("Ignore a&ll")), button_flags);
|
actions_sizer->Add(button = new wxButton(this, -1, _("Ignore a&ll")), button_flags);
|
||||||
button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [=](wxCommandEvent&) {
|
button->Bind(wxEVT_BUTTON, [=](wxCommandEvent&) {
|
||||||
auto_ignore.insert(from_wx(orig_word->GetValue()));
|
auto_ignore.insert(from_wx(orig_word->GetValue()));
|
||||||
FindNext();
|
FindNext();
|
||||||
});
|
});
|
||||||
|
|
||||||
actions_sizer->Add(add_button = new wxButton(this, -1, _("Add to &dictionary")), button_flags);
|
actions_sizer->Add(add_button = new wxButton(this, -1, _("Add to &dictionary")), button_flags);
|
||||||
add_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [=](wxCommandEvent&) {
|
add_button->Bind(wxEVT_BUTTON, [=](wxCommandEvent&) {
|
||||||
spellchecker->AddWord(from_wx(orig_word->GetValue()));
|
spellchecker->AddWord(from_wx(orig_word->GetValue()));
|
||||||
FindNext();
|
FindNext();
|
||||||
});
|
});
|
||||||
|
|
||||||
actions_sizer->Add(remove_button = new wxButton(this, -1, _("Remove fro&m dictionary")), button_flags);
|
actions_sizer->Add(remove_button = new wxButton(this, -1, _("Remove fro&m dictionary")), button_flags);
|
||||||
remove_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [=](wxCommandEvent&) {
|
remove_button->Bind(wxEVT_BUTTON, [=](wxCommandEvent&) {
|
||||||
spellchecker->RemoveWord(from_wx(replace_word->GetValue()));
|
spellchecker->RemoveWord(from_wx(replace_word->GetValue()));
|
||||||
SetWord(from_wx(orig_word->GetValue()));
|
SetWord(from_wx(orig_word->GetValue()));
|
||||||
});
|
});
|
||||||
|
|
|
@ -365,18 +365,18 @@ DialogStyleEditor::DialogStyleEditor(wxWindow *parent, AssStyle *style, agi::Con
|
||||||
|
|
||||||
Bind(wxEVT_CHILD_FOCUS, &DialogStyleEditor::OnChildFocus, this);
|
Bind(wxEVT_CHILD_FOCUS, &DialogStyleEditor::OnChildFocus, this);
|
||||||
|
|
||||||
Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &DialogStyleEditor::OnCommandPreviewUpdate, this);
|
Bind(wxEVT_CHECKBOX, &DialogStyleEditor::OnCommandPreviewUpdate, this);
|
||||||
Bind(wxEVT_COMMAND_COMBOBOX_SELECTED, &DialogStyleEditor::OnCommandPreviewUpdate, this);
|
Bind(wxEVT_COMBOBOX, &DialogStyleEditor::OnCommandPreviewUpdate, this);
|
||||||
Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, &DialogStyleEditor::OnCommandPreviewUpdate, this);
|
Bind(wxEVT_SPINCTRL, &DialogStyleEditor::OnCommandPreviewUpdate, this);
|
||||||
|
|
||||||
previewButton->Bind(EVT_COLOR, &DialogStyleEditor::OnPreviewColourChange, this);
|
previewButton->Bind(EVT_COLOR, &DialogStyleEditor::OnPreviewColourChange, this);
|
||||||
FontName->Bind(wxEVT_COMMAND_TEXT_ENTER, &DialogStyleEditor::OnCommandPreviewUpdate, this);
|
FontName->Bind(wxEVT_TEXT_ENTER, &DialogStyleEditor::OnCommandPreviewUpdate, this);
|
||||||
PreviewText->Bind(wxEVT_COMMAND_TEXT_UPDATED, &DialogStyleEditor::OnPreviewTextChange, this);
|
PreviewText->Bind(wxEVT_TEXT, &DialogStyleEditor::OnPreviewTextChange, this);
|
||||||
|
|
||||||
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&DialogStyleEditor::Apply, this, true, true), wxID_OK);
|
Bind(wxEVT_BUTTON, std::bind(&DialogStyleEditor::Apply, this, true, true), wxID_OK);
|
||||||
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&DialogStyleEditor::Apply, this, true, false), wxID_APPLY);
|
Bind(wxEVT_BUTTON, std::bind(&DialogStyleEditor::Apply, this, true, false), wxID_APPLY);
|
||||||
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&DialogStyleEditor::Apply, this, false, true), wxID_CANCEL);
|
Bind(wxEVT_BUTTON, std::bind(&DialogStyleEditor::Apply, this, false, true), wxID_CANCEL);
|
||||||
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&HelpButton::OpenPage, "Style Editor"), wxID_HELP);
|
Bind(wxEVT_BUTTON, std::bind(&HelpButton::OpenPage, "Style Editor"), wxID_HELP);
|
||||||
|
|
||||||
for (auto const& elem : colorButton)
|
for (auto const& elem : colorButton)
|
||||||
elem->Bind(EVT_COLOR, &DialogStyleEditor::OnSetColor, this);
|
elem->Bind(EVT_COLOR, &DialogStyleEditor::OnSetColor, this);
|
||||||
|
|
|
@ -213,7 +213,7 @@ DialogStyleManager::DialogStyleManager(agi::Context *context)
|
||||||
// Buttons
|
// Buttons
|
||||||
wxStdDialogButtonSizer *buttonSizer = CreateStdDialogButtonSizer(wxCANCEL | wxHELP);
|
wxStdDialogButtonSizer *buttonSizer = CreateStdDialogButtonSizer(wxCANCEL | wxHELP);
|
||||||
buttonSizer->GetCancelButton()->SetLabel(_("Close"));
|
buttonSizer->GetCancelButton()->SetLabel(_("Close"));
|
||||||
Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&HelpButton::OpenPage, "Styles Manager"), wxID_HELP);
|
Bind(wxEVT_BUTTON, bind(&HelpButton::OpenPage, "Styles Manager"), wxID_HELP);
|
||||||
|
|
||||||
// General layout
|
// General layout
|
||||||
wxSizer *StylesSizer = new wxBoxSizer(wxHORIZONTAL);
|
wxSizer *StylesSizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
@ -238,43 +238,43 @@ DialogStyleManager::DialogStyleManager(agi::Context *context)
|
||||||
StorageList->Bind(wxEVT_KEY_DOWN, &DialogStyleManager::OnKeyDown, this);
|
StorageList->Bind(wxEVT_KEY_DOWN, &DialogStyleManager::OnKeyDown, this);
|
||||||
CurrentList->Bind(wxEVT_KEY_DOWN, &DialogStyleManager::OnKeyDown, this);
|
CurrentList->Bind(wxEVT_KEY_DOWN, &DialogStyleManager::OnKeyDown, this);
|
||||||
|
|
||||||
StorageMoveUp->Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&DialogStyleManager::MoveStyles, this, true, 0));
|
StorageMoveUp->Bind(wxEVT_BUTTON, bind(&DialogStyleManager::MoveStyles, this, true, 0));
|
||||||
StorageMoveTop->Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&DialogStyleManager::MoveStyles, this, true, 1));
|
StorageMoveTop->Bind(wxEVT_BUTTON, bind(&DialogStyleManager::MoveStyles, this, true, 1));
|
||||||
StorageMoveDown->Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&DialogStyleManager::MoveStyles, this, true, 2));
|
StorageMoveDown->Bind(wxEVT_BUTTON, bind(&DialogStyleManager::MoveStyles, this, true, 2));
|
||||||
StorageMoveBottom->Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&DialogStyleManager::MoveStyles, this, true, 3));
|
StorageMoveBottom->Bind(wxEVT_BUTTON, bind(&DialogStyleManager::MoveStyles, this, true, 3));
|
||||||
StorageSort->Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&DialogStyleManager::MoveStyles, this, true, 4));
|
StorageSort->Bind(wxEVT_BUTTON, bind(&DialogStyleManager::MoveStyles, this, true, 4));
|
||||||
|
|
||||||
CurrentMoveUp->Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&DialogStyleManager::MoveStyles, this, false, 0));
|
CurrentMoveUp->Bind(wxEVT_BUTTON, bind(&DialogStyleManager::MoveStyles, this, false, 0));
|
||||||
CurrentMoveTop->Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&DialogStyleManager::MoveStyles, this, false, 1));
|
CurrentMoveTop->Bind(wxEVT_BUTTON, bind(&DialogStyleManager::MoveStyles, this, false, 1));
|
||||||
CurrentMoveDown->Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&DialogStyleManager::MoveStyles, this, false, 2));
|
CurrentMoveDown->Bind(wxEVT_BUTTON, bind(&DialogStyleManager::MoveStyles, this, false, 2));
|
||||||
CurrentMoveBottom->Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&DialogStyleManager::MoveStyles, this, false, 3));
|
CurrentMoveBottom->Bind(wxEVT_BUTTON, bind(&DialogStyleManager::MoveStyles, this, false, 3));
|
||||||
CurrentSort->Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&DialogStyleManager::MoveStyles, this, false, 4));
|
CurrentSort->Bind(wxEVT_BUTTON, bind(&DialogStyleManager::MoveStyles, this, false, 4));
|
||||||
|
|
||||||
CatalogNew->Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&DialogStyleManager::OnCatalogNew, this));
|
CatalogNew->Bind(wxEVT_BUTTON, bind(&DialogStyleManager::OnCatalogNew, this));
|
||||||
CatalogDelete->Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&DialogStyleManager::OnCatalogDelete, this));
|
CatalogDelete->Bind(wxEVT_BUTTON, bind(&DialogStyleManager::OnCatalogDelete, this));
|
||||||
|
|
||||||
StorageNew->Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&DialogStyleManager::OnStorageNew, this));
|
StorageNew->Bind(wxEVT_BUTTON, bind(&DialogStyleManager::OnStorageNew, this));
|
||||||
StorageEdit->Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&DialogStyleManager::OnStorageEdit, this));
|
StorageEdit->Bind(wxEVT_BUTTON, bind(&DialogStyleManager::OnStorageEdit, this));
|
||||||
StorageCopy->Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&DialogStyleManager::OnStorageCopy, this));
|
StorageCopy->Bind(wxEVT_BUTTON, bind(&DialogStyleManager::OnStorageCopy, this));
|
||||||
StorageDelete->Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&DialogStyleManager::OnStorageDelete, this));
|
StorageDelete->Bind(wxEVT_BUTTON, bind(&DialogStyleManager::OnStorageDelete, this));
|
||||||
|
|
||||||
CurrentNew->Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&DialogStyleManager::OnCurrentNew, this));
|
CurrentNew->Bind(wxEVT_BUTTON, bind(&DialogStyleManager::OnCurrentNew, this));
|
||||||
CurrentEdit->Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&DialogStyleManager::OnCurrentEdit, this));
|
CurrentEdit->Bind(wxEVT_BUTTON, bind(&DialogStyleManager::OnCurrentEdit, this));
|
||||||
CurrentCopy->Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&DialogStyleManager::OnCurrentCopy, this));
|
CurrentCopy->Bind(wxEVT_BUTTON, bind(&DialogStyleManager::OnCurrentCopy, this));
|
||||||
CurrentDelete->Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&DialogStyleManager::OnCurrentDelete, this));
|
CurrentDelete->Bind(wxEVT_BUTTON, bind(&DialogStyleManager::OnCurrentDelete, this));
|
||||||
|
|
||||||
CurrentImport->Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&DialogStyleManager::OnCurrentImport, this));
|
CurrentImport->Bind(wxEVT_BUTTON, bind(&DialogStyleManager::OnCurrentImport, this));
|
||||||
|
|
||||||
MoveToLocal->Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&DialogStyleManager::OnCopyToCurrent, this));
|
MoveToLocal->Bind(wxEVT_BUTTON, bind(&DialogStyleManager::OnCopyToCurrent, this));
|
||||||
MoveToStorage->Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&DialogStyleManager::OnCopyToStorage, this));
|
MoveToStorage->Bind(wxEVT_BUTTON, bind(&DialogStyleManager::OnCopyToStorage, this));
|
||||||
|
|
||||||
CatalogList->Bind(wxEVT_COMMAND_COMBOBOX_SELECTED, bind(&DialogStyleManager::OnChangeCatalog, this));
|
CatalogList->Bind(wxEVT_COMBOBOX, bind(&DialogStyleManager::OnChangeCatalog, this));
|
||||||
|
|
||||||
StorageList->Bind(wxEVT_COMMAND_LISTBOX_SELECTED, bind(&DialogStyleManager::UpdateButtons, this));
|
StorageList->Bind(wxEVT_LISTBOX, bind(&DialogStyleManager::UpdateButtons, this));
|
||||||
StorageList->Bind(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, bind(&DialogStyleManager::OnStorageEdit, this));
|
StorageList->Bind(wxEVT_LISTBOX_DCLICK, bind(&DialogStyleManager::OnStorageEdit, this));
|
||||||
|
|
||||||
CurrentList->Bind(wxEVT_COMMAND_LISTBOX_SELECTED, bind(&DialogStyleManager::UpdateButtons, this));
|
CurrentList->Bind(wxEVT_LISTBOX, bind(&DialogStyleManager::UpdateButtons, this));
|
||||||
CurrentList->Bind(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, bind(&DialogStyleManager::OnCurrentEdit, this));
|
CurrentList->Bind(wxEVT_LISTBOX_DCLICK, bind(&DialogStyleManager::OnCurrentEdit, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
DialogStyleManager::~DialogStyleManager() {
|
DialogStyleManager::~DialogStyleManager() {
|
||||||
|
|
|
@ -142,11 +142,11 @@ DialogStyling::DialogStyling(agi::Context *context)
|
||||||
Bind(wxEVT_CHAR_HOOK, &DialogStyling::OnCharHook, this);
|
Bind(wxEVT_CHAR_HOOK, &DialogStyling::OnCharHook, this);
|
||||||
style_name->Bind(wxEVT_CHAR_HOOK, &DialogStyling::OnCharHook, this);
|
style_name->Bind(wxEVT_CHAR_HOOK, &DialogStyling::OnCharHook, this);
|
||||||
style_name->Bind(wxEVT_KEY_DOWN, &DialogStyling::OnKeyDown, this);
|
style_name->Bind(wxEVT_KEY_DOWN, &DialogStyling::OnKeyDown, this);
|
||||||
play_video->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogStyling::OnPlayVideoButton, this);
|
play_video->Bind(wxEVT_BUTTON, &DialogStyling::OnPlayVideoButton, this);
|
||||||
play_audio->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogStyling::OnPlayAudioButton, this);
|
play_audio->Bind(wxEVT_BUTTON, &DialogStyling::OnPlayAudioButton, this);
|
||||||
style_list->Bind(wxEVT_COMMAND_LISTBOX_SELECTED, &DialogStyling::OnListClicked, this);
|
style_list->Bind(wxEVT_LISTBOX, &DialogStyling::OnListClicked, this);
|
||||||
style_list->Bind(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, &DialogStyling::OnListDoubleClicked, this);
|
style_list->Bind(wxEVT_LISTBOX_DCLICK, &DialogStyling::OnListDoubleClicked, this);
|
||||||
style_name->Bind(wxEVT_COMMAND_TEXT_UPDATED, &DialogStyling::OnStyleBoxModified, this);
|
style_name->Bind(wxEVT_TEXT, &DialogStyling::OnStyleBoxModified, this);
|
||||||
|
|
||||||
OnActiveLineChanged(c->selectionController->GetActiveLine());
|
OnActiveLineChanged(c->selectionController->GetActiveLine());
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ DialogTextImport::DialogTextImport()
|
||||||
SetSizerAndFit(main_sizer);
|
SetSizerAndFit(main_sizer);
|
||||||
|
|
||||||
|
|
||||||
Bind(wxEVT_COMMAND_BUTTON_CLICKED, [=](wxCommandEvent&) {
|
Bind(wxEVT_BUTTON, [=](wxCommandEvent&) {
|
||||||
TransferDataFromWindow();
|
TransferDataFromWindow();
|
||||||
|
|
||||||
OPT_SET("Tool/Import/Text/Actor Separator")->SetString(seperator);
|
OPT_SET("Tool/Import/Text/Actor Separator")->SetString(seperator);
|
||||||
|
|
|
@ -81,7 +81,7 @@ wxTextCtrl *make_ctrl(wxWindow *parent, wxSizer *sizer, wxString const& desc, in
|
||||||
sizer->Add(ctrl, wxSizerFlags().Expand().Border(wxRIGHT));
|
sizer->Add(ctrl, wxSizerFlags().Expand().Border(wxRIGHT));
|
||||||
|
|
||||||
ctrl->Enable(cb->IsChecked());
|
ctrl->Enable(cb->IsChecked());
|
||||||
cb->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, bind(set_ctrl_state, _1, cb, ctrl));
|
cb->Bind(wxEVT_CHECKBOX, bind(set_ctrl_state, _1, cb, ctrl));
|
||||||
|
|
||||||
return ctrl;
|
return ctrl;
|
||||||
}
|
}
|
||||||
|
@ -210,7 +210,7 @@ DialogTimingProcessor::DialogTimingProcessor(agi::Context *c)
|
||||||
// Button sizer
|
// Button sizer
|
||||||
wxStdDialogButtonSizer *ButtonSizer = CreateStdDialogButtonSizer(wxOK | wxCANCEL | wxHELP);
|
wxStdDialogButtonSizer *ButtonSizer = CreateStdDialogButtonSizer(wxOK | wxCANCEL | wxHELP);
|
||||||
ApplyButton = ButtonSizer->GetAffirmativeButton();
|
ApplyButton = ButtonSizer->GetAffirmativeButton();
|
||||||
ButtonSizer->GetHelpButton()->Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&HelpButton::OpenPage, "Timing Processor"));
|
ButtonSizer->GetHelpButton()->Bind(wxEVT_BUTTON, bind(&HelpButton::OpenPage, "Timing Processor"));
|
||||||
|
|
||||||
// Right Sizer
|
// Right Sizer
|
||||||
wxSizer *RightSizer = new wxBoxSizer(wxVERTICAL);
|
wxSizer *RightSizer = new wxBoxSizer(wxVERTICAL);
|
||||||
|
@ -241,11 +241,11 @@ DialogTimingProcessor::DialogTimingProcessor(agi::Context *c)
|
||||||
SetSizerAndFit(MainSizer);
|
SetSizerAndFit(MainSizer);
|
||||||
CenterOnParent();
|
CenterOnParent();
|
||||||
|
|
||||||
Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, bind(&DialogTimingProcessor::UpdateControls, this));
|
Bind(wxEVT_CHECKBOX, bind(&DialogTimingProcessor::UpdateControls, this));
|
||||||
Bind(wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, bind(&DialogTimingProcessor::UpdateControls, this));
|
Bind(wxEVT_CHECKLISTBOX, bind(&DialogTimingProcessor::UpdateControls, this));
|
||||||
Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogTimingProcessor::OnApply, this, wxID_OK);
|
Bind(wxEVT_BUTTON, &DialogTimingProcessor::OnApply, this, wxID_OK);
|
||||||
all->Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&DialogTimingProcessor::CheckAll, this, true));
|
all->Bind(wxEVT_BUTTON, bind(&DialogTimingProcessor::CheckAll, this, true));
|
||||||
none->Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&DialogTimingProcessor::CheckAll, this, false));
|
none->Bind(wxEVT_BUTTON, bind(&DialogTimingProcessor::CheckAll, this, false));
|
||||||
|
|
||||||
CheckAll(true);
|
CheckAll(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,12 +130,12 @@ DialogTranslation::DialogTranslation(agi::Context *c)
|
||||||
|
|
||||||
wxButton *play_audio = new wxButton(this, -1, _("Play &Audio"));
|
wxButton *play_audio = new wxButton(this, -1, _("Play &Audio"));
|
||||||
play_audio->Enable(c->audioController->IsAudioOpen());
|
play_audio->Enable(c->audioController->IsAudioOpen());
|
||||||
play_audio->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogTranslation::OnPlayAudioButton, this);
|
play_audio->Bind(wxEVT_BUTTON, &DialogTranslation::OnPlayAudioButton, this);
|
||||||
actions_box->Add(play_audio, 0, wxALL, 5);
|
actions_box->Add(play_audio, 0, wxALL, 5);
|
||||||
|
|
||||||
wxButton *play_video = new wxButton(this, -1, _("Play &Video"));
|
wxButton *play_video = new wxButton(this, -1, _("Play &Video"));
|
||||||
play_video->Enable(c->videoController->IsLoaded());
|
play_video->Enable(c->videoController->IsLoaded());
|
||||||
play_video->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogTranslation::OnPlayVideoButton, this);
|
play_video->Bind(wxEVT_BUTTON, &DialogTranslation::OnPlayVideoButton, this);
|
||||||
actions_box->Add(play_video, 0, wxLEFT | wxRIGHT | wxBOTTOM, 5);
|
actions_box->Add(play_video, 0, wxLEFT | wxRIGHT | wxBOTTOM, 5);
|
||||||
|
|
||||||
right_box->Add(actions_box, 0);
|
right_box->Add(actions_box, 0);
|
||||||
|
|
|
@ -161,8 +161,8 @@ VersionCheckerResultDialog::VersionCheckerResultDialog(wxString const& main_text
|
||||||
Centre();
|
Centre();
|
||||||
Show();
|
Show();
|
||||||
|
|
||||||
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&VersionCheckerResultDialog::Close, this, false), wxID_OK);
|
Bind(wxEVT_BUTTON, std::bind(&VersionCheckerResultDialog::Close, this, false), wxID_OK);
|
||||||
Bind(wxEVT_COMMAND_BUTTON_CLICKED, &VersionCheckerResultDialog::OnRemindMeLater, this, wxID_NO);
|
Bind(wxEVT_BUTTON, &VersionCheckerResultDialog::OnRemindMeLater, this, wxID_NO);
|
||||||
Bind(wxEVT_CLOSE_WINDOW, &VersionCheckerResultDialog::OnClose, this);
|
Bind(wxEVT_CLOSE_WINDOW, &VersionCheckerResultDialog::OnClose, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,7 @@ wxWindow *AssTransformFramerateFilter::GetConfigDialogWindow(wxWindow *parent, a
|
||||||
wxButton *FromVideo = new wxButton(base,-1,_("From &video"));
|
wxButton *FromVideo = new wxButton(base,-1,_("From &video"));
|
||||||
if (Input->IsLoaded()) {
|
if (Input->IsLoaded()) {
|
||||||
initialInput = wxString::Format("%2.3f",Input->FPS());
|
initialInput = wxString::Format("%2.3f",Input->FPS());
|
||||||
FromVideo->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [=](wxCommandEvent&) {
|
FromVideo->Bind(wxEVT_BUTTON, [=](wxCommandEvent&) {
|
||||||
InputFramerate->SetValue(wxString::Format("%g", c->videoController->FPS().FPS()));
|
InputFramerate->SetValue(wxString::Format("%g", c->videoController->FPS().FPS()));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,7 +80,7 @@ static void init_static() {
|
||||||
HelpButton::HelpButton(wxWindow *parent, wxString const& page, wxPoint position, wxSize size)
|
HelpButton::HelpButton(wxWindow *parent, wxString const& page, wxPoint position, wxSize size)
|
||||||
: wxButton(parent, wxID_HELP, "", position, size)
|
: wxButton(parent, wxID_HELP, "", position, size)
|
||||||
{
|
{
|
||||||
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&HelpButton::OpenPage, page));
|
Bind(wxEVT_BUTTON, std::bind(&HelpButton::OpenPage, page));
|
||||||
init_static();
|
init_static();
|
||||||
if (pages->find(page) == pages->end())
|
if (pages->find(page) == pages->end())
|
||||||
throw agi::InternalError("Invalid help page", nullptr);
|
throw agi::InternalError("Invalid help page", nullptr);
|
||||||
|
|
|
@ -454,7 +454,7 @@ namespace menu {
|
||||||
}
|
}
|
||||||
|
|
||||||
window->Bind(wxEVT_MENU_OPEN, &CommandManager::OnMenuOpen, &menu->cm);
|
window->Bind(wxEVT_MENU_OPEN, &CommandManager::OnMenuOpen, &menu->cm);
|
||||||
window->Bind(wxEVT_COMMAND_MENU_SELECTED, &CommandManager::OnMenuClick, &menu->cm);
|
window->Bind(wxEVT_MENU, &CommandManager::OnMenuClick, &menu->cm);
|
||||||
window->SetMenuBar(menu.get());
|
window->SetMenuBar(menu.get());
|
||||||
|
|
||||||
menu.release();
|
menu.release();
|
||||||
|
@ -464,7 +464,7 @@ namespace menu {
|
||||||
auto menu = new CommandMenu(c);
|
auto menu = new CommandMenu(c);
|
||||||
build_menu(name, c, &menu->cm, menu);
|
build_menu(name, c, &menu->cm, menu);
|
||||||
menu->Bind(wxEVT_MENU_OPEN, &CommandManager::OnMenuOpen, &menu->cm);
|
menu->Bind(wxEVT_MENU_OPEN, &CommandManager::OnMenuOpen, &menu->cm);
|
||||||
menu->Bind(wxEVT_COMMAND_MENU_SELECTED, &CommandManager::OnMenuClick, &menu->cm);
|
menu->Bind(wxEVT_MENU, &CommandManager::OnMenuClick, &menu->cm);
|
||||||
return std::unique_ptr<wxMenu>(menu);
|
return std::unique_ptr<wxMenu>(menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -383,12 +383,12 @@ Interface_Hotkeys::Interface_Hotkeys(wxTreebook *book, Preferences *parent)
|
||||||
wxButton *edit_button = new wxButton(this, -1, _("&Edit"));
|
wxButton *edit_button = new wxButton(this, -1, _("&Edit"));
|
||||||
wxButton *delete_button = new wxButton(this, -1, _("&Delete"));
|
wxButton *delete_button = new wxButton(this, -1, _("&Delete"));
|
||||||
|
|
||||||
new_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &Interface_Hotkeys::OnNewButton, this);
|
new_button->Bind(wxEVT_BUTTON, &Interface_Hotkeys::OnNewButton, this);
|
||||||
edit_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [=](wxCommandEvent&) { edit_item(dvc, dvc->GetSelection()); });
|
edit_button->Bind(wxEVT_BUTTON, [=](wxCommandEvent&) { edit_item(dvc, dvc->GetSelection()); });
|
||||||
delete_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [=](wxCommandEvent&) { model->Delete(dvc->GetSelection()); });
|
delete_button->Bind(wxEVT_BUTTON, [=](wxCommandEvent&) { model->Delete(dvc->GetSelection()); });
|
||||||
|
|
||||||
quick_search->Bind(wxEVT_COMMAND_TEXT_UPDATED, &Interface_Hotkeys::OnUpdateFilter, this);
|
quick_search->Bind(wxEVT_TEXT, &Interface_Hotkeys::OnUpdateFilter, this);
|
||||||
quick_search->Bind(wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN, [=](wxCommandEvent&) { quick_search->SetValue(""); });
|
quick_search->Bind(wxEVT_SEARCHCTRL_CANCEL_BTN, [=](wxCommandEvent&) { quick_search->SetValue(""); });
|
||||||
|
|
||||||
dvc = new wxDataViewCtrl(this, -1);
|
dvc = new wxDataViewCtrl(this, -1);
|
||||||
dvc->AssociateModel(model.get());
|
dvc->AssociateModel(model.get());
|
||||||
|
@ -666,7 +666,7 @@ Preferences::Preferences(wxWindow *parent): wxDialog(parent, -1, _("Preferences"
|
||||||
book->Fit();
|
book->Fit();
|
||||||
|
|
||||||
book->ChangeSelection(OPT_GET("Tool/Preferences/Page")->GetInt());
|
book->ChangeSelection(OPT_GET("Tool/Preferences/Page")->GetInt());
|
||||||
book->Bind(wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED, &PageChanged);
|
book->Bind(wxEVT_TREEBOOK_PAGE_CHANGED, &PageChanged);
|
||||||
|
|
||||||
// Bottom Buttons
|
// Bottom Buttons
|
||||||
wxStdDialogButtonSizer *stdButtonSizer = CreateStdDialogButtonSizer(wxOK | wxCANCEL | wxAPPLY | wxHELP);
|
wxStdDialogButtonSizer *stdButtonSizer = CreateStdDialogButtonSizer(wxOK | wxCANCEL | wxAPPLY | wxHELP);
|
||||||
|
@ -687,10 +687,10 @@ Preferences::Preferences(wxWindow *parent): wxDialog(parent, -1, _("Preferences"
|
||||||
|
|
||||||
applyButton->Enable(false);
|
applyButton->Enable(false);
|
||||||
|
|
||||||
Bind(wxEVT_COMMAND_BUTTON_CLICKED, &Preferences::OnOK, this, wxID_OK);
|
Bind(wxEVT_BUTTON, &Preferences::OnOK, this, wxID_OK);
|
||||||
Bind(wxEVT_COMMAND_BUTTON_CLICKED, &Preferences::OnApply, this, wxID_APPLY);
|
Bind(wxEVT_BUTTON, &Preferences::OnApply, this, wxID_APPLY);
|
||||||
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&HelpButton::OpenPage, "Options"), wxID_HELP);
|
Bind(wxEVT_BUTTON, std::bind(&HelpButton::OpenPage, "Options"), wxID_HELP);
|
||||||
defaultButton->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &Preferences::OnResetDefault, this);
|
defaultButton->Bind(wxEVT_BUTTON, &Preferences::OnResetDefault, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Preferences::~Preferences() {
|
Preferences::~Preferences() {
|
||||||
|
|
|
@ -78,8 +78,8 @@ static void font_button(Preferences *parent, wxTextCtrl *name, wxSpinCtrl *size)
|
||||||
if (font.IsOk()) {
|
if (font.IsOk()) {
|
||||||
name->SetValue(font.GetFaceName());
|
name->SetValue(font.GetFaceName());
|
||||||
size->SetValue(font.GetPointSize());
|
size->SetValue(font.GetPointSize());
|
||||||
// wxGTK doesn't generate wxEVT_COMMAND_SPINCTRL_UPDATED from SetValue
|
// wxGTK doesn't generate wxEVT_SPINCTRL from SetValue
|
||||||
wxSpinEvent evt(wxEVT_COMMAND_SPINCTRL_UPDATED);
|
wxSpinEvent evt(wxEVT_SPINCTRL);
|
||||||
evt.SetInt(font.GetPointSize());
|
evt.SetInt(font.GetPointSize());
|
||||||
size->ProcessWindowEvent(evt);
|
size->ProcessWindowEvent(evt);
|
||||||
}
|
}
|
||||||
|
@ -121,27 +121,27 @@ wxControl *OptionPage::OptionAdd(wxFlexGridSizer *flex, const wxString &name, co
|
||||||
wxCheckBox *cb = new wxCheckBox(this, -1, name);
|
wxCheckBox *cb = new wxCheckBox(this, -1, name);
|
||||||
flex->Add(cb, 1, wxEXPAND, 0);
|
flex->Add(cb, 1, wxEXPAND, 0);
|
||||||
cb->SetValue(opt->GetBool());
|
cb->SetValue(opt->GetBool());
|
||||||
cb->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, BoolUpdater(opt_name, parent));
|
cb->Bind(wxEVT_CHECKBOX, BoolUpdater(opt_name, parent));
|
||||||
return cb;
|
return cb;
|
||||||
}
|
}
|
||||||
|
|
||||||
case agi::OptionValue::Type_Int: {
|
case agi::OptionValue::Type_Int: {
|
||||||
wxSpinCtrl *sc = new wxSpinCtrl(this, -1, std::to_wstring((int)opt->GetInt()), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, min, max, opt->GetInt());
|
wxSpinCtrl *sc = new wxSpinCtrl(this, -1, std::to_wstring((int)opt->GetInt()), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, min, max, opt->GetInt());
|
||||||
sc->Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, IntUpdater(opt_name, parent));
|
sc->Bind(wxEVT_SPINCTRL, IntUpdater(opt_name, parent));
|
||||||
Add(flex, name, sc);
|
Add(flex, name, sc);
|
||||||
return sc;
|
return sc;
|
||||||
}
|
}
|
||||||
|
|
||||||
case agi::OptionValue::Type_Double: {
|
case agi::OptionValue::Type_Double: {
|
||||||
wxSpinCtrlDouble *scd = new wxSpinCtrlDouble(this, -1, wxString::Format("%g", opt->GetDouble()), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, min, max, opt->GetDouble(), inc);
|
wxSpinCtrlDouble *scd = new wxSpinCtrlDouble(this, -1, wxString::Format("%g", opt->GetDouble()), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, min, max, opt->GetDouble(), inc);
|
||||||
scd->Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, DoubleUpdater(opt_name, parent));
|
scd->Bind(wxEVT_SPINCTRL, DoubleUpdater(opt_name, parent));
|
||||||
Add(flex, name, scd);
|
Add(flex, name, scd);
|
||||||
return scd;
|
return scd;
|
||||||
}
|
}
|
||||||
|
|
||||||
case agi::OptionValue::Type_String: {
|
case agi::OptionValue::Type_String: {
|
||||||
wxTextCtrl *text = new wxTextCtrl(this, -1 , to_wx(opt->GetString()));
|
wxTextCtrl *text = new wxTextCtrl(this, -1 , to_wx(opt->GetString()));
|
||||||
text->Bind(wxEVT_COMMAND_TEXT_UPDATED, StringUpdater(opt_name, parent));
|
text->Bind(wxEVT_TEXT, StringUpdater(opt_name, parent));
|
||||||
Add(flex, name, text);
|
Add(flex, name, text);
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
@ -169,7 +169,7 @@ void OptionPage::OptionChoice(wxFlexGridSizer *flex, const wxString &name, const
|
||||||
case agi::OptionValue::Type_Int: {
|
case agi::OptionValue::Type_Int: {
|
||||||
int val = opt->GetInt();
|
int val = opt->GetInt();
|
||||||
cb->Select(val < (int)choices.size() ? val : 0);
|
cb->Select(val < (int)choices.size() ? val : 0);
|
||||||
cb->Bind(wxEVT_COMMAND_COMBOBOX_SELECTED, IntCBUpdater(opt_name, parent));
|
cb->Bind(wxEVT_COMBOBOX, IntCBUpdater(opt_name, parent));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case agi::OptionValue::Type_String: {
|
case agi::OptionValue::Type_String: {
|
||||||
|
@ -178,7 +178,7 @@ void OptionPage::OptionChoice(wxFlexGridSizer *flex, const wxString &name, const
|
||||||
cb->SetStringSelection(val);
|
cb->SetStringSelection(val);
|
||||||
else if (!choices.empty())
|
else if (!choices.empty())
|
||||||
cb->SetSelection(0);
|
cb->SetSelection(0);
|
||||||
cb->Bind(wxEVT_COMMAND_COMBOBOX_SELECTED, StringUpdater(opt_name, parent));
|
cb->Bind(wxEVT_COMBOBOX, StringUpdater(opt_name, parent));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,10 +206,10 @@ void OptionPage::OptionBrowse(wxFlexGridSizer *flex, const wxString &name, const
|
||||||
|
|
||||||
wxTextCtrl *text = new wxTextCtrl(this, -1 , to_wx(opt->GetString()));
|
wxTextCtrl *text = new wxTextCtrl(this, -1 , to_wx(opt->GetString()));
|
||||||
text->SetMinSize(wxSize(160, -1));
|
text->SetMinSize(wxSize(160, -1));
|
||||||
text->Bind(wxEVT_COMMAND_TEXT_UPDATED, StringUpdater(opt_name, parent));
|
text->Bind(wxEVT_TEXT, StringUpdater(opt_name, parent));
|
||||||
|
|
||||||
wxButton *browse = new wxButton(this, -1, _("Browse..."));
|
wxButton *browse = new wxButton(this, -1, _("Browse..."));
|
||||||
browse->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(browse_button, text));
|
browse->Bind(wxEVT_BUTTON, std::bind(browse_button, text));
|
||||||
|
|
||||||
wxSizer *button_sizer = new wxBoxSizer(wxHORIZONTAL);
|
wxSizer *button_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
button_sizer->Add(text, wxSizerFlags(1).Expand());
|
button_sizer->Add(text, wxSizerFlags(1).Expand());
|
||||||
|
@ -238,13 +238,13 @@ void OptionPage::OptionFont(wxSizer *sizer, std::string opt_prefix) {
|
||||||
|
|
||||||
wxTextCtrl *font_name = new wxTextCtrl(this, -1, to_wx(face_opt->GetString()));
|
wxTextCtrl *font_name = new wxTextCtrl(this, -1, to_wx(face_opt->GetString()));
|
||||||
font_name->SetMinSize(wxSize(160, -1));
|
font_name->SetMinSize(wxSize(160, -1));
|
||||||
font_name->Bind(wxEVT_COMMAND_TEXT_UPDATED, StringUpdater(face_opt->GetName().c_str(), parent));
|
font_name->Bind(wxEVT_TEXT, StringUpdater(face_opt->GetName().c_str(), parent));
|
||||||
|
|
||||||
wxSpinCtrl *font_size = new wxSpinCtrl(this, -1, std::to_wstring((int)size_opt->GetInt()), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 3, 42, size_opt->GetInt());
|
wxSpinCtrl *font_size = new wxSpinCtrl(this, -1, std::to_wstring((int)size_opt->GetInt()), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 3, 42, size_opt->GetInt());
|
||||||
font_size->Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, IntUpdater(size_opt->GetName().c_str(), parent));
|
font_size->Bind(wxEVT_SPINCTRL, IntUpdater(size_opt->GetName().c_str(), parent));
|
||||||
|
|
||||||
wxButton *pick_btn = new wxButton(this, -1, _("Choose..."));
|
wxButton *pick_btn = new wxButton(this, -1, _("Choose..."));
|
||||||
pick_btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(font_button, parent, font_name, font_size));
|
pick_btn->Bind(wxEVT_BUTTON, std::bind(font_button, parent, font_name, font_size));
|
||||||
|
|
||||||
wxSizer *button_sizer = new wxBoxSizer(wxHORIZONTAL);
|
wxSizer *button_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
button_sizer->Add(font_name, wxSizerFlags(1).Expand());
|
button_sizer->Add(font_name, wxSizerFlags(1).Expand());
|
||||||
|
@ -270,7 +270,7 @@ void OptionPage::EnableIfChecked(wxControl *cbx, wxControl *ctrl) {
|
||||||
if (!cb) return;
|
if (!cb) return;
|
||||||
|
|
||||||
ctrl->Enable(cb->IsChecked());
|
ctrl->Enable(cb->IsChecked());
|
||||||
cb->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, disabler(ctrl, true));
|
cb->Bind(wxEVT_CHECKBOX, disabler(ctrl, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
void OptionPage::DisableIfChecked(wxControl *cbx, wxControl *ctrl) {
|
void OptionPage::DisableIfChecked(wxControl *cbx, wxControl *ctrl) {
|
||||||
|
@ -278,5 +278,5 @@ void OptionPage::DisableIfChecked(wxControl *cbx, wxControl *ctrl) {
|
||||||
if (!cb) return;
|
if (!cb) return;
|
||||||
|
|
||||||
ctrl->Enable(!cb->IsChecked());
|
ctrl->Enable(!cb->IsChecked());
|
||||||
cb->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, disabler(ctrl, false));
|
cb->Bind(wxEVT_CHECKBOX, disabler(ctrl, false));
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,13 +112,13 @@ SubsEditBox::SubsEditBox(wxWindow *parent, agi::Context *context)
|
||||||
style_box = MakeComboBox("Default", wxCB_READONLY, &SubsEditBox::OnStyleChange, _("Style for this line"));
|
style_box = MakeComboBox("Default", wxCB_READONLY, &SubsEditBox::OnStyleChange, _("Style for this line"));
|
||||||
|
|
||||||
actor_box = new Placeholder<wxComboBox>(this, _("Actor"), wxSize(110, -1), wxCB_DROPDOWN | wxTE_PROCESS_ENTER, _("Actor name for this speech. This is only for reference, and is mainly useless."));
|
actor_box = new Placeholder<wxComboBox>(this, _("Actor"), wxSize(110, -1), wxCB_DROPDOWN | wxTE_PROCESS_ENTER, _("Actor name for this speech. This is only for reference, and is mainly useless."));
|
||||||
Bind(wxEVT_COMMAND_TEXT_UPDATED, &SubsEditBox::OnActorChange, this, actor_box->GetId());
|
Bind(wxEVT_TEXT, &SubsEditBox::OnActorChange, this, actor_box->GetId());
|
||||||
Bind(wxEVT_COMMAND_COMBOBOX_SELECTED, &SubsEditBox::OnActorChange, this, actor_box->GetId());
|
Bind(wxEVT_COMBOBOX, &SubsEditBox::OnActorChange, this, actor_box->GetId());
|
||||||
top_sizer->Add(actor_box, wxSizerFlags(2).Center().Border(wxRIGHT));
|
top_sizer->Add(actor_box, wxSizerFlags(2).Center().Border(wxRIGHT));
|
||||||
|
|
||||||
effect_box = new Placeholder<wxComboBox>(this, _("Effect"), wxSize(80,-1), wxCB_DROPDOWN | wxTE_PROCESS_ENTER, _("Effect for this line. This can be used to store extra information for karaoke scripts, or for the effects supported by the renderer."));
|
effect_box = new Placeholder<wxComboBox>(this, _("Effect"), wxSize(80,-1), wxCB_DROPDOWN | wxTE_PROCESS_ENTER, _("Effect for this line. This can be used to store extra information for karaoke scripts, or for the effects supported by the renderer."));
|
||||||
Bind(wxEVT_COMMAND_TEXT_UPDATED, &SubsEditBox::OnEffectChange, this, effect_box->GetId());
|
Bind(wxEVT_TEXT, &SubsEditBox::OnEffectChange, this, effect_box->GetId());
|
||||||
Bind(wxEVT_COMMAND_COMBOBOX_SELECTED, &SubsEditBox::OnEffectChange, this, effect_box->GetId());
|
Bind(wxEVT_COMBOBOX, &SubsEditBox::OnEffectChange, this, effect_box->GetId());
|
||||||
top_sizer->Add(effect_box, 3, wxALIGN_CENTER, 5);
|
top_sizer->Add(effect_box, 3, wxALIGN_CENTER, 5);
|
||||||
|
|
||||||
char_count = new wxTextCtrl(this, -1, "0", wxDefaultPosition, wxSize(30, -1), wxTE_READONLY | wxTE_CENTER);
|
char_count = new wxTextCtrl(this, -1, "0", wxDefaultPosition, wxSize(30, -1), wxTE_READONLY | wxTE_CENTER);
|
||||||
|
@ -166,7 +166,7 @@ SubsEditBox::SubsEditBox(wxWindow *parent, agi::Context *context)
|
||||||
|
|
||||||
split_box = new wxCheckBox(this,-1,_("Show Original"));
|
split_box = new wxCheckBox(this,-1,_("Show Original"));
|
||||||
split_box->SetToolTip(_("Show the contents of the subtitle line when it was first selected above the edit box. This is sometimes useful when editing subtitles or translating subtitles into another language."));
|
split_box->SetToolTip(_("Show the contents of the subtitle line when it was first selected above the edit box. This is sometimes useful when editing subtitles or translating subtitles into another language."));
|
||||||
split_box->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &SubsEditBox::OnSplit, this);
|
split_box->Bind(wxEVT_CHECKBOX, &SubsEditBox::OnSplit, this);
|
||||||
middle_right_sizer->Add(split_box, wxSizerFlags().Center().Left());
|
middle_right_sizer->Add(split_box, wxSizerFlags().Center().Left());
|
||||||
|
|
||||||
// Main sizer
|
// Main sizer
|
||||||
|
@ -198,9 +198,9 @@ SubsEditBox::SubsEditBox(wxWindow *parent, agi::Context *context)
|
||||||
edit_ctrl->Bind(wxEVT_STC_MODIFIED, &SubsEditBox::OnChange, this);
|
edit_ctrl->Bind(wxEVT_STC_MODIFIED, &SubsEditBox::OnChange, this);
|
||||||
edit_ctrl->SetModEventMask(wxSTC_MOD_INSERTTEXT | wxSTC_MOD_DELETETEXT | wxSTC_STARTACTION);
|
edit_ctrl->SetModEventMask(wxSTC_MOD_INSERTTEXT | wxSTC_MOD_DELETETEXT | wxSTC_STARTACTION);
|
||||||
|
|
||||||
Bind(wxEVT_COMMAND_TEXT_UPDATED, &SubsEditBox::OnLayerEnter, this, layer->GetId());
|
Bind(wxEVT_TEXT, &SubsEditBox::OnLayerEnter, this, layer->GetId());
|
||||||
Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, &SubsEditBox::OnLayerEnter, this, layer->GetId());
|
Bind(wxEVT_SPINCTRL, &SubsEditBox::OnLayerEnter, this, layer->GetId());
|
||||||
Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &SubsEditBox::OnCommentChange, this, comment_box->GetId());
|
Bind(wxEVT_CHECKBOX, &SubsEditBox::OnCommentChange, this, comment_box->GetId());
|
||||||
|
|
||||||
Bind(wxEVT_CHAR_HOOK, &SubsEditBox::OnKeyDown, this);
|
Bind(wxEVT_CHAR_HOOK, &SubsEditBox::OnKeyDown, this);
|
||||||
Bind(wxEVT_SIZE, &SubsEditBox::OnSize, this);
|
Bind(wxEVT_SIZE, &SubsEditBox::OnSize, this);
|
||||||
|
@ -229,7 +229,7 @@ wxTextCtrl *SubsEditBox::MakeMarginCtrl(wxString const& tooltip, int margin, wxS
|
||||||
ctrl->SetToolTip(tooltip);
|
ctrl->SetToolTip(tooltip);
|
||||||
middle_left_sizer->Add(ctrl, wxSizerFlags().Center());
|
middle_left_sizer->Add(ctrl, wxSizerFlags().Center());
|
||||||
|
|
||||||
Bind(wxEVT_COMMAND_TEXT_UPDATED, [=](wxCommandEvent&) {
|
Bind(wxEVT_TEXT, [=](wxCommandEvent&) {
|
||||||
int value = mid(0, atoi(ctrl->GetValue().utf8_str()), 9999);
|
int value = mid(0, atoi(ctrl->GetValue().utf8_str()), 9999);
|
||||||
SetSelectedRows([&](AssDialogue *d) { d->Margin[margin] = value; },
|
SetSelectedRows([&](AssDialogue *d) { d->Margin[margin] = value; },
|
||||||
commit_msg, AssFile::COMMIT_DIAG_META);
|
commit_msg, AssFile::COMMIT_DIAG_META);
|
||||||
|
@ -241,7 +241,7 @@ wxTextCtrl *SubsEditBox::MakeMarginCtrl(wxString const& tooltip, int margin, wxS
|
||||||
TimeEdit *SubsEditBox::MakeTimeCtrl(wxString const& tooltip, TimeField field) {
|
TimeEdit *SubsEditBox::MakeTimeCtrl(wxString const& tooltip, TimeField field) {
|
||||||
TimeEdit *ctrl = new TimeEdit(this, -1, c, "", wxSize(GetTextExtent(wxS(" 0:00:00.000 ")).GetWidth(),-1), field == TIME_END);
|
TimeEdit *ctrl = new TimeEdit(this, -1, c, "", wxSize(GetTextExtent(wxS(" 0:00:00.000 ")).GetWidth(),-1), field == TIME_END);
|
||||||
ctrl->SetToolTip(tooltip);
|
ctrl->SetToolTip(tooltip);
|
||||||
Bind(wxEVT_COMMAND_TEXT_UPDATED, [=](wxCommandEvent&) { CommitTimes(field); }, ctrl->GetId());
|
Bind(wxEVT_TEXT, [=](wxCommandEvent&) { CommitTimes(field); }, ctrl->GetId());
|
||||||
ctrl->Bind(wxEVT_CHAR_HOOK, time_edit_char_hook);
|
ctrl->Bind(wxEVT_CHAR_HOOK, time_edit_char_hook);
|
||||||
middle_left_sizer->Add(ctrl, wxSizerFlags().Center());
|
middle_left_sizer->Add(ctrl, wxSizerFlags().Center());
|
||||||
return ctrl;
|
return ctrl;
|
||||||
|
@ -253,7 +253,7 @@ void SubsEditBox::MakeButton(const char *cmd_name) {
|
||||||
ToolTipManager::Bind(btn, command->StrHelp(), "Subtitle Edit Box", cmd_name);
|
ToolTipManager::Bind(btn, command->StrHelp(), "Subtitle Edit Box", cmd_name);
|
||||||
|
|
||||||
middle_right_sizer->Add(btn, wxSizerFlags().Center().Expand());
|
middle_right_sizer->Add(btn, wxSizerFlags().Center().Expand());
|
||||||
btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&SubsEditBox::CallCommand, this, cmd_name));
|
btn->Bind(wxEVT_BUTTON, std::bind(&SubsEditBox::CallCommand, this, cmd_name));
|
||||||
}
|
}
|
||||||
|
|
||||||
wxButton *SubsEditBox::MakeBottomButton(const char *cmd_name) {
|
wxButton *SubsEditBox::MakeBottomButton(const char *cmd_name) {
|
||||||
|
@ -261,7 +261,7 @@ wxButton *SubsEditBox::MakeBottomButton(const char *cmd_name) {
|
||||||
wxButton *btn = new wxButton(this, -1, command->StrDisplay(c));
|
wxButton *btn = new wxButton(this, -1, command->StrDisplay(c));
|
||||||
ToolTipManager::Bind(btn, command->StrHelp(), "Subtitle Edit Box", cmd_name);
|
ToolTipManager::Bind(btn, command->StrHelp(), "Subtitle Edit Box", cmd_name);
|
||||||
|
|
||||||
btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&SubsEditBox::CallCommand, this, cmd_name));
|
btn->Bind(wxEVT_BUTTON, std::bind(&SubsEditBox::CallCommand, this, cmd_name));
|
||||||
return btn;
|
return btn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -270,14 +270,14 @@ wxComboBox *SubsEditBox::MakeComboBox(wxString const& initial_text, int style, v
|
||||||
wxComboBox *ctrl = new wxComboBox(this, -1, initial_text, wxDefaultPosition, wxSize(110,-1), 1, styles, style | wxTE_PROCESS_ENTER);
|
wxComboBox *ctrl = new wxComboBox(this, -1, initial_text, wxDefaultPosition, wxSize(110,-1), 1, styles, style | wxTE_PROCESS_ENTER);
|
||||||
ctrl->SetToolTip(tooltip);
|
ctrl->SetToolTip(tooltip);
|
||||||
top_sizer->Add(ctrl, wxSizerFlags(2).Center().Border(wxRIGHT));
|
top_sizer->Add(ctrl, wxSizerFlags(2).Center().Border(wxRIGHT));
|
||||||
Bind(wxEVT_COMMAND_COMBOBOX_SELECTED, handler, this, ctrl->GetId());
|
Bind(wxEVT_COMBOBOX, handler, this, ctrl->GetId());
|
||||||
return ctrl;
|
return ctrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxRadioButton *SubsEditBox::MakeRadio(wxString const& text, bool start, wxString const& tooltip) {
|
wxRadioButton *SubsEditBox::MakeRadio(wxString const& text, bool start, wxString const& tooltip) {
|
||||||
wxRadioButton *ctrl = new wxRadioButton(this, -1, text, wxDefaultPosition, wxDefaultSize, start ? wxRB_GROUP : 0);
|
wxRadioButton *ctrl = new wxRadioButton(this, -1, text, wxDefaultPosition, wxDefaultSize, start ? wxRB_GROUP : 0);
|
||||||
ctrl->SetToolTip(tooltip);
|
ctrl->SetToolTip(tooltip);
|
||||||
Bind(wxEVT_COMMAND_RADIOBUTTON_SELECTED, &SubsEditBox::OnFrameTimeRadio, this, ctrl->GetId());
|
Bind(wxEVT_RADIOBUTTON, &SubsEditBox::OnFrameTimeRadio, this, ctrl->GetId());
|
||||||
middle_right_sizer->Add(ctrl, wxSizerFlags().Center().Expand().Border(wxRIGHT));
|
middle_right_sizer->Add(ctrl, wxSizerFlags().Center().Expand().Border(wxRIGHT));
|
||||||
return ctrl;
|
return ctrl;
|
||||||
}
|
}
|
||||||
|
@ -548,7 +548,7 @@ void SubsEditBox::OnStyleChange(wxCommandEvent &) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void SubsEditBox::OnActorChange(wxCommandEvent &evt) {
|
void SubsEditBox::OnActorChange(wxCommandEvent &evt) {
|
||||||
bool amend = evt.GetEventType() == wxEVT_COMMAND_TEXT_UPDATED;
|
bool amend = evt.GetEventType() == wxEVT_TEXT;
|
||||||
SetSelectedRows(&AssDialogue::Actor, actor_box->GetValue(), _("actor change"), AssFile::COMMIT_DIAG_META, amend);
|
SetSelectedRows(&AssDialogue::Actor, actor_box->GetValue(), _("actor change"), AssFile::COMMIT_DIAG_META, amend);
|
||||||
PopulateList(actor_box, &AssDialogue::Actor);
|
PopulateList(actor_box, &AssDialogue::Actor);
|
||||||
}
|
}
|
||||||
|
@ -558,7 +558,7 @@ void SubsEditBox::OnLayerEnter(wxCommandEvent &) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void SubsEditBox::OnEffectChange(wxCommandEvent &evt) {
|
void SubsEditBox::OnEffectChange(wxCommandEvent &evt) {
|
||||||
bool amend = evt.GetEventType() == wxEVT_COMMAND_TEXT_UPDATED;
|
bool amend = evt.GetEventType() == wxEVT_TEXT;
|
||||||
SetSelectedRows(&AssDialogue::Effect, effect_box->GetValue(), _("effect change"), AssFile::COMMIT_DIAG_META, amend);
|
SetSelectedRows(&AssDialogue::Effect, effect_box->GetValue(), _("effect change"), AssFile::COMMIT_DIAG_META, amend);
|
||||||
PopulateList(effect_box, &AssDialogue::Effect);
|
PopulateList(effect_box, &AssDialogue::Effect);
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,15 +110,15 @@ SubsTextEditCtrl::SubsTextEditCtrl(wxWindow* parent, wxSize wsize, long style, a
|
||||||
|
|
||||||
Bind(wxEVT_CHAR_HOOK, &SubsTextEditCtrl::OnKeyDown, this);
|
Bind(wxEVT_CHAR_HOOK, &SubsTextEditCtrl::OnKeyDown, this);
|
||||||
|
|
||||||
Bind(wxEVT_COMMAND_MENU_SELECTED, bind(&SubsTextEditCtrl::Cut, this), EDIT_MENU_CUT);
|
Bind(wxEVT_MENU, bind(&SubsTextEditCtrl::Cut, this), EDIT_MENU_CUT);
|
||||||
Bind(wxEVT_COMMAND_MENU_SELECTED, bind(&SubsTextEditCtrl::Copy, this), EDIT_MENU_COPY);
|
Bind(wxEVT_MENU, bind(&SubsTextEditCtrl::Copy, this), EDIT_MENU_COPY);
|
||||||
Bind(wxEVT_COMMAND_MENU_SELECTED, bind(&SubsTextEditCtrl::Paste, this), EDIT_MENU_PASTE);
|
Bind(wxEVT_MENU, bind(&SubsTextEditCtrl::Paste, this), EDIT_MENU_PASTE);
|
||||||
Bind(wxEVT_COMMAND_MENU_SELECTED, bind(&SubsTextEditCtrl::SelectAll, this), EDIT_MENU_SELECT_ALL);
|
Bind(wxEVT_MENU, bind(&SubsTextEditCtrl::SelectAll, this), EDIT_MENU_SELECT_ALL);
|
||||||
|
|
||||||
if (context) {
|
if (context) {
|
||||||
Bind(wxEVT_COMMAND_MENU_SELECTED, bind(&cmd::call, "edit/line/split/preserve", context), EDIT_MENU_SPLIT_PRESERVE);
|
Bind(wxEVT_MENU, bind(&cmd::call, "edit/line/split/preserve", context), EDIT_MENU_SPLIT_PRESERVE);
|
||||||
Bind(wxEVT_COMMAND_MENU_SELECTED, bind(&cmd::call, "edit/line/split/estimate", context), EDIT_MENU_SPLIT_ESTIMATE);
|
Bind(wxEVT_MENU, bind(&cmd::call, "edit/line/split/estimate", context), EDIT_MENU_SPLIT_ESTIMATE);
|
||||||
Bind(wxEVT_COMMAND_MENU_SELECTED, bind(&cmd::call, "edit/line/split/video", context), EDIT_MENU_SPLIT_VIDEO);
|
Bind(wxEVT_MENU, bind(&cmd::call, "edit/line/split/video", context), EDIT_MENU_SPLIT_VIDEO);
|
||||||
}
|
}
|
||||||
|
|
||||||
Bind(wxEVT_CONTEXT_MENU, &SubsTextEditCtrl::OnContextMenu, this);
|
Bind(wxEVT_CONTEXT_MENU, &SubsTextEditCtrl::OnContextMenu, this);
|
||||||
|
@ -150,13 +150,13 @@ SubsTextEditCtrl::SubsTextEditCtrl(wxWindow* parent, wxSize wsize, long style, a
|
||||||
OPT_SUB("Subtitle/Highlight/Syntax", &SubsTextEditCtrl::UpdateStyle, this);
|
OPT_SUB("Subtitle/Highlight/Syntax", &SubsTextEditCtrl::UpdateStyle, this);
|
||||||
OPT_SUB("App/Call Tips", &SubsTextEditCtrl::UpdateCallTip, this);
|
OPT_SUB("App/Call Tips", &SubsTextEditCtrl::UpdateCallTip, this);
|
||||||
|
|
||||||
Bind(wxEVT_COMMAND_MENU_SELECTED, [=](wxCommandEvent&) {
|
Bind(wxEVT_MENU, [=](wxCommandEvent&) {
|
||||||
if (spellchecker) spellchecker->AddWord(currentWord);
|
if (spellchecker) spellchecker->AddWord(currentWord);
|
||||||
UpdateStyle();
|
UpdateStyle();
|
||||||
SetFocus();
|
SetFocus();
|
||||||
}, EDIT_MENU_ADD_TO_DICT);
|
}, EDIT_MENU_ADD_TO_DICT);
|
||||||
|
|
||||||
Bind(wxEVT_COMMAND_MENU_SELECTED, [=](wxCommandEvent&) {
|
Bind(wxEVT_MENU, [=](wxCommandEvent&) {
|
||||||
if (spellchecker) spellchecker->RemoveWord(currentWord);
|
if (spellchecker) spellchecker->RemoveWord(currentWord);
|
||||||
UpdateStyle();
|
UpdateStyle();
|
||||||
SetFocus();
|
SetFocus();
|
||||||
|
|
|
@ -73,9 +73,9 @@ TimeEdit::TimeEdit(wxWindow* parent, wxWindowID id, agi::Context *c, const std::
|
||||||
// Other stuff
|
// Other stuff
|
||||||
if (value.empty()) SetValue(to_wx(time.GetAssFormated()));
|
if (value.empty()) SetValue(to_wx(time.GetAssFormated()));
|
||||||
|
|
||||||
Bind(wxEVT_COMMAND_MENU_SELECTED, std::bind(&TimeEdit::CopyTime, this), Time_Edit_Copy);
|
Bind(wxEVT_MENU, std::bind(&TimeEdit::CopyTime, this), Time_Edit_Copy);
|
||||||
Bind(wxEVT_COMMAND_MENU_SELECTED, std::bind(&TimeEdit::PasteTime, this), Time_Edit_Paste);
|
Bind(wxEVT_MENU, std::bind(&TimeEdit::PasteTime, this), Time_Edit_Paste);
|
||||||
Bind(wxEVT_COMMAND_TEXT_UPDATED, &TimeEdit::OnModified, this);
|
Bind(wxEVT_TEXT, &TimeEdit::OnModified, this);
|
||||||
Bind(wxEVT_CONTEXT_MENU, &TimeEdit::OnContextMenu, this);
|
Bind(wxEVT_CONTEXT_MENU, &TimeEdit::OnContextMenu, this);
|
||||||
Bind(wxEVT_CHAR_HOOK, &TimeEdit::OnKeyDown, this);
|
Bind(wxEVT_CHAR_HOOK, &TimeEdit::OnKeyDown, this);
|
||||||
Bind(wxEVT_CHAR, &TimeEdit::OnChar, this);
|
Bind(wxEVT_CHAR, &TimeEdit::OnChar, this);
|
||||||
|
@ -238,7 +238,7 @@ void TimeEdit::PasteTime() {
|
||||||
SetTime(tempTime);
|
SetTime(tempTime);
|
||||||
SetSelection(0, GetValue().size());
|
SetSelection(0, GetValue().size());
|
||||||
|
|
||||||
wxCommandEvent evt(wxEVT_COMMAND_TEXT_UPDATED, GetId());
|
wxCommandEvent evt(wxEVT_TEXT, GetId());
|
||||||
evt.SetEventObject(this);
|
evt.SetEventObject(this);
|
||||||
HandleWindowEvent(evt);
|
HandleWindowEvent(evt);
|
||||||
}
|
}
|
||||||
|
|
|
@ -174,7 +174,7 @@ namespace {
|
||||||
, hotkeys_changed_slot(hotkey::inst->AddHotkeyChangeListener(&Toolbar::RegenerateToolbar, this))
|
, hotkeys_changed_slot(hotkey::inst->AddHotkeyChangeListener(&Toolbar::RegenerateToolbar, this))
|
||||||
{
|
{
|
||||||
Populate();
|
Populate();
|
||||||
Bind(wxEVT_COMMAND_TOOL_CLICKED, &Toolbar::OnClick, this);
|
Bind(wxEVT_TOOL, &Toolbar::OnClick, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Toolbar(wxFrame *parent, std::string name, agi::Context *c, std::string ht_context)
|
Toolbar(wxFrame *parent, std::string name, agi::Context *c, std::string ht_context)
|
||||||
|
@ -192,7 +192,7 @@ namespace {
|
||||||
{
|
{
|
||||||
parent->SetToolBar(this);
|
parent->SetToolBar(this);
|
||||||
Populate();
|
Populate();
|
||||||
Bind(wxEVT_COMMAND_TOOL_CLICKED, &Toolbar::OnClick, this);
|
Bind(wxEVT_TOOL, &Toolbar::OnClick, this);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,8 +101,8 @@ VideoDisplay::VideoDisplay(
|
||||||
, freeSize(freeSize)
|
, freeSize(freeSize)
|
||||||
{
|
{
|
||||||
zoomBox->SetValue(wxString::Format("%g%%", zoomValue * 100.));
|
zoomBox->SetValue(wxString::Format("%g%%", zoomValue * 100.));
|
||||||
zoomBox->Bind(wxEVT_COMMAND_COMBOBOX_SELECTED, &VideoDisplay::SetZoomFromBox, this);
|
zoomBox->Bind(wxEVT_COMBOBOX, &VideoDisplay::SetZoomFromBox, this);
|
||||||
zoomBox->Bind(wxEVT_COMMAND_TEXT_ENTER, &VideoDisplay::SetZoomFromBoxText, this);
|
zoomBox->Bind(wxEVT_TEXT_ENTER, &VideoDisplay::SetZoomFromBoxText, this);
|
||||||
|
|
||||||
con->videoController->Bind(EVT_FRAME_READY, &VideoDisplay::UploadFrameData, this);
|
con->videoController->Bind(EVT_FRAME_READY, &VideoDisplay::UploadFrameData, this);
|
||||||
slots.push_back(con->videoController->AddVideoOpenListener(&VideoDisplay::UpdateSize, this));
|
slots.push_back(con->videoController->AddVideoOpenListener(&VideoDisplay::UpdateSize, this));
|
||||||
|
|
|
@ -59,7 +59,7 @@ void VisualToolDrag::SetToolbar(wxToolBar *tb) {
|
||||||
toolbar->Realize();
|
toolbar->Realize();
|
||||||
toolbar->Show(true);
|
toolbar->Show(true);
|
||||||
|
|
||||||
toolbar->Bind(wxEVT_COMMAND_TOOL_CLICKED, &VisualToolDrag::OnSubTool, this);
|
toolbar->Bind(wxEVT_TOOL, &VisualToolDrag::OnSubTool, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void VisualToolDrag::UpdateToggleButtons() {
|
void VisualToolDrag::UpdateToggleButtons() {
|
||||||
|
|
|
@ -74,7 +74,7 @@ void VisualToolVectorClip::SetToolbar(wxToolBar *toolBar) {
|
||||||
toolBar->ToggleTool(BUTTON_DRAG, true);
|
toolBar->ToggleTool(BUTTON_DRAG, true);
|
||||||
toolBar->Realize();
|
toolBar->Realize();
|
||||||
toolBar->Show(true);
|
toolBar->Show(true);
|
||||||
toolBar->Bind(wxEVT_COMMAND_TOOL_CLICKED, [=](wxCommandEvent& e) { SetMode(e.GetId() - BUTTON_DRAG); });
|
toolBar->Bind(wxEVT_TOOL, [=](wxCommandEvent& e) { SetMode(e.GetId() - BUTTON_DRAG); });
|
||||||
SetMode(features.empty());
|
SetMode(features.empty());
|
||||||
#undef ICON
|
#undef ICON
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue