Use Bind() instead of Connect() in wxWidgets code

Use more modern function which allows to avoid wxXXXEventHandler()
macros use.

No real changes.
This commit is contained in:
Vadim Zeitlin
2018-05-28 22:10:56 +02:00
parent 8c8ff2c24d
commit d4f380e16e
48 changed files with 168 additions and 363 deletions

View File

@@ -91,16 +91,9 @@ bool wxPickerBase::CreateBase(wxWindow *parent,
// set the initial contents of the textctrl
m_text->SetValue(text);
m_text->Connect(m_text->GetId(), wxEVT_TEXT,
wxCommandEventHandler(wxPickerBase::OnTextCtrlUpdate),
NULL, this);
m_text->Connect(m_text->GetId(), wxEVT_KILL_FOCUS,
wxFocusEventHandler(wxPickerBase::OnTextCtrlKillFocus),
NULL, this);
m_text->Connect(m_text->GetId(), wxEVT_DESTROY,
wxWindowDestroyEventHandler(wxPickerBase::OnTextCtrlDelete),
NULL, this);
m_text->Bind(wxEVT_TEXT, &wxPickerBase::OnTextCtrlUpdate, this);
m_text->Bind(wxEVT_KILL_FOCUS, &wxPickerBase::OnTextCtrlKillFocus, this);
m_text->Bind(wxEVT_DESTROY, &wxPickerBase::OnTextCtrlDelete, this);
m_sizer->Add(m_text,
wxSizerFlags(1).CentreVertical().Border(wxRIGHT));