]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/popupwin.cpp
don't use deprecated toolbar API
[wxWidgets.git] / src / os2 / popupwin.cpp
index adc25e8f9cd7142de923794044823755e0d2629d..346d6c87d4009fc11e6a24bca51c72584cfc46f5 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     13.05.02
 // RCS-ID:      $Id$
 // Copyright:   (c) 2002 Dave Webster <dwebster@bhmi.com>
-// License:     wxWindows license
+// License:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
 
 // ============================================================================
 // headers
 // ----------------------------------------------------------------------------
 
-#ifdef __GNUG__
-    #pragma implementation "popup.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 #ifndef WX_PRECOMP
 #endif //WX_PRECOMP
 
+#if wxUSE_POPUPWIN
 #include "wx/popupwin.h"
 
 // ============================================================================
 // implementation
 // ============================================================================
 
-bool wxPopupWindow::Create(
-  wxWindow*                         pParent
-, int                               nFlags
-)
+bool wxPopupWindow::Create( wxWindow* pParent,
+                            int nFlags )
 {
     return wxPopupWindowBase::Create(pParent) &&
                     wxWindow::Create( pParent
@@ -48,10 +43,8 @@ bool wxPopupWindow::Create(
                                     );
 } // end of wxPopupWindow::Create
 
-void wxPopupWindow::DoGetPosition(
-  int*                              pnX
-, int*                              pnY
-) const
+void wxPopupWindow::DoGetPosition( int* pnX,
+                                   int* pnY ) const
 {
     //
     // The position of a "top level" window such as this should be in
@@ -62,15 +55,21 @@ void wxPopupWindow::DoGetPosition(
     GetParent()->ClientToScreen(pnX, pnY);
 } // end of wxPopupWindow::DoGetPosition
 
-WXDWORD wxPopupWindow::OS2GetStyle(
-  long                              lFlags
-, WXDWORD*                          dwExstyle
-) const
+WXHWND wxPopupWindow::OS2GetParent() const
 {
-    WXDWORD                         dwStyle = wxWindow::OS2GetStyle( lFlags & wxBORDER_MASK
-                                                                    ,dwExstyle
-                                                                   );
+    // we must be a child of the desktop to be able to extend beyond the parent
+    // window client area (like the comboboxes drop downs do)
+    //
+    return (WXHWND)HWND_DESKTOP;
+} // end of wxPopupWindow::OS2GetParent
+
+WXDWORD wxPopupWindow::OS2GetStyle( long lFlags,
+                                    WXDWORD* dwExstyle ) const
+{
+    WXDWORD dwStyle = wxWindow::OS2GetStyle( lFlags & wxBORDER_MASK
+                                             ,dwExstyle
+                                           );
 
     return dwStyle;
 } // end of wxPopupWindow::OS2GetStyle
-
+#endif