X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/670f9935630beb2123a5ca62894ae92a3f0efa4f..eec960fa8987d15fd87e249c8441474188124425:/src/common/popupcmn.cpp?ds=inline diff --git a/src/common/popupcmn.cpp b/src/common/popupcmn.cpp index 788e0bdffe..d0a3534f37 100644 --- a/src/common/popupcmn.cpp +++ b/src/common/popupcmn.cpp @@ -29,7 +29,7 @@ #include "wx/popupwin.h" #ifndef WX_PRECOMP - #include "wx/combobox.h" // wxComboControl + #include "wx/combobox.h" // wxComboCtrl #include "wx/app.h" // wxPostEvent #include "wx/log.h" #endif //WX_PRECOMP @@ -373,7 +373,7 @@ void wxPopupTransientWindow::OnIdle(wxIdleEvent& event) wxPoint pos = ScreenToClient(wxGetMousePosition()); wxRect rect(GetSize()); - if ( rect.Inside(pos) ) + if ( rect.Contains(pos) ) { if ( m_child->HasCapture() ) { @@ -402,13 +402,13 @@ BEGIN_EVENT_TABLE(wxPopupComboWindow, wxPopupTransientWindow) EVT_KEY_DOWN(wxPopupComboWindow::OnKeyDown) END_EVENT_TABLE() -wxPopupComboWindow::wxPopupComboWindow(wxComboControl *parent) +wxPopupComboWindow::wxPopupComboWindow(wxComboCtrl *parent) : wxPopupTransientWindow(parent) { m_combo = parent; } -bool wxPopupComboWindow::Create(wxComboControl *parent) +bool wxPopupComboWindow::Create(wxComboCtrl *parent) { m_combo = parent; @@ -436,7 +436,7 @@ void wxPopupComboWindow::PositionNearCombo() void wxPopupComboWindow::OnDismiss() { - m_combo->OnDismiss(); + m_combo->OnPopupDismiss(); } void wxPopupComboWindow::OnKeyDown(wxKeyEvent& event) @@ -462,10 +462,10 @@ void wxPopupWindowHandler::OnLeftDown(wxMouseEvent& event) wxPoint pos = event.GetPosition(); // in non-Univ ports the system manages scrollbars for us -#ifdef __WXUNIVERSAL__ +#if defined(__WXUNIVERSAL__) && wxUSE_SCROLLBAR // scrollbar on which the click occurred wxWindow *sbar = NULL; -#endif // __WXUNIVERSAL__ +#endif // __WXUNIVERSAL__ && wxUSE_SCROLLBAR wxWindow *win = (wxWindow *)event.GetEventObject(); @@ -498,7 +498,7 @@ void wxPopupWindowHandler::OnLeftDown(wxMouseEvent& event) } break; -#ifdef __WXUNIVERSAL__ +#if defined(__WXUNIVERSAL__) && wxUSE_SCROLLBAR case wxHT_WINDOW_HORZ_SCROLLBAR: sbar = win->GetScrollbar(wxHORIZONTAL); break; @@ -506,7 +506,7 @@ void wxPopupWindowHandler::OnLeftDown(wxMouseEvent& event) case wxHT_WINDOW_VERT_SCROLLBAR: sbar = win->GetScrollbar(wxVERTICAL); break; -#endif // __WXUNIVERSAL__ +#endif // __WXUNIVERSAL__ && wxUSE_SCROLLBAR default: // forgot to update the switch after adding a new hit test code? @@ -523,7 +523,7 @@ void wxPopupWindowHandler::OnLeftDown(wxMouseEvent& event) break; } -#ifdef __WXUNIVERSAL__ +#if defined(__WXUNIVERSAL__) && wxUSE_SCROLLBAR if ( sbar ) { // translate the event coordinates to the scrollbar ones @@ -536,7 +536,7 @@ void wxPopupWindowHandler::OnLeftDown(wxMouseEvent& event) (void)sbar->GetEventHandler()->ProcessEvent(event2); } -#endif // __WXUNIVERSAL__ +#endif // __WXUNIVERSAL__ && wxUSE_SCROLLBAR } // ---------------------------------------------------------------------------- @@ -561,7 +561,7 @@ void wxPopupFocusHandler::OnKillFocus(wxFocusEvent& event) void wxPopupFocusHandler::OnKeyDown(wxKeyEvent& event) { // let the window have it first, it might process the keys - if ( !m_popup->ProcessEvent(event) ) + if ( !m_popup->GetEventHandler()->ProcessEvent(event) ) { // by default, dismiss the popup m_popup->DismissAndNotify();