Minor header cleaning.
[wxWidgets.git] / src / common / popupcmn.cpp
index 788e0bdffe933a528c6edd409bc5cfb4213ca148..d0a3534f37500fd1ee8ec719c5ede2de0bed9616 100644 (file)
@@ -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();