]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/popupcmn.cpp
copyright update
[wxWidgets.git] / src / common / popupcmn.cpp
index 5a4d032d167bfe1f4f03408098b0be8b918ed380..ff6d0c08181a466027c0f28a38cd5ef88a73d87e 100644 (file)
     #include "wx/univ/renderer.h"
 #endif // __WXUNIVERSAL__
 
+// there is no src/msw/popupwin.cpp to put this in, so we do it here - BTW we
+// probably could do it for all ports here just as well
+#ifdef __WXMSW__
+    IMPLEMENT_DYNAMIC_CLASS(wxPopupWindow, wxWindow)
+#endif // __WXMSW__
+
+IMPLEMENT_DYNAMIC_CLASS(wxPopupTransientWindow, wxPopupWindow)
+
+#if wxUSE_COMBOBOX && defined(__WXUNIVERSAL__)
+    IMPLEMENT_DYNAMIC_CLASS(wxPopupComboWindow, wxPopupTransientWindow)
+#endif
+
 // ----------------------------------------------------------------------------
 // private classes
 // ----------------------------------------------------------------------------
@@ -147,11 +159,11 @@ void wxPopupTransientWindow::Init()
     m_focus = (wxWindow *)NULL;
 }
 
-wxPopupTransientWindow::wxPopupTransientWindow(wxWindow *parent)
+wxPopupTransientWindow::wxPopupTransientWindow(wxWindow *parent, int style)
 {
     Init();
 
-    (void)Create(parent);
+    (void)Create(parent, style);
 }
 
 wxPopupTransientWindow::~wxPopupTransientWindow()
@@ -229,7 +241,7 @@ bool wxPopupTransientWindow::ProcessLeftDown(wxMouseEvent& WXUNUSED(event))
     return FALSE;
 }
 
-#if wxUSE_COMBOBOX
+#if wxUSE_COMBOBOX && defined(__WXUNIVERSAL__)
 
 // ----------------------------------------------------------------------------
 // wxPopupComboWindow
@@ -272,7 +284,7 @@ void wxPopupComboWindow::OnDismiss()
     m_combo->OnDismiss();
 }
 
-#endif // wxUSE_COMBOBOX
+#endif // wxUSE_COMBOBOX && defined(__WXUNIVERSAL__)
 
 // ----------------------------------------------------------------------------
 // wxPopupWindowHandler
@@ -300,6 +312,7 @@ void wxPopupWindowHandler::OnLeftDown(wxMouseEvent& event)
             m_popup->DismissAndNotify();
             break;
 
+#ifdef __WXUNIVERSAL__
         case wxHT_WINDOW_HORZ_SCROLLBAR:
             sbar = win->GetScrollbar(wxHORIZONTAL);
             break;
@@ -307,6 +320,7 @@ void wxPopupWindowHandler::OnLeftDown(wxMouseEvent& event)
         case wxHT_WINDOW_VERT_SCROLLBAR:
             sbar = win->GetScrollbar(wxVERTICAL);
             break;
+#endif
 
         default:
             // forgot to update the switch after adding a new hit test code?
@@ -352,3 +366,4 @@ void wxPopupFocusHandler::OnKillFocus(wxFocusEvent& event)
 }
 
 #endif // wxUSE_POPUPWIN
+