// ----------------------------------------------------------------------------
#ifdef __GNUG__
- #pragma implementation "popupwin.h"
+ #pragma implementation "popupwinbase.h"
#endif
// For compilers that support precompilation, includes "wx.h".
#pragma hdrstop
#endif
-#if wxUSE_POPUPWIN
+#if wxUSE_POPUPWIN && !defined(__WXMOTIF__)
#include "wx/popupwin.h"
m_focus = (wxWindow *)NULL;
}
-wxPopupTransientWindow::wxPopupTransientWindow(wxWindow *parent)
+wxPopupTransientWindow::wxPopupTransientWindow(wxWindow *parent, int style)
{
Init();
- (void)Create(parent);
+ (void)Create(parent, style);
}
wxPopupTransientWindow::~wxPopupTransientWindow()
m_child = this;
}
+ // we can't capture mouse before the window is shown in wxGTL
+#ifdef __WXGTK__
+ Show();
+#endif
+
m_child->CaptureMouse();
m_child->PushEventHandler(new wxPopupWindowHandler(this));
+#ifndef __WXGTK__
Show();
+#endif
m_focus = winFocus ? winFocus : this;
m_focus->PushEventHandler(new wxPopupFocusHandler(this));
return FALSE;
}
-#if wxUSE_COMBOBOX
+#if wxUSE_COMBOBOX && defined(__WXUNIVERSAL__)
// ----------------------------------------------------------------------------
// wxPopupComboWindow
// the origin point must be in screen coords
wxPoint ptOrigin = m_combo->ClientToScreen(wxPoint(0, 0));
-#ifdef __WXUNIVERSAL__
+#if 0 //def __WXUNIVERSAL__
// account for the fact that (0, 0) is not the top left corner of the
// window: there is also the border
wxRect rectBorders = m_combo->GetRenderer()->
m_combo->OnDismiss();
}
-#endif // wxUSE_COMBOBOX
+#endif // wxUSE_COMBOBOX && defined(__WXUNIVERSAL__)
// ----------------------------------------------------------------------------
// wxPopupWindowHandler
m_popup->DismissAndNotify();
break;
+#ifdef __WXUNIVERSAL__
case wxHT_WINDOW_HORZ_SCROLLBAR:
sbar = win->GetScrollbar(wxHORIZONTAL);
break;
case wxHT_WINDOW_VERT_SCROLLBAR:
sbar = win->GetScrollbar(wxVERTICAL);
break;
+#endif
default:
// forgot to update the switch after adding a new hit test code?