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:
@@ -172,11 +172,7 @@ protected:
|
|||||||
// Default ctor sets things up for handling children events correctly.
|
// Default ctor sets things up for handling children events correctly.
|
||||||
wxCompositeWindow()
|
wxCompositeWindow()
|
||||||
{
|
{
|
||||||
this->Connect
|
this->Bind(wxEVT_CREATE, &wxCompositeWindow::OnWindowCreate, this);
|
||||||
(
|
|
||||||
wxEVT_CREATE,
|
|
||||||
wxWindowCreateEventHandler(wxCompositeWindow::OnWindowCreate)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -191,15 +187,11 @@ private:
|
|||||||
|
|
||||||
wxWindow *child = event.GetWindow();
|
wxWindow *child = event.GetWindow();
|
||||||
if ( child == this )
|
if ( child == this )
|
||||||
return; // not a child, we don't want to Connect() to ourselves
|
return; // not a child, we don't want to bind to ourselves
|
||||||
|
|
||||||
child->Connect(wxEVT_SET_FOCUS,
|
child->Bind(wxEVT_SET_FOCUS, &wxCompositeWindow::OnSetFocus, this);
|
||||||
wxFocusEventHandler(wxCompositeWindow::OnSetFocus),
|
|
||||||
NULL, this);
|
|
||||||
|
|
||||||
child->Connect(wxEVT_KILL_FOCUS,
|
child->Bind(wxEVT_KILL_FOCUS, &wxCompositeWindow::OnKillFocus, this);
|
||||||
wxFocusEventHandler(wxCompositeWindow::OnKillFocus),
|
|
||||||
NULL, this);
|
|
||||||
|
|
||||||
// Some events should be only handled for non-toplevel children. For
|
// Some events should be only handled for non-toplevel children. For
|
||||||
// example, we want to close the control in wxDataViewCtrl when Enter
|
// example, we want to close the control in wxDataViewCtrl when Enter
|
||||||
@@ -213,9 +205,7 @@ private:
|
|||||||
win = win->GetParent();
|
win = win->GetParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
child->Connect(wxEVT_CHAR,
|
child->Bind(wxEVT_CHAR, &wxCompositeWindow::OnChar, this);
|
||||||
wxKeyEventHandler(wxCompositeWindow::OnChar),
|
|
||||||
NULL, this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnChar(wxKeyEvent& event)
|
void OnChar(wxKeyEvent& event)
|
||||||
|
@@ -199,14 +199,13 @@ public:
|
|||||||
m_container.SetContainerWindow(this);
|
m_container.SetContainerWindow(this);
|
||||||
|
|
||||||
#ifndef wxHAS_NATIVE_TAB_TRAVERSAL
|
#ifndef wxHAS_NATIVE_TAB_TRAVERSAL
|
||||||
BaseWindowClass::Connect(wxEVT_NAVIGATION_KEY,
|
BaseWindowClass::Bind(wxEVT_NAVIGATION_KEY,
|
||||||
wxNavigationKeyEventHandler(wxNavigationEnabled::OnNavigationKey));
|
&wxNavigationEnabled::OnNavigationKey, this);
|
||||||
|
|
||||||
BaseWindowClass::Connect(wxEVT_SET_FOCUS,
|
BaseWindowClass::Bind(wxEVT_SET_FOCUS,
|
||||||
wxFocusEventHandler(wxNavigationEnabled::OnFocus));
|
&wxNavigationEnabled::OnFocus, this);
|
||||||
|
BaseWindowClass::Bind(wxEVT_CHILD_FOCUS,
|
||||||
BaseWindowClass::Connect(wxEVT_CHILD_FOCUS,
|
&wxNavigationEnabled::OnChildFocus, this);
|
||||||
wxChildFocusEventHandler(wxNavigationEnabled::OnChildFocus));
|
|
||||||
#endif // !wxHAS_NATIVE_TAB_TRAVERSAL
|
#endif // !wxHAS_NATIVE_TAB_TRAVERSAL
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -712,10 +712,8 @@ public:
|
|||||||
if ( !BaseClass::Create(parent, id, title, pos, size, style, name) )
|
if ( !BaseClass::Create(parent, id, title, pos, size, style, name) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
this->Connect(wxEVT_ACTIVATE,
|
this->Bind(wxEVT_ACTIVATE, &wxDocChildFrameAny::OnActivate, this);
|
||||||
wxActivateEventHandler(wxDocChildFrameAny::OnActivate));
|
this->Bind(wxEVT_CLOSE_WINDOW, &wxDocChildFrameAny::OnCloseWindow, this);
|
||||||
this->Connect(wxEVT_CLOSE_WINDOW,
|
|
||||||
wxCloseEventHandler(wxDocChildFrameAny::OnCloseWindow));
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -867,10 +865,8 @@ public:
|
|||||||
if ( !BaseFrame::Create(frame, id, title, pos, size, style, name) )
|
if ( !BaseFrame::Create(frame, id, title, pos, size, style, name) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
this->Connect(wxID_EXIT, wxEVT_MENU,
|
this->Bind(wxEVT_MENU, &wxDocParentFrameAny::OnExit, this, wxID_EXIT);
|
||||||
wxCommandEventHandler(wxDocParentFrameAny::OnExit));
|
this->Bind(wxEVT_CLOSE_WINDOW, &wxDocParentFrameAny::OnCloseWindow, this);
|
||||||
this->Connect(wxEVT_CLOSE_WINDOW,
|
|
||||||
wxCloseEventHandler(wxDocParentFrameAny::OnCloseWindow));
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -277,9 +277,8 @@ public: // overrides
|
|||||||
|
|
||||||
virtual void DoConnect( wxControl *sender, wxFileDirPickerCtrlBase *eventSink ) wxOVERRIDE
|
virtual void DoConnect( wxControl *sender, wxFileDirPickerCtrlBase *eventSink ) wxOVERRIDE
|
||||||
{
|
{
|
||||||
sender->Connect( wxEVT_FILEPICKER_CHANGED,
|
sender->Bind(wxEVT_FILEPICKER_CHANGED,
|
||||||
wxFileDirPickerEventHandler( wxFileDirPickerCtrlBase::OnFileDirChange ),
|
&wxFileDirPickerCtrlBase::OnFileDirChange, eventSink );
|
||||||
NULL, eventSink );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -377,9 +376,8 @@ public: // overrides
|
|||||||
|
|
||||||
virtual void DoConnect( wxControl *sender, wxFileDirPickerCtrlBase *eventSink ) wxOVERRIDE
|
virtual void DoConnect( wxControl *sender, wxFileDirPickerCtrlBase *eventSink ) wxOVERRIDE
|
||||||
{
|
{
|
||||||
sender->Connect( wxEVT_DIRPICKER_CHANGED,
|
sender->Bind( wxEVT_DIRPICKER_CHANGED,
|
||||||
wxFileDirPickerEventHandler( wxFileDirPickerCtrlBase::OnFileDirChange ),
|
&wxFileDirPickerCtrlBase::OnFileDirChange, eventSink );
|
||||||
NULL, eventSink );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -67,18 +67,18 @@ protected:
|
|||||||
|
|
||||||
if ( m_bitmapBg.IsOk() )
|
if ( m_bitmapBg.IsOk() )
|
||||||
{
|
{
|
||||||
BaseWindowClass::Connect
|
BaseWindowClass::Bind
|
||||||
(
|
(
|
||||||
wxEVT_ERASE_BACKGROUND,
|
wxEVT_ERASE_BACKGROUND,
|
||||||
wxEraseEventHandler(wxCustomBackgroundWindow::OnEraseBackground)
|
&wxCustomBackgroundWindow::OnEraseBackground, this
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BaseWindowClass::Disconnect
|
BaseWindowClass::Unbind
|
||||||
(
|
(
|
||||||
wxEVT_ERASE_BACKGROUND,
|
wxEVT_ERASE_BACKGROUND,
|
||||||
wxEraseEventHandler(wxCustomBackgroundWindow::OnEraseBackground)
|
&wxCustomBackgroundWindow::OnEraseBackground, this
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -859,8 +859,7 @@ void wxAuiManager::UpdateHintWindowConfig()
|
|||||||
wxDefaultPosition, wxSize(1,1),
|
wxDefaultPosition, wxSize(1,1),
|
||||||
wxFRAME_FLOAT_ON_PARENT
|
wxFRAME_FLOAT_ON_PARENT
|
||||||
| wxFRAME_TOOL_WINDOW );
|
| wxFRAME_TOOL_WINDOW );
|
||||||
m_hintWnd->Connect(wxEVT_ACTIVATE,
|
m_hintWnd->Bind(wxEVT_ACTIVATE, &wxAuiManager::OnHintActivate, this);
|
||||||
wxActivateEventHandler(wxAuiManager::OnHintActivate), NULL, this);
|
|
||||||
|
|
||||||
// Can't set the bg colour of a Frame in wxMac
|
// Can't set the bg colour of a Frame in wxMac
|
||||||
wxPanel* p = new wxPanel(m_hintWnd);
|
wxPanel* p = new wxPanel(m_hintWnd);
|
||||||
@@ -3285,8 +3284,8 @@ void wxAuiManager::OnHintFadeTimer(wxTimerEvent& WXUNUSED(event))
|
|||||||
if (!m_hintWnd || m_hintFadeAmt >= m_hintFadeMax)
|
if (!m_hintWnd || m_hintFadeAmt >= m_hintFadeMax)
|
||||||
{
|
{
|
||||||
m_hintFadeTimer.Stop();
|
m_hintFadeTimer.Stop();
|
||||||
Disconnect(m_hintFadeTimer.GetId(), wxEVT_TIMER,
|
Unbind(wxEVT_TIMER, &wxAuiManager::OnHintFadeTimer, this,
|
||||||
wxTimerEventHandler(wxAuiManager::OnHintFadeTimer));
|
m_hintFadeTimer.GetId());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3330,8 +3329,8 @@ void wxAuiManager::ShowHint(const wxRect& rect)
|
|||||||
// start fade in timer
|
// start fade in timer
|
||||||
m_hintFadeTimer.SetOwner(this);
|
m_hintFadeTimer.SetOwner(this);
|
||||||
m_hintFadeTimer.Start(5);
|
m_hintFadeTimer.Start(5);
|
||||||
Connect(m_hintFadeTimer.GetId(), wxEVT_TIMER,
|
Bind(wxEVT_TIMER, &wxAuiManager::OnHintFadeTimer, this,
|
||||||
wxTimerEventHandler(wxAuiManager::OnHintFadeTimer));
|
m_hintFadeTimer.GetId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // Not using a transparent hint window...
|
else // Not using a transparent hint window...
|
||||||
@@ -3402,8 +3401,8 @@ void wxAuiManager::HideHint()
|
|||||||
m_hintFadeTimer.Stop();
|
m_hintFadeTimer.Stop();
|
||||||
// In case this is called while a hint fade is going, we need to
|
// In case this is called while a hint fade is going, we need to
|
||||||
// disconnect the event handler.
|
// disconnect the event handler.
|
||||||
Disconnect(m_hintFadeTimer.GetId(), wxEVT_TIMER,
|
Unbind(wxEVT_TIMER, &wxAuiManager::OnHintFadeTimer, this,
|
||||||
wxTimerEventHandler(wxAuiManager::OnHintFadeTimer));
|
m_hintFadeTimer.GetId());
|
||||||
m_lastHint = wxRect();
|
m_lastHint = wxRect();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -67,9 +67,8 @@ bool wxColourPickerCtrl::Create( wxWindow *parent, wxWindowID id,
|
|||||||
// complete sizer creation
|
// complete sizer creation
|
||||||
wxPickerBase::PostCreation();
|
wxPickerBase::PostCreation();
|
||||||
|
|
||||||
m_picker->Connect(wxEVT_COLOURPICKER_CHANGED,
|
m_picker->Bind(wxEVT_COLOURPICKER_CHANGED,
|
||||||
wxColourPickerEventHandler(wxColourPickerCtrl::OnColourChange),
|
&wxColourPickerCtrl::OnColourChange, this);
|
||||||
NULL, this);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -1094,15 +1094,10 @@ wxComboCtrlBase::CreateTextCtrl(int style)
|
|||||||
style);
|
style);
|
||||||
|
|
||||||
// Connecting the events is currently the most reliable way
|
// Connecting the events is currently the most reliable way
|
||||||
wxWindowID id = m_text->GetId();
|
m_text->Bind(wxEVT_TEXT, &wxComboCtrlBase::OnTextCtrlEvent, this);
|
||||||
m_text->Connect(id, wxEVT_TEXT,
|
|
||||||
wxCommandEventHandler(wxComboCtrlBase::OnTextCtrlEvent),
|
|
||||||
NULL, this);
|
|
||||||
if ( style & wxTE_PROCESS_ENTER )
|
if ( style & wxTE_PROCESS_ENTER )
|
||||||
{
|
{
|
||||||
m_text->Connect(id, wxEVT_TEXT_ENTER,
|
m_text->Bind(wxEVT_TEXT_ENTER, &wxComboCtrlBase::OnTextCtrlEvent, this);
|
||||||
wxCommandEventHandler(wxComboCtrlBase::OnTextCtrlEvent),
|
|
||||||
NULL, this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_text->SetHint(m_hintText);
|
m_text->SetHint(m_hintText);
|
||||||
|
@@ -74,9 +74,7 @@ bool wxFontPickerCtrl::Create( wxWindow *parent, wxWindowID id,
|
|||||||
// complete sizer creation
|
// complete sizer creation
|
||||||
wxPickerBase::PostCreation();
|
wxPickerBase::PostCreation();
|
||||||
|
|
||||||
m_picker->Connect(wxEVT_FONTPICKER_CHANGED,
|
m_picker->Bind(wxEVT_FONTPICKER_CHANGED, &wxFontPickerCtrl::OnFontChange, this);
|
||||||
wxFontPickerEventHandler(wxFontPickerCtrl::OnFontChange),
|
|
||||||
NULL, this);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -91,16 +91,9 @@ bool wxPickerBase::CreateBase(wxWindow *parent,
|
|||||||
// set the initial contents of the textctrl
|
// set the initial contents of the textctrl
|
||||||
m_text->SetValue(text);
|
m_text->SetValue(text);
|
||||||
|
|
||||||
m_text->Connect(m_text->GetId(), wxEVT_TEXT,
|
m_text->Bind(wxEVT_TEXT, &wxPickerBase::OnTextCtrlUpdate, this);
|
||||||
wxCommandEventHandler(wxPickerBase::OnTextCtrlUpdate),
|
m_text->Bind(wxEVT_KILL_FOCUS, &wxPickerBase::OnTextCtrlKillFocus, this);
|
||||||
NULL, this);
|
m_text->Bind(wxEVT_DESTROY, &wxPickerBase::OnTextCtrlDelete, 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_sizer->Add(m_text,
|
m_sizer->Add(m_text,
|
||||||
wxSizerFlags(1).CentreVertical().Border(wxRIGHT));
|
wxSizerFlags(1).CentreVertical().Border(wxRIGHT));
|
||||||
|
@@ -1139,10 +1139,8 @@ public:
|
|||||||
m_maxPage =
|
m_maxPage =
|
||||||
m_page = 1;
|
m_page = 1;
|
||||||
|
|
||||||
Connect(wxEVT_KILL_FOCUS,
|
Bind(wxEVT_KILL_FOCUS, &wxPrintPageTextCtrl::OnKillFocus, this);
|
||||||
wxFocusEventHandler(wxPrintPageTextCtrl::OnKillFocus));
|
Bind(wxEVT_TEXT_ENTER, &wxPrintPageTextCtrl::OnTextEnter, this);
|
||||||
Connect(wxEVT_TEXT_ENTER,
|
|
||||||
wxCommandEventHandler(wxPrintPageTextCtrl::OnTextEnter));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the pages range, must be called after OnPreparePrinting() as
|
// Update the pages range, must be called after OnPreparePrinting() as
|
||||||
|
@@ -179,7 +179,7 @@ wxTreeCtrlBase::wxTreeCtrlBase()
|
|||||||
// quick DoGetBestSize calculation
|
// quick DoGetBestSize calculation
|
||||||
m_quickBestSize = true;
|
m_quickBestSize = true;
|
||||||
|
|
||||||
Connect(wxEVT_CHAR_HOOK, wxKeyEventHandler(wxTreeCtrlBase::OnCharHook));
|
Bind(wxEVT_CHAR_HOOK, &wxTreeCtrlBase::OnCharHook, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxTreeCtrlBase::~wxTreeCtrlBase()
|
wxTreeCtrlBase::~wxTreeCtrlBase()
|
||||||
|
@@ -3022,10 +3022,7 @@ wxWindowBase::DoGetPopupMenuSelectionFromUser(wxMenu& menu, int x, int y)
|
|||||||
{
|
{
|
||||||
gs_popupMenuSelection = wxID_NONE;
|
gs_popupMenuSelection = wxID_NONE;
|
||||||
|
|
||||||
Connect(wxEVT_MENU,
|
Bind(wxEVT_MENU, &wxWindowBase::InternalOnPopupMenu, this);
|
||||||
wxCommandEventHandler(wxWindowBase::InternalOnPopupMenu),
|
|
||||||
NULL,
|
|
||||||
this);
|
|
||||||
|
|
||||||
// it is common to construct the menu passed to this function dynamically
|
// it is common to construct the menu passed to this function dynamically
|
||||||
// using some fixed range of ids which could clash with the ids used
|
// using some fixed range of ids which could clash with the ids used
|
||||||
@@ -3034,21 +3031,12 @@ wxWindowBase::DoGetPopupMenuSelectionFromUser(wxMenu& menu, int x, int y)
|
|||||||
// elsewhere in the program code and this is difficult to avoid in the
|
// elsewhere in the program code and this is difficult to avoid in the
|
||||||
// program itself, so instead we just temporarily suspend UI updating while
|
// program itself, so instead we just temporarily suspend UI updating while
|
||||||
// this menu is shown
|
// this menu is shown
|
||||||
Connect(wxEVT_UPDATE_UI,
|
Bind(wxEVT_UPDATE_UI, &wxWindowBase::InternalOnPopupMenuUpdate, this);
|
||||||
wxUpdateUIEventHandler(wxWindowBase::InternalOnPopupMenuUpdate),
|
|
||||||
NULL,
|
|
||||||
this);
|
|
||||||
|
|
||||||
PopupMenu(&menu, x, y);
|
PopupMenu(&menu, x, y);
|
||||||
|
|
||||||
Disconnect(wxEVT_UPDATE_UI,
|
Unbind(wxEVT_UPDATE_UI, &wxWindowBase::InternalOnPopupMenuUpdate, this);
|
||||||
wxUpdateUIEventHandler(wxWindowBase::InternalOnPopupMenuUpdate),
|
Unbind(wxEVT_MENU, &wxWindowBase::InternalOnPopupMenu, this);
|
||||||
NULL,
|
|
||||||
this);
|
|
||||||
Disconnect(wxEVT_MENU,
|
|
||||||
wxCommandEventHandler(wxWindowBase::InternalOnPopupMenu),
|
|
||||||
NULL,
|
|
||||||
this);
|
|
||||||
|
|
||||||
return gs_popupMenuSelection;
|
return gs_popupMenuSelection;
|
||||||
}
|
}
|
||||||
|
@@ -220,10 +220,8 @@ bool wxGenericAboutDialog::Create(const wxAboutDialogInfo& info, wxWindow* paren
|
|||||||
CentreOnParent();
|
CentreOnParent();
|
||||||
|
|
||||||
#if !wxUSE_MODAL_ABOUT_DIALOG
|
#if !wxUSE_MODAL_ABOUT_DIALOG
|
||||||
Connect(wxEVT_CLOSE_WINDOW,
|
Bind(wxEVT_CLOSE_WINDOW, &wxGenericAboutDialog::OnCloseWindow, this);
|
||||||
wxCloseEventHandler(wxGenericAboutDialog::OnCloseWindow));
|
Bind(wxEVT_BUTTON, &wxGenericAboutDialog::OnOK, this, wxID_OK);
|
||||||
Connect(wxID_OK, wxEVT_BUTTON,
|
|
||||||
wxCommandEventHandler(wxGenericAboutDialog::OnOK));
|
|
||||||
#endif // !wxUSE_MODAL_ABOUT_DIALOG
|
#endif // !wxUSE_MODAL_ABOUT_DIALOG
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@@ -278,9 +278,7 @@ void wxGenericCalendarCtrl::CreateMonthComboBox()
|
|||||||
wxDefaultCoord,
|
wxDefaultCoord,
|
||||||
wxSIZE_AUTO_WIDTH|wxSIZE_AUTO_HEIGHT);
|
wxSIZE_AUTO_WIDTH|wxSIZE_AUTO_HEIGHT);
|
||||||
|
|
||||||
m_comboMonth->Connect(m_comboMonth->GetId(), wxEVT_COMBOBOX,
|
m_comboMonth->Bind(wxEVT_COMBOBOX, &wxGenericCalendarCtrl::OnMonthChange, this);
|
||||||
wxCommandEventHandler(wxGenericCalendarCtrl::OnMonthChange),
|
|
||||||
NULL, this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGenericCalendarCtrl::CreateYearSpinCtrl()
|
void wxGenericCalendarCtrl::CreateYearSpinCtrl()
|
||||||
@@ -292,13 +290,8 @@ void wxGenericCalendarCtrl::CreateYearSpinCtrl()
|
|||||||
wxSP_ARROW_KEYS | wxCLIP_SIBLINGS,
|
wxSP_ARROW_KEYS | wxCLIP_SIBLINGS,
|
||||||
-4300, 10000, GetDate().GetYear());
|
-4300, 10000, GetDate().GetYear());
|
||||||
|
|
||||||
m_spinYear->Connect(m_spinYear->GetId(), wxEVT_TEXT,
|
m_spinYear->Bind(wxEVT_TEXT, &wxGenericCalendarCtrl::OnYearTextChange, this);
|
||||||
wxCommandEventHandler(wxGenericCalendarCtrl::OnYearTextChange),
|
m_spinYear->Bind(wxEVT_SPINCTRL, &wxGenericCalendarCtrl::OnYearChange, this);
|
||||||
NULL, this);
|
|
||||||
|
|
||||||
m_spinYear->Connect(m_spinYear->GetId(), wxEVT_SPINCTRL,
|
|
||||||
wxSpinEventHandler(wxGenericCalendarCtrl::OnYearChange),
|
|
||||||
NULL, this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -57,9 +57,7 @@ bool wxGenericColourButton::Create( wxWindow *parent, wxWindowID id,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// and handle user clicks on it
|
// and handle user clicks on it
|
||||||
Connect(GetId(), wxEVT_BUTTON,
|
Bind(wxEVT_BUTTON, &wxGenericColourButton::OnButtonClick, this, GetId());
|
||||||
wxCommandEventHandler(wxGenericColourButton::OnButtonClick),
|
|
||||||
NULL, this);
|
|
||||||
|
|
||||||
m_colour = col;
|
m_colour = col;
|
||||||
UpdateColour();
|
UpdateColour();
|
||||||
|
@@ -1514,7 +1514,7 @@ public:
|
|||||||
wxWindow( parent, wxID_ANY, wxPoint(0,0), size )
|
wxWindow( parent, wxID_ANY, wxPoint(0,0), size )
|
||||||
{
|
{
|
||||||
m_bitmap = bitmap;
|
m_bitmap = bitmap;
|
||||||
Connect( wxEVT_PAINT, wxPaintEventHandler(wxBitmapCanvas::OnPaint) );
|
Bind(wxEVT_PAINT, &wxBitmapCanvas::OnPaint, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnPaint( wxPaintEvent &WXUNUSED(event) )
|
void OnPaint( wxPaintEvent &WXUNUSED(event) )
|
||||||
|
@@ -86,9 +86,7 @@ public:
|
|||||||
if ( !tx )
|
if ( !tx )
|
||||||
tx = m_combo;
|
tx = m_combo;
|
||||||
|
|
||||||
tx->Connect(wxEVT_KILL_FOCUS,
|
tx->Bind(wxEVT_KILL_FOCUS, &wxCalendarComboPopup::OnKillTextFocus, this);
|
||||||
wxFocusEventHandler(wxCalendarComboPopup::OnKillTextFocus),
|
|
||||||
NULL, this);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -80,9 +80,7 @@ bool wxGenericFileDirButton::Create(wxWindow *parent,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// and handle user clicks on it
|
// and handle user clicks on it
|
||||||
Connect(GetId(), wxEVT_BUTTON,
|
Bind(wxEVT_BUTTON, &wxGenericFileDirButton::OnButtonClick, this, GetId());
|
||||||
wxCommandEventHandler(wxGenericFileDirButton::OnButtonClick),
|
|
||||||
NULL, this);
|
|
||||||
|
|
||||||
// create the dialog associated with this button
|
// create the dialog associated with this button
|
||||||
m_path = path;
|
m_path = path;
|
||||||
|
@@ -58,9 +58,7 @@ bool wxGenericFontButton::Create( wxWindow *parent, wxWindowID id,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// and handle user clicks on it
|
// and handle user clicks on it
|
||||||
Connect(GetId(), wxEVT_BUTTON,
|
Bind(wxEVT_BUTTON, &wxGenericFontButton::OnButtonClick, this, GetId());
|
||||||
wxCommandEventHandler(wxGenericFontButton::OnButtonClick),
|
|
||||||
NULL, this);
|
|
||||||
|
|
||||||
InitFontData();
|
InitFontData();
|
||||||
|
|
||||||
|
@@ -88,15 +88,15 @@ bool wxGenericHyperlinkCtrl::Create(wxWindow *parent, wxWindowID id,
|
|||||||
// behave correctly (as we intercept events doing things which interfere
|
// behave correctly (as we intercept events doing things which interfere
|
||||||
// with GTK+'s native handling):
|
// with GTK+'s native handling):
|
||||||
|
|
||||||
Connect( wxEVT_PAINT, wxPaintEventHandler(wxGenericHyperlinkCtrl::OnPaint) );
|
Bind( wxEVT_PAINT, &wxGenericHyperlinkCtrl::OnPaint, this);
|
||||||
Connect( wxEVT_SET_FOCUS, wxFocusEventHandler(wxGenericHyperlinkCtrl::OnFocus) );
|
Bind( wxEVT_SET_FOCUS, &wxGenericHyperlinkCtrl::OnFocus, this);
|
||||||
Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler(wxGenericHyperlinkCtrl::OnFocus) );
|
Bind( wxEVT_KILL_FOCUS, &wxGenericHyperlinkCtrl::OnFocus, this);
|
||||||
Connect( wxEVT_CHAR, wxKeyEventHandler(wxGenericHyperlinkCtrl::OnChar) );
|
Bind( wxEVT_CHAR, &wxGenericHyperlinkCtrl::OnChar, this);
|
||||||
Connect( wxEVT_LEAVE_WINDOW, wxMouseEventHandler(wxGenericHyperlinkCtrl::OnLeaveWindow) );
|
Bind( wxEVT_LEAVE_WINDOW, &wxGenericHyperlinkCtrl::OnLeaveWindow, this);
|
||||||
|
|
||||||
Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler(wxGenericHyperlinkCtrl::OnLeftDown) );
|
Bind( wxEVT_LEFT_DOWN, &wxGenericHyperlinkCtrl::OnLeftDown, this);
|
||||||
Connect( wxEVT_LEFT_UP, wxMouseEventHandler(wxGenericHyperlinkCtrl::OnLeftUp) );
|
Bind( wxEVT_LEFT_UP, &wxGenericHyperlinkCtrl::OnLeftUp, this);
|
||||||
Connect( wxEVT_MOTION, wxMouseEventHandler(wxGenericHyperlinkCtrl::OnMotion) );
|
Bind( wxEVT_MOTION, &wxGenericHyperlinkCtrl::OnMotion, this);
|
||||||
|
|
||||||
ConnectMenuHandlers();
|
ConnectMenuHandlers();
|
||||||
|
|
||||||
@@ -118,9 +118,9 @@ void wxGenericHyperlinkCtrl::Init()
|
|||||||
void wxGenericHyperlinkCtrl::ConnectMenuHandlers()
|
void wxGenericHyperlinkCtrl::ConnectMenuHandlers()
|
||||||
{
|
{
|
||||||
// Connect the event handlers for the context menu.
|
// Connect the event handlers for the context menu.
|
||||||
Connect( wxEVT_RIGHT_UP, wxMouseEventHandler(wxGenericHyperlinkCtrl::OnRightUp) );
|
Bind( wxEVT_RIGHT_UP, &wxGenericHyperlinkCtrl::OnRightUp, this);
|
||||||
Connect( wxHYPERLINK_POPUP_COPY_ID, wxEVT_MENU,
|
Bind( wxEVT_MENU, &wxGenericHyperlinkCtrl::OnPopUpCopy, this,
|
||||||
wxCommandEventHandler(wxGenericHyperlinkCtrl::OnPopUpCopy) );
|
wxHYPERLINK_POPUP_COPY_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxSize wxGenericHyperlinkCtrl::DoGetBestClientSize() const
|
wxSize wxGenericHyperlinkCtrl::DoGetBestClientSize() const
|
||||||
|
@@ -534,17 +534,15 @@ wxGenericMDIClientWindow::CreateGenericClient(wxWindow *parent)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
m_notebook = new wxNotebook(this, wxID_ANY);
|
m_notebook = new wxNotebook(this, wxID_ANY);
|
||||||
m_notebook->Connect
|
m_notebook->Bind
|
||||||
(
|
(
|
||||||
wxEVT_NOTEBOOK_PAGE_CHANGED,
|
wxEVT_NOTEBOOK_PAGE_CHANGED,
|
||||||
wxNotebookEventHandler(
|
&wxGenericMDIClientWindow::OnPageChanged,
|
||||||
wxGenericMDIClientWindow::OnPageChanged),
|
|
||||||
NULL,
|
|
||||||
this
|
this
|
||||||
);
|
);
|
||||||
|
|
||||||
// now that we have a notebook to resize, hook up OnSize() too
|
// now that we have a notebook to resize, hook up OnSize() too
|
||||||
Connect(wxEVT_SIZE, wxSizeEventHandler(wxGenericMDIClientWindow::OnSize));
|
Bind(wxEVT_SIZE, &wxGenericMDIClientWindow::OnSize, this);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -252,7 +252,7 @@ public:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Connect(wxEVT_TIMER, wxTimerEventHandler(wxRichToolTipPopup::OnTimer));
|
Bind(wxEVT_TIMER, &wxRichToolTipPopup::OnTimer, this);
|
||||||
|
|
||||||
m_timeout = timeout; // set for use in OnTimer if we have a delay
|
m_timeout = timeout; // set for use in OnTimer if we have a delay
|
||||||
m_delayShow = delay != 0;
|
m_delayShow = delay != 0;
|
||||||
|
@@ -35,7 +35,7 @@ bool wxGenericStaticBitmap::Create(wxWindow *parent, wxWindowID id,
|
|||||||
return false;
|
return false;
|
||||||
m_scaleMode = Scale_None;
|
m_scaleMode = Scale_None;
|
||||||
SetBitmap(bitmap);
|
SetBitmap(bitmap);
|
||||||
Connect(wxEVT_PAINT, wxPaintEventHandler(wxGenericStaticBitmap::OnPaint));
|
Bind(wxEVT_PAINT, &wxGenericStaticBitmap::OnPaint, this);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -44,7 +44,7 @@ bool wxGenericStaticText::Create(wxWindow *parent,
|
|||||||
|
|
||||||
SetLabel(label);
|
SetLabel(label);
|
||||||
SetInitialSize(size);
|
SetInitialSize(size);
|
||||||
Connect(wxEVT_PAINT, wxPaintEventHandler(wxGenericStaticText::OnPaint));
|
Bind(wxEVT_PAINT, &wxGenericStaticText::OnPaint, this);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -92,42 +92,12 @@ public:
|
|||||||
m_useAMPM = false;
|
m_useAMPM = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
m_text->Connect
|
m_text->Bind(wxEVT_SET_FOCUS, &wxTimePickerGenericImpl::OnTextSetFocus, this);
|
||||||
(
|
m_text->Bind(wxEVT_KEY_DOWN, &wxTimePickerGenericImpl::OnTextKeyDown, this);
|
||||||
wxEVT_SET_FOCUS,
|
m_text->Bind(wxEVT_LEFT_DOWN, &wxTimePickerGenericImpl::OnTextClick, this);
|
||||||
wxFocusEventHandler(wxTimePickerGenericImpl::OnTextSetFocus),
|
|
||||||
NULL,
|
|
||||||
this
|
|
||||||
);
|
|
||||||
m_text->Connect
|
|
||||||
(
|
|
||||||
wxEVT_KEY_DOWN,
|
|
||||||
wxKeyEventHandler(wxTimePickerGenericImpl::OnTextKeyDown),
|
|
||||||
NULL,
|
|
||||||
this
|
|
||||||
);
|
|
||||||
m_text->Connect
|
|
||||||
(
|
|
||||||
wxEVT_LEFT_DOWN,
|
|
||||||
wxMouseEventHandler(wxTimePickerGenericImpl::OnTextClick),
|
|
||||||
NULL,
|
|
||||||
this
|
|
||||||
);
|
|
||||||
|
|
||||||
m_btn->Connect
|
m_btn->Bind(wxEVT_SPIN_UP, &wxTimePickerGenericImpl::OnArrowUp, this);
|
||||||
(
|
m_btn->Bind(wxEVT_SPIN_DOWN, &wxTimePickerGenericImpl::OnArrowDown, this);
|
||||||
wxEVT_SPIN_UP,
|
|
||||||
wxSpinEventHandler(wxTimePickerGenericImpl::OnArrowUp),
|
|
||||||
NULL,
|
|
||||||
this
|
|
||||||
);
|
|
||||||
m_btn->Connect
|
|
||||||
(
|
|
||||||
wxEVT_SPIN_DOWN,
|
|
||||||
wxSpinEventHandler(wxTimePickerGenericImpl::OnArrowDown),
|
|
||||||
NULL,
|
|
||||||
this
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the new value.
|
// Set the new value.
|
||||||
|
@@ -356,17 +356,13 @@ void wxAnyButton::DoSetBitmap(const wxBitmap& bitmap, State which)
|
|||||||
case State_Focused:
|
case State_Focused:
|
||||||
if ( bitmap.IsOk() )
|
if ( bitmap.IsOk() )
|
||||||
{
|
{
|
||||||
Connect(wxEVT_SET_FOCUS,
|
Bind(wxEVT_SET_FOCUS, &wxAnyButton::GTKOnFocus, this);
|
||||||
wxFocusEventHandler(wxAnyButton::GTKOnFocus));
|
Bind(wxEVT_KILL_FOCUS, &wxAnyButton::GTKOnFocus, this);
|
||||||
Connect(wxEVT_KILL_FOCUS,
|
|
||||||
wxFocusEventHandler(wxAnyButton::GTKOnFocus));
|
|
||||||
}
|
}
|
||||||
else // no valid focused bitmap
|
else // no valid focused bitmap
|
||||||
{
|
{
|
||||||
Disconnect(wxEVT_SET_FOCUS,
|
Unbind(wxEVT_SET_FOCUS, &wxAnyButton::GTKOnFocus, this);
|
||||||
wxFocusEventHandler(wxAnyButton::GTKOnFocus));
|
Unbind(wxEVT_KILL_FOCUS, &wxAnyButton::GTKOnFocus, this);
|
||||||
Disconnect(wxEVT_KILL_FOCUS,
|
|
||||||
wxFocusEventHandler(wxAnyButton::GTKOnFocus));
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@@ -89,9 +89,7 @@ bool wxFileButton::Create( wxWindow *parent, wxWindowID id,
|
|||||||
// we need to know when the dialog has been dismissed clicking OK...
|
// we need to know when the dialog has been dismissed clicking OK...
|
||||||
// NOTE: the "clicked" signal is not available for a GtkFileChooserButton
|
// NOTE: the "clicked" signal is not available for a GtkFileChooserButton
|
||||||
// thus we are forced to use wxFileDialog's event
|
// thus we are forced to use wxFileDialog's event
|
||||||
m_dialog->Connect(wxEVT_BUTTON,
|
m_dialog->Bind(wxEVT_BUTTON, &wxFileButton::OnDialogOK, this);
|
||||||
wxCommandEventHandler(wxFileButton::OnDialogOK),
|
|
||||||
NULL, this);
|
|
||||||
|
|
||||||
m_parent->DoAddChild( this );
|
m_parent->DoAddChild( this );
|
||||||
|
|
||||||
|
@@ -135,24 +135,12 @@ public:
|
|||||||
m_mask(CreateShapeBitmap(path), *wxBLACK)
|
m_mask(CreateShapeBitmap(path), *wxBLACK)
|
||||||
{
|
{
|
||||||
|
|
||||||
m_win->Connect
|
m_win->Bind(wxEVT_PAINT, &wxNonOwnedWindowShapeImplPath::OnPaint, this);
|
||||||
(
|
|
||||||
wxEVT_PAINT,
|
|
||||||
wxPaintEventHandler(wxNonOwnedWindowShapeImplPath::OnPaint),
|
|
||||||
NULL,
|
|
||||||
this
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~wxNonOwnedWindowShapeImplPath()
|
virtual ~wxNonOwnedWindowShapeImplPath()
|
||||||
{
|
{
|
||||||
m_win->Disconnect
|
m_win->Unbind(wxEVT_PAINT, &wxNonOwnedWindowShapeImplPath::OnPaint, this);
|
||||||
(
|
|
||||||
wxEVT_PAINT,
|
|
||||||
wxPaintEventHandler(wxNonOwnedWindowShapeImplPath::OnPaint),
|
|
||||||
NULL,
|
|
||||||
this
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Currently we always return false from here, if drawing the border
|
// Currently we always return false from here, if drawing the border
|
||||||
|
@@ -122,10 +122,8 @@ wxCalendarCtrl::Create(wxWindow *parent,
|
|||||||
SetHolidayAttrs();
|
SetHolidayAttrs();
|
||||||
UpdateMarks();
|
UpdateMarks();
|
||||||
|
|
||||||
Connect(wxEVT_LEFT_DOWN,
|
Bind(wxEVT_LEFT_DOWN, &wxCalendarCtrl::MSWOnClick, this);
|
||||||
wxMouseEventHandler(wxCalendarCtrl::MSWOnClick));
|
Bind(wxEVT_LEFT_DCLICK, &wxCalendarCtrl::MSWOnDoubleClick, this);
|
||||||
Connect(wxEVT_LEFT_DCLICK,
|
|
||||||
wxMouseEventHandler(wxCalendarCtrl::MSWOnDoubleClick));
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -111,8 +111,7 @@ bool wxDialog::Create(wxWindow *parent,
|
|||||||
{
|
{
|
||||||
CreateGripper();
|
CreateGripper();
|
||||||
|
|
||||||
Connect(wxEVT_CREATE,
|
Bind(wxEVT_CREATE, &wxDialog::OnWindowCreate, this);
|
||||||
wxWindowCreateEventHandler(wxDialog::OnWindowCreate));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@@ -892,10 +892,10 @@ public:
|
|||||||
wxAMMediaEvtHandler(wxAMMediaBackend *amb) :
|
wxAMMediaEvtHandler(wxAMMediaBackend *amb) :
|
||||||
m_amb(amb), m_bLoadEventSent(false)
|
m_amb(amb), m_bLoadEventSent(false)
|
||||||
{
|
{
|
||||||
m_amb->m_pAX->Connect(m_amb->m_pAX->GetId(),
|
m_amb->m_pAX->Bind(
|
||||||
wxEVT_ACTIVEX,
|
wxEVT_ACTIVEX,
|
||||||
wxActiveXEventHandler(wxAMMediaEvtHandler::OnActiveX),
|
&wxAMMediaEvtHandler::OnActiveX, this,
|
||||||
NULL, this
|
m_amb->m_pAX->GetId()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -416,10 +416,9 @@ public:
|
|||||||
m_qtb = qtb;
|
m_qtb = qtb;
|
||||||
m_hwnd = hwnd;
|
m_hwnd = hwnd;
|
||||||
|
|
||||||
m_qtb->m_ctrl->Connect(m_qtb->m_ctrl->GetId(),
|
m_qtb->m_ctrl->Bind(
|
||||||
wxEVT_ERASE_BACKGROUND,
|
wxEVT_ERASE_BACKGROUND,
|
||||||
wxEraseEventHandler(wxQTMediaEvtHandler::OnEraseBackground),
|
&wxQTMediaEvtHandler::OnEraseBackground, this);
|
||||||
NULL, this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnEraseBackground(wxEraseEvent& event);
|
void OnEraseBackground(wxEraseEvent& event);
|
||||||
|
@@ -681,11 +681,9 @@ public:
|
|||||||
wxWMP10MediaEvtHandler(wxWMP10MediaBackend *amb) :
|
wxWMP10MediaEvtHandler(wxWMP10MediaBackend *amb) :
|
||||||
m_amb(amb)
|
m_amb(amb)
|
||||||
{
|
{
|
||||||
m_amb->m_pAX->Connect(m_amb->m_pAX->GetId(),
|
m_amb->m_pAX->Bind(wxEVT_ACTIVEX,
|
||||||
wxEVT_ACTIVEX,
|
&wxWMP10MediaEvtHandler::OnActiveX, this,
|
||||||
wxActiveXEventHandler(wxWMP10MediaEvtHandler::OnActiveX),
|
m_amb->m_pAX->GetId());
|
||||||
NULL, this
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnActiveX(wxActiveXEvent& event);
|
void OnActiveX(wxActiveXEvent& event);
|
||||||
|
@@ -82,11 +82,7 @@ bool wxNonOwnedWindow::DoSetRegionShape(const wxRegion& region)
|
|||||||
#include "wx/msw/wrapgdip.h"
|
#include "wx/msw/wrapgdip.h"
|
||||||
|
|
||||||
// This class contains data used only when SetPath(wxGraphicsPath) is called.
|
// This class contains data used only when SetPath(wxGraphicsPath) is called.
|
||||||
//
|
class wxNonOwnedWindowShapeImpl
|
||||||
// Notice that it derives from wxEvtHandler solely to allow Connect()-ing its
|
|
||||||
// OnPaint() method to the window, we could get rid of this inheritance once
|
|
||||||
// Bind() can be used in wx sources.
|
|
||||||
class wxNonOwnedWindowShapeImpl : public wxEvtHandler
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxNonOwnedWindowShapeImpl(wxNonOwnedWindow* win, const wxGraphicsPath& path) :
|
wxNonOwnedWindowShapeImpl(wxNonOwnedWindow* win, const wxGraphicsPath& path) :
|
||||||
@@ -107,24 +103,12 @@ public:
|
|||||||
// Connect to the paint event to draw the border.
|
// Connect to the paint event to draw the border.
|
||||||
//
|
//
|
||||||
// TODO: Do this only optionally?
|
// TODO: Do this only optionally?
|
||||||
m_win->Connect
|
m_win->Bind(wxEVT_PAINT, &wxNonOwnedWindowShapeImpl::OnPaint, this);
|
||||||
(
|
|
||||||
wxEVT_PAINT,
|
|
||||||
wxPaintEventHandler(wxNonOwnedWindowShapeImpl::OnPaint),
|
|
||||||
NULL,
|
|
||||||
this
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~wxNonOwnedWindowShapeImpl()
|
virtual ~wxNonOwnedWindowShapeImpl()
|
||||||
{
|
{
|
||||||
m_win->Disconnect
|
m_win->Unbind(wxEVT_PAINT, &wxNonOwnedWindowShapeImpl::OnPaint, this);
|
||||||
(
|
|
||||||
wxEVT_PAINT,
|
|
||||||
wxPaintEventHandler(wxNonOwnedWindowShapeImpl::OnPaint),
|
|
||||||
NULL,
|
|
||||||
this
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -1131,14 +1131,9 @@ void wxActiveXContainer::CreateActiveX(REFIID iid, IUnknown* pUnk)
|
|||||||
wxWindow* pWnd = m_realparent;
|
wxWindow* pWnd = m_realparent;
|
||||||
int id = m_realparent->GetId();
|
int id = m_realparent->GetId();
|
||||||
|
|
||||||
pWnd->Connect(id, wxEVT_SIZE,
|
pWnd->Bind(wxEVT_SIZE, &wxActiveXContainer::OnSize, this, id);
|
||||||
wxSizeEventHandler(wxActiveXContainer::OnSize), 0, this);
|
pWnd->Bind(wxEVT_SET_FOCUS, &wxActiveXContainer::OnSetFocus, this, id);
|
||||||
// this->Connect(GetId(), wxEVT_PAINT,
|
pWnd->Bind(wxEVT_KILL_FOCUS, &wxActiveXContainer::OnKillFocus, this, id);
|
||||||
// wxPaintEventHandler(wxActiveXContainer::OnPaint), 0, this);
|
|
||||||
pWnd->Connect(id, wxEVT_SET_FOCUS,
|
|
||||||
wxFocusEventHandler(wxActiveXContainer::OnSetFocus), 0, this);
|
|
||||||
pWnd->Connect(id, wxEVT_KILL_FOCUS,
|
|
||||||
wxFocusEventHandler(wxActiveXContainer::OnKillFocus), 0, this);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -128,7 +128,7 @@ bool wxStaticBitmap::Create(wxWindow *parent,
|
|||||||
// check if we have an image with alpha or not
|
// check if we have an image with alpha or not
|
||||||
if ( wxTheApp->GetComCtl32Version() < 600 )
|
if ( wxTheApp->GetComCtl32Version() < 600 )
|
||||||
{
|
{
|
||||||
Connect(wxEVT_PAINT, wxPaintEventHandler(wxStaticBitmap::DoPaintManually));
|
Bind(wxEVT_PAINT, &wxStaticBitmap::DoPaintManually, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@@ -90,7 +90,7 @@ bool wxStaticBox::Create(wxWindow *parent,
|
|||||||
|
|
||||||
if (!wxSystemOptions::IsFalse(wxT("msw.staticbox.optimized-paint")))
|
if (!wxSystemOptions::IsFalse(wxT("msw.staticbox.optimized-paint")))
|
||||||
{
|
{
|
||||||
Connect(wxEVT_PAINT, wxPaintEventHandler(wxStaticBox::OnPaint));
|
Bind(wxEVT_PAINT, &wxStaticBox::OnPaint, this);
|
||||||
|
|
||||||
// Our OnPaint() completely erases our background, so don't do it in
|
// Our OnPaint() completely erases our background, so don't do it in
|
||||||
// WM_ERASEBKGND too to avoid flicker.
|
// WM_ERASEBKGND too to avoid flicker.
|
||||||
|
@@ -584,7 +584,7 @@ bool wxTextCtrl::MSWCreateText(const wxString& value,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if ( !contextMenuConnected )
|
if ( !contextMenuConnected )
|
||||||
Connect(wxEVT_CONTEXT_MENU, wxContextMenuEventHandler(wxTextCtrl::OnContextMenu));
|
Bind(wxEVT_CONTEXT_MENU, &wxTextCtrl::OnContextMenu, this);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif // wxUSE_RICHEDIT
|
#endif // wxUSE_RICHEDIT
|
||||||
|
@@ -390,7 +390,7 @@ wxWindow* wxFileDialog::CreateFilterPanel(wxWindow *extracontrol)
|
|||||||
if ( m_firstFileTypeFilter >= 0 )
|
if ( m_firstFileTypeFilter >= 0 )
|
||||||
m_filterChoice->SetSelection(m_firstFileTypeFilter);
|
m_filterChoice->SetSelection(m_firstFileTypeFilter);
|
||||||
}
|
}
|
||||||
m_filterChoice->Connect(wxEVT_CHOICE, wxCommandEventHandler(wxFileDialog::OnFilterSelected), NULL, this);
|
m_filterChoice->Bind(wxEVT_CHOICE, &wxFileDialog::OnFilterSelected, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(extracontrol)
|
if(extracontrol)
|
||||||
|
@@ -146,14 +146,10 @@ public:
|
|||||||
m_hasCapture = false;
|
m_hasCapture = false;
|
||||||
m_spins = 1;
|
m_spins = 1;
|
||||||
|
|
||||||
Connect( wxEVT_LEFT_DOWN,
|
Bind(wxEVT_LEFT_DOWN, &wxPGSpinButton::OnMouseEvent, this);
|
||||||
wxMouseEventHandler(wxPGSpinButton::OnMouseEvent) );
|
Bind(wxEVT_LEFT_UP, &wxPGSpinButton::OnMouseEvent, this);
|
||||||
Connect( wxEVT_LEFT_UP,
|
Bind(wxEVT_MOTION, &wxPGSpinButton::OnMouseEvent, this);
|
||||||
wxMouseEventHandler(wxPGSpinButton::OnMouseEvent) );
|
Bind(wxEVT_MOUSE_CAPTURE_LOST, &wxPGSpinButton::OnMouseCaptureLost, this);
|
||||||
Connect( wxEVT_MOTION,
|
|
||||||
wxMouseEventHandler(wxPGSpinButton::OnMouseEvent) );
|
|
||||||
Connect( wxEVT_MOUSE_CAPTURE_LOST,
|
|
||||||
wxMouseCaptureLostEventHandler(wxPGSpinButton::OnMouseCaptureLost) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int GetSpins() const
|
int GetSpins() const
|
||||||
|
@@ -1048,10 +1048,8 @@ wxPropertyGridPage* wxPropertyGridManager::InsertPage( int index,
|
|||||||
pageObj->m_toolId = tool->GetId();
|
pageObj->m_toolId = tool->GetId();
|
||||||
|
|
||||||
// Connect to toolbar button events.
|
// Connect to toolbar button events.
|
||||||
Connect(pageObj->GetToolId(),
|
Bind(wxEVT_TOOL, &wxPropertyGridManager::OnToolbarClick, this,
|
||||||
wxEVT_TOOL,
|
pageObj->GetToolId());
|
||||||
wxCommandEventHandler(
|
|
||||||
wxPropertyGridManager::OnToolbarClick));
|
|
||||||
|
|
||||||
m_pToolbar->Realize();
|
m_pToolbar->Realize();
|
||||||
}
|
}
|
||||||
@@ -1541,10 +1539,8 @@ void wxPropertyGridManager::RecreateControls()
|
|||||||
m_categorizedModeToolId = tool->GetId();
|
m_categorizedModeToolId = tool->GetId();
|
||||||
tbModified = true;
|
tbModified = true;
|
||||||
|
|
||||||
Connect(m_categorizedModeToolId,
|
Bind(wxEVT_TOOL, &wxPropertyGridManager::OnToolbarClick, this,
|
||||||
wxEVT_TOOL,
|
m_categorizedModeToolId);
|
||||||
wxCommandEventHandler(
|
|
||||||
wxPropertyGridManager::OnToolbarClick));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_alphabeticModeToolId == -1)
|
if (m_alphabeticModeToolId == -1)
|
||||||
@@ -1560,10 +1556,8 @@ void wxPropertyGridManager::RecreateControls()
|
|||||||
m_alphabeticModeToolId = tool->GetId();
|
m_alphabeticModeToolId = tool->GetId();
|
||||||
tbModified = true;
|
tbModified = true;
|
||||||
|
|
||||||
Connect(m_alphabeticModeToolId,
|
Bind(wxEVT_TOOL, &wxPropertyGridManager::OnToolbarClick, this,
|
||||||
wxEVT_TOOL,
|
m_alphabeticModeToolId);
|
||||||
wxCommandEventHandler(
|
|
||||||
wxPropertyGridManager::OnToolbarClick));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Both buttons should exist here.
|
// Both buttons should exist here.
|
||||||
@@ -1574,10 +1568,8 @@ void wxPropertyGridManager::RecreateControls()
|
|||||||
// Remove buttons if they exist.
|
// Remove buttons if they exist.
|
||||||
if (m_categorizedModeToolId != -1)
|
if (m_categorizedModeToolId != -1)
|
||||||
{
|
{
|
||||||
Disconnect(m_categorizedModeToolId,
|
Unbind(wxEVT_TOOL, &wxPropertyGridManager::OnToolbarClick, this,
|
||||||
wxEVT_TOOL,
|
m_categorizedModeToolId);
|
||||||
wxCommandEventHandler(
|
|
||||||
wxPropertyGridManager::OnToolbarClick));
|
|
||||||
|
|
||||||
m_pToolbar->DeleteTool(m_categorizedModeToolId);
|
m_pToolbar->DeleteTool(m_categorizedModeToolId);
|
||||||
m_categorizedModeToolId = -1;
|
m_categorizedModeToolId = -1;
|
||||||
@@ -1586,10 +1578,8 @@ void wxPropertyGridManager::RecreateControls()
|
|||||||
|
|
||||||
if (m_alphabeticModeToolId != -1)
|
if (m_alphabeticModeToolId != -1)
|
||||||
{
|
{
|
||||||
Disconnect(m_alphabeticModeToolId,
|
Unbind(wxEVT_TOOL, &wxPropertyGridManager::OnToolbarClick, this,
|
||||||
wxEVT_TOOL,
|
m_alphabeticModeToolId);
|
||||||
wxCommandEventHandler(
|
|
||||||
wxPropertyGridManager::OnToolbarClick));
|
|
||||||
|
|
||||||
m_pToolbar->DeleteTool(m_alphabeticModeToolId);
|
m_pToolbar->DeleteTool(m_alphabeticModeToolId);
|
||||||
m_alphabeticModeToolId = -1;
|
m_alphabeticModeToolId = -1;
|
||||||
@@ -1943,18 +1933,18 @@ void wxPropertyGridManager::ReconnectEventHandlers(wxWindowID oldId, wxWindowID
|
|||||||
|
|
||||||
if (oldId != wxID_NONE)
|
if (oldId != wxID_NONE)
|
||||||
{
|
{
|
||||||
Disconnect(oldId, wxEVT_PG_SELECTED,
|
Unbind(wxEVT_PG_SELECTED, &wxPropertyGridManager::OnPropertyGridSelect, this,
|
||||||
wxPropertyGridEventHandler(wxPropertyGridManager::OnPropertyGridSelect));
|
oldId);
|
||||||
Disconnect(oldId, wxEVT_PG_COL_DRAGGING,
|
Unbind(wxEVT_PG_COL_DRAGGING, &wxPropertyGridManager::OnPGColDrag, this,
|
||||||
wxPropertyGridEventHandler(wxPropertyGridManager::OnPGColDrag));
|
oldId);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newId != wxID_NONE)
|
if (newId != wxID_NONE)
|
||||||
{
|
{
|
||||||
Connect(newId, wxEVT_PG_SELECTED,
|
Bind(wxEVT_PG_SELECTED, &wxPropertyGridManager::OnPropertyGridSelect, this,
|
||||||
wxPropertyGridEventHandler(wxPropertyGridManager::OnPropertyGridSelect));
|
newId);
|
||||||
Connect(newId, wxEVT_PG_COL_DRAGGING,
|
Bind(wxEVT_PG_COL_DRAGGING, &wxPropertyGridManager::OnPGColDrag, this,
|
||||||
wxPropertyGridEventHandler(wxPropertyGridManager::OnPGColDrag));
|
newId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1039,13 +1039,8 @@ void wxPropertyGrid::DoBeginLabelEdit( unsigned int colIndex,
|
|||||||
0,
|
0,
|
||||||
colIndex);
|
colIndex);
|
||||||
|
|
||||||
wxWindowID id = tc->GetId();
|
tc->Bind(wxEVT_TEXT_ENTER, &wxPropertyGrid::OnLabelEditorEnterPress, this);
|
||||||
tc->Connect(id, wxEVT_TEXT_ENTER,
|
tc->Bind(wxEVT_KEY_DOWN, &wxPropertyGrid::OnLabelEditorKeyPress, this);
|
||||||
wxCommandEventHandler(wxPropertyGrid::OnLabelEditorEnterPress),
|
|
||||||
NULL, this);
|
|
||||||
tc->Connect(id, wxEVT_KEY_DOWN,
|
|
||||||
wxKeyEventHandler(wxPropertyGrid::OnLabelEditorKeyPress),
|
|
||||||
NULL, this);
|
|
||||||
|
|
||||||
tc->SetFocus();
|
tc->SetFocus();
|
||||||
|
|
||||||
@@ -1227,9 +1222,7 @@ void wxPropertyGrid::OnTLPChanging( wxWindow* newTLP )
|
|||||||
// correct top-level window.
|
// correct top-level window.
|
||||||
if ( m_tlp )
|
if ( m_tlp )
|
||||||
{
|
{
|
||||||
m_tlp->Disconnect( wxEVT_CLOSE_WINDOW,
|
m_tlp->Unbind(wxEVT_CLOSE_WINDOW, &wxPropertyGrid::OnTLPClose, this);
|
||||||
wxCloseEventHandler(wxPropertyGrid::OnTLPClose),
|
|
||||||
NULL, this );
|
|
||||||
m_tlpClosed = m_tlp;
|
m_tlpClosed = m_tlp;
|
||||||
m_tlpClosedTime = currentTime;
|
m_tlpClosedTime = currentTime;
|
||||||
}
|
}
|
||||||
@@ -1240,9 +1233,7 @@ void wxPropertyGrid::OnTLPChanging( wxWindow* newTLP )
|
|||||||
if ( newTLP != m_tlpClosed ||
|
if ( newTLP != m_tlpClosed ||
|
||||||
m_tlpClosedTime+250 < currentTime )
|
m_tlpClosedTime+250 < currentTime )
|
||||||
{
|
{
|
||||||
newTLP->Connect( wxEVT_CLOSE_WINDOW,
|
newTLP->Bind(wxEVT_CLOSE_WINDOW, &wxPropertyGrid::OnTLPClose, this);
|
||||||
wxCloseEventHandler(wxPropertyGrid::OnTLPClose),
|
|
||||||
NULL, this );
|
|
||||||
m_tlpClosed = NULL;
|
m_tlpClosed = NULL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -3928,33 +3919,19 @@ void wxPropertyGrid::SetupChildEventHandling( wxWindow* argWnd )
|
|||||||
|
|
||||||
if ( argWnd == m_wndEditor )
|
if ( argWnd == m_wndEditor )
|
||||||
{
|
{
|
||||||
argWnd->Connect(id, wxEVT_MOTION,
|
argWnd->Bind(wxEVT_MOTION, &wxPropertyGrid::OnMouseMoveChild, this, id);
|
||||||
wxMouseEventHandler(wxPropertyGrid::OnMouseMoveChild),
|
argWnd->Bind(wxEVT_LEFT_UP, &wxPropertyGrid::OnMouseUpChild, this, id);
|
||||||
NULL, this);
|
argWnd->Bind(wxEVT_LEFT_DOWN, &wxPropertyGrid::OnMouseClickChild, this, id);
|
||||||
argWnd->Connect(id, wxEVT_LEFT_UP,
|
argWnd->Bind(wxEVT_RIGHT_UP, &wxPropertyGrid::OnMouseRightClickChild, this, id);
|
||||||
wxMouseEventHandler(wxPropertyGrid::OnMouseUpChild),
|
argWnd->Bind(wxEVT_ENTER_WINDOW, &wxPropertyGrid::OnMouseEntry, this, id);
|
||||||
NULL, this);
|
argWnd->Bind(wxEVT_LEAVE_WINDOW, &wxPropertyGrid::OnMouseEntry, this, id);
|
||||||
argWnd->Connect(id, wxEVT_LEFT_DOWN,
|
|
||||||
wxMouseEventHandler(wxPropertyGrid::OnMouseClickChild),
|
|
||||||
NULL, this);
|
|
||||||
argWnd->Connect(id, wxEVT_RIGHT_UP,
|
|
||||||
wxMouseEventHandler(wxPropertyGrid::OnMouseRightClickChild),
|
|
||||||
NULL, this);
|
|
||||||
argWnd->Connect(id, wxEVT_ENTER_WINDOW,
|
|
||||||
wxMouseEventHandler(wxPropertyGrid::OnMouseEntry),
|
|
||||||
NULL, this);
|
|
||||||
argWnd->Connect(id, wxEVT_LEAVE_WINDOW,
|
|
||||||
wxMouseEventHandler(wxPropertyGrid::OnMouseEntry),
|
|
||||||
NULL, this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPropertyGridEditorEventForwarder* forwarder;
|
wxPropertyGridEditorEventForwarder* forwarder;
|
||||||
forwarder = new wxPropertyGridEditorEventForwarder(this);
|
forwarder = new wxPropertyGridEditorEventForwarder(this);
|
||||||
argWnd->PushEventHandler(forwarder);
|
argWnd->PushEventHandler(forwarder);
|
||||||
|
|
||||||
argWnd->Connect(id, wxEVT_KEY_DOWN,
|
argWnd->Bind(wxEVT_KEY_DOWN, &wxPropertyGrid::OnChildKeyDown, this, id);
|
||||||
wxCharEventHandler(wxPropertyGrid::OnChildKeyDown),
|
|
||||||
NULL, this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxPropertyGrid::DeletePendingObjects()
|
void wxPropertyGrid::DeletePendingObjects()
|
||||||
|
@@ -2471,38 +2471,25 @@ bool wxPGArrayEditorDialog::Create( wxWindow *parent,
|
|||||||
arr.push_back(ArrayGet(i));
|
arr.push_back(ArrayGet(i));
|
||||||
m_elb->SetStrings(arr);
|
m_elb->SetStrings(arr);
|
||||||
|
|
||||||
|
m_elbSubPanel = m_elb->GetNewButton()->GetParent();
|
||||||
|
|
||||||
// Connect event handlers
|
// Connect event handlers
|
||||||
wxButton* but;
|
|
||||||
wxListCtrl* lc = m_elb->GetListCtrl();
|
wxListCtrl* lc = m_elb->GetListCtrl();
|
||||||
|
|
||||||
but = m_elb->GetNewButton();
|
m_elb->GetNewButton()->Bind(wxEVT_BUTTON,
|
||||||
m_elbSubPanel = but->GetParent();
|
&wxPGArrayEditorDialog::OnAddClick, this);
|
||||||
but->Connect(but->GetId(), wxEVT_BUTTON,
|
m_elb->GetDelButton()->Bind(wxEVT_BUTTON,
|
||||||
wxCommandEventHandler(wxPGArrayEditorDialog::OnAddClick),
|
&wxPGArrayEditorDialog::OnDeleteClick, this);
|
||||||
NULL, this);
|
m_elb->GetUpButton()->Bind(wxEVT_BUTTON,
|
||||||
|
&wxPGArrayEditorDialog::OnUpClick, this);
|
||||||
|
m_elb->GetDownButton()->Bind(wxEVT_BUTTON,
|
||||||
|
&wxPGArrayEditorDialog::OnDownClick, this);
|
||||||
|
|
||||||
but = m_elb->GetDelButton();
|
lc->Bind(wxEVT_LIST_BEGIN_LABEL_EDIT,
|
||||||
but->Connect(but->GetId(), wxEVT_BUTTON,
|
&wxPGArrayEditorDialog::OnBeginLabelEdit, this);
|
||||||
wxCommandEventHandler(wxPGArrayEditorDialog::OnDeleteClick),
|
|
||||||
NULL, this);
|
|
||||||
|
|
||||||
but = m_elb->GetUpButton();
|
lc->Bind(wxEVT_LIST_END_LABEL_EDIT,
|
||||||
but->Connect(but->GetId(), wxEVT_BUTTON,
|
&wxPGArrayEditorDialog::OnEndLabelEdit, this);
|
||||||
wxCommandEventHandler(wxPGArrayEditorDialog::OnUpClick),
|
|
||||||
NULL, this);
|
|
||||||
|
|
||||||
but = m_elb->GetDownButton();
|
|
||||||
but->Connect(but->GetId(), wxEVT_BUTTON,
|
|
||||||
wxCommandEventHandler(wxPGArrayEditorDialog::OnDownClick),
|
|
||||||
NULL, this);
|
|
||||||
|
|
||||||
lc->Connect(lc->GetId(), wxEVT_LIST_BEGIN_LABEL_EDIT,
|
|
||||||
wxListEventHandler(wxPGArrayEditorDialog::OnBeginLabelEdit),
|
|
||||||
NULL, this);
|
|
||||||
|
|
||||||
lc->Connect(lc->GetId(), wxEVT_LIST_END_LABEL_EDIT,
|
|
||||||
wxListEventHandler(wxPGArrayEditorDialog::OnEndLabelEdit),
|
|
||||||
NULL, this);
|
|
||||||
|
|
||||||
topsizer->Add(m_elb, wxSizerFlags(1).Expand().Border(0, spacing));
|
topsizer->Add(m_elb, wxSizerFlags(1).Expand().Border(0, spacing));
|
||||||
|
|
||||||
|
@@ -227,14 +227,14 @@ void wxRibbonPanel::AddChild(wxWindowBase *child)
|
|||||||
// for children of the window. The panel wants to be in the hovered state
|
// for children of the window. The panel wants to be in the hovered state
|
||||||
// whenever the mouse cursor is within its boundary, so the events need to
|
// whenever the mouse cursor is within its boundary, so the events need to
|
||||||
// be attached to children too.
|
// be attached to children too.
|
||||||
child->Connect(wxEVT_ENTER_WINDOW, wxMouseEventHandler(wxRibbonPanel::OnMouseEnterChild), NULL, this);
|
child->Bind(wxEVT_ENTER_WINDOW, &wxRibbonPanel::OnMouseEnterChild, this);
|
||||||
child->Connect(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(wxRibbonPanel::OnMouseLeaveChild), NULL, this);
|
child->Bind(wxEVT_LEAVE_WINDOW, &wxRibbonPanel::OnMouseLeaveChild, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxRibbonPanel::RemoveChild(wxWindowBase *child)
|
void wxRibbonPanel::RemoveChild(wxWindowBase *child)
|
||||||
{
|
{
|
||||||
child->Disconnect(wxEVT_ENTER_WINDOW, wxMouseEventHandler(wxRibbonPanel::OnMouseEnterChild), NULL, this);
|
child->Unbind(wxEVT_ENTER_WINDOW, &wxRibbonPanel::OnMouseEnterChild, this);
|
||||||
child->Disconnect(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(wxRibbonPanel::OnMouseLeaveChild), NULL, this);
|
child->Unbind(wxEVT_LEAVE_WINDOW, &wxRibbonPanel::OnMouseLeaveChild, this);
|
||||||
|
|
||||||
wxRibbonControl::RemoveChild(child);
|
wxRibbonControl::RemoveChild(child);
|
||||||
}
|
}
|
||||||
@@ -906,9 +906,8 @@ void wxRibbonPanel::OnKillFocus(wxFocusEvent& evt)
|
|||||||
if(IsAncestorOf(this, receiver))
|
if(IsAncestorOf(this, receiver))
|
||||||
{
|
{
|
||||||
m_child_with_focus = receiver;
|
m_child_with_focus = receiver;
|
||||||
receiver->Connect(wxEVT_KILL_FOCUS,
|
receiver->Bind(wxEVT_KILL_FOCUS,
|
||||||
wxFocusEventHandler(wxRibbonPanel::OnChildKillFocus),
|
&wxRibbonPanel::OnChildKillFocus, this);
|
||||||
NULL, this);
|
|
||||||
}
|
}
|
||||||
else if(receiver == NULL || receiver != m_expanded_dummy)
|
else if(receiver == NULL || receiver != m_expanded_dummy)
|
||||||
{
|
{
|
||||||
@@ -922,16 +921,16 @@ void wxRibbonPanel::OnChildKillFocus(wxFocusEvent& evt)
|
|||||||
if(m_child_with_focus == NULL)
|
if(m_child_with_focus == NULL)
|
||||||
return; // Should never happen, but a check can't hurt
|
return; // Should never happen, but a check can't hurt
|
||||||
|
|
||||||
m_child_with_focus->Disconnect(wxEVT_KILL_FOCUS,
|
m_child_with_focus->Unbind(wxEVT_KILL_FOCUS,
|
||||||
wxFocusEventHandler(wxRibbonPanel::OnChildKillFocus), NULL, this);
|
&wxRibbonPanel::OnChildKillFocus, this);
|
||||||
m_child_with_focus = NULL;
|
m_child_with_focus = NULL;
|
||||||
|
|
||||||
wxWindow *receiver = evt.GetWindow();
|
wxWindow *receiver = evt.GetWindow();
|
||||||
if(receiver == this || IsAncestorOf(this, receiver))
|
if(receiver == this || IsAncestorOf(this, receiver))
|
||||||
{
|
{
|
||||||
m_child_with_focus = receiver;
|
m_child_with_focus = receiver;
|
||||||
receiver->Connect(wxEVT_KILL_FOCUS,
|
receiver->Bind(wxEVT_KILL_FOCUS,
|
||||||
wxFocusEventHandler(wxRibbonPanel::OnChildKillFocus), NULL, this);
|
&wxRibbonPanel::OnChildKillFocus, this);
|
||||||
evt.Skip();
|
evt.Skip();
|
||||||
}
|
}
|
||||||
else if(receiver == NULL || receiver != m_expanded_dummy)
|
else if(receiver == NULL || receiver != m_expanded_dummy)
|
||||||
|
@@ -366,9 +366,9 @@ bool ScintillaWX::SetIdle(bool on) {
|
|||||||
if (idler.state != on) {
|
if (idler.state != on) {
|
||||||
// connect or disconnect the EVT_IDLE handler
|
// connect or disconnect the EVT_IDLE handler
|
||||||
if (on)
|
if (on)
|
||||||
stc->Connect(wxID_ANY, wxEVT_IDLE, wxIdleEventHandler(wxStyledTextCtrl::OnIdle));
|
stc->Bind(wxEVT_IDLE, &wxStyledTextCtrl::OnIdle, stc);
|
||||||
else
|
else
|
||||||
stc->Disconnect(wxID_ANY, wxEVT_IDLE, wxIdleEventHandler(wxStyledTextCtrl::OnIdle));
|
stc->Unbind(wxEVT_IDLE, &wxStyledTextCtrl::OnIdle, stc);
|
||||||
idler.state = on;
|
idler.state = on;
|
||||||
}
|
}
|
||||||
return idler.state;
|
return idler.state;
|
||||||
|
@@ -205,8 +205,8 @@ class wxGStreamerMediaEventHandler : public wxEvtHandler
|
|||||||
public:
|
public:
|
||||||
wxGStreamerMediaEventHandler(wxGStreamerMediaBackend* be) : m_be(be)
|
wxGStreamerMediaEventHandler(wxGStreamerMediaBackend* be) : m_be(be)
|
||||||
{
|
{
|
||||||
this->Connect(wxID_ANY, wxEVT_MEDIA_FINISHED,
|
this->Bind(wxEVT_MEDIA_FINISHED,
|
||||||
wxMediaEventHandler(wxGStreamerMediaEventHandler::OnMediaFinish));
|
&wxGStreamerMediaEventHandler::OnMediaFinish, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnMediaFinish(wxMediaEvent& event);
|
void OnMediaFinish(wxMediaEvent& event);
|
||||||
|
@@ -256,8 +256,7 @@ wxTaskBarIcon::~wxTaskBarIcon()
|
|||||||
{
|
{
|
||||||
if (m_iconWnd)
|
if (m_iconWnd)
|
||||||
{
|
{
|
||||||
m_iconWnd->Disconnect(wxEVT_DESTROY,
|
m_iconWnd->Unbind(wxEVT_DESTROY, &wxTaskBarIcon::OnDestroy, this);
|
||||||
wxWindowDestroyEventHandler(wxTaskBarIcon::OnDestroy), NULL, this);
|
|
||||||
RemoveIcon();
|
RemoveIcon();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -290,9 +289,7 @@ bool wxTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& tooltip)
|
|||||||
m_iconWnd = new wxTaskBarIconArea(this, bmp);
|
m_iconWnd = new wxTaskBarIconArea(this, bmp);
|
||||||
if (m_iconWnd->IsOk())
|
if (m_iconWnd->IsOk())
|
||||||
{
|
{
|
||||||
m_iconWnd->Connect(wxEVT_DESTROY,
|
m_iconWnd->Bind(wxEVT_DESTROY, &wxTaskBarIcon::OnDestroy, this);
|
||||||
wxWindowDestroyEventHandler(wxTaskBarIcon::OnDestroy),
|
|
||||||
NULL, this);
|
|
||||||
m_iconWnd->Show();
|
m_iconWnd->Show();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user