#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
wxPoint pos = ScreenToClient(wxGetMousePosition());
wxRect rect(GetSize());
- if ( rect.Inside(pos) )
+ if ( rect.Contains(pos) )
{
if ( m_child->HasCapture() )
{
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;
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();
}
break;
-#ifdef __WXUNIVERSAL__
+#if defined(__WXUNIVERSAL__) && wxUSE_SCROLLBAR
case wxHT_WINDOW_HORZ_SCROLLBAR:
sbar = win->GetScrollbar(wxHORIZONTAL);
break;
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?
break;
}
-#ifdef __WXUNIVERSAL__
+#if defined(__WXUNIVERSAL__) && wxUSE_SCROLLBAR
if ( sbar )
{
// translate the event coordinates to the scrollbar ones
(void)sbar->GetEventHandler()->ProcessEvent(event2);
}
-#endif // __WXUNIVERSAL__
+#endif // __WXUNIVERSAL__ && wxUSE_SCROLLBAR
}
// ----------------------------------------------------------------------------