Replace wxComboPopupEvtHandler with calls to Bind() as well

This is not as much of a simplification as the previous two commits
because there is no simple replacement of EVT_MOUSE_EVENTS() using
Bind() and a loop over all mouse event types has to be written
explicitly, but it still avoids the need to allocate and delete a
separate object, so is still worth it.
This commit is contained in:
Vadim Zeitlin
2021-07-10 19:33:01 +01:00
parent f3fb6dc833
commit d7d5231e96
2 changed files with 55 additions and 69 deletions

View File

@@ -579,6 +579,8 @@ protected:
void OnPopupKey(wxKeyEvent& event);
void OnPopupSize(wxSizeEvent& event);
void OnPopupMouseEvent(wxMouseEvent& event);
// Set customization flags (directs how wxComboCtrlBase helpers behave)
void Customize( wxUint32 flags ) { m_iFlags |= flags; }
@@ -637,9 +639,6 @@ protected:
// this is for the top level window
wxEvtHandler* m_toplevEvtHandler;
// this is for the control in popup
wxEvtHandler* m_popupEvtHandler;
// main (ie. topmost) window of a composite control (default = this)
wxWindow* m_mainCtrlWnd;
@@ -718,6 +717,10 @@ protected:
// is the text-area background colour overridden?
bool m_hasTcBgCol;
// flags used while popup is shown
bool m_beenInsidePopup;
bool m_blockEventsToPopup;
private:
void Init();