]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/window.cpp
Add doc for wxGraphicsContext.Create(), which is a lightweight context with no target...
[wxWidgets.git] / src / os2 / window.cpp
index 240666554d3979560a9e6583ad40f33ceadea7b8..014b8f7bfe0817e93b625886ffa577a6d5741c9e 100644 (file)
@@ -170,9 +170,7 @@ static wxWindow*                    gpWinBeingCreated = NULL;
 // method
 #ifdef __WXUNIVERSAL__
     IMPLEMENT_ABSTRACT_CLASS(wxWindowOS2, wxWindowBase)
 // method
 #ifdef __WXUNIVERSAL__
     IMPLEMENT_ABSTRACT_CLASS(wxWindowOS2, wxWindowBase)
-#else // __WXPM__
-    IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxWindowBase)
-#endif // __WXUNIVERSAL__/__WXPM__
+#endif // __WXUNIVERSAL__
 
 BEGIN_EVENT_TABLE(wxWindowOS2, wxWindowBase)
     EVT_ERASE_BACKGROUND(wxWindowOS2::OnEraseBackground)
 
 BEGIN_EVENT_TABLE(wxWindowOS2, wxWindowBase)
     EVT_ERASE_BACKGROUND(wxWindowOS2::OnEraseBackground)
@@ -573,7 +571,7 @@ bool wxWindowOS2::SetCursor( const wxCursor& rCursor)
         return false;
     }
 
         return false;
     }
 
-    if ( m_cursor.Ok() ) {
+    if ( m_cursor.IsOk() ) {
         HWND                            hWnd = GetHwnd();
         POINTL                          vPoint;
         RECTL                           vRect;
         HWND                            hWnd = GetHwnd();
         POINTL                          vPoint;
         RECTL                           vRect;
@@ -1089,8 +1087,6 @@ void wxWindowOS2::OnIdle(
             (void)HandleWindowEvent(rEvent);
         }
     }
             (void)HandleWindowEvent(rEvent);
         }
     }
-    if (wxUpdateUIEvent::CanUpdate(this))
-        UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
 } // end of wxWindowOS2::OnIdle
 
 //
 } // end of wxWindowOS2::OnIdle
 
 //
@@ -1255,7 +1251,7 @@ void wxWindowOS2::DoGetPosition(
     // use WinQueryWindowPos.  This call, unlike the WIN32 call, however,
     // returns a position relative to it's parent, so no parent adujstments
     // are needed under OS/2.  Also, windows should be created using
     // use WinQueryWindowPos.  This call, unlike the WIN32 call, however,
     // returns a position relative to it's parent, so no parent adujstments
     // are needed under OS/2.  Also, windows should be created using
-    // wxWindow coordinates, i.e 0,0 is the TOP left.
+    // wxWindow coordinates, i.e. 0,0 is the TOP left.
     //
     if (IsKindOf(CLASSINFO(wxFrame)))
     {
     //
     if (IsKindOf(CLASSINFO(wxFrame)))
     {
@@ -1788,7 +1784,6 @@ bool wxWindowOS2::DoPopupMenu( wxMenu* pMenu, int nX, int nY )
     bool bIsWaiting = true;
     int nHeight;
 
     bool bIsWaiting = true;
     int nHeight;
 
-    pMenu->SetInvokingWindow(this);
     pMenu->UpdateUI();
 
     if ( nX == -1 && nY == -1 )
     pMenu->UpdateUI();
 
     if ( nX == -1 && nY == -1 )
@@ -1824,7 +1819,6 @@ bool wxWindowOS2::DoPopupMenu( wxMenu* pMenu, int nX, int nY )
         ::WinDispatchMsg(vHabmain, (PQMSG)&vMsg);
     }
 
         ::WinDispatchMsg(vHabmain, (PQMSG)&vMsg);
     }
 
-    pMenu->SetInvokingWindow(NULL);
     return true;
 } // end of wxWindowOS2::DoPopupMenu
 #endif // wxUSE_MENUS_NATIVE
     return true;
 } // end of wxWindowOS2::DoPopupMenu
 #endif // wxUSE_MENUS_NATIVE
@@ -2550,7 +2544,7 @@ MRESULT wxWindowOS2::OS2WindowProc( WXUINT uMsg,
                             (pPage->ulPageIdNew > 0L && pPage->ulPageIdCur > 0L))
                         {
                             wxWindowOS2*        pWin = wxFindWinFromHandle(pPage->hwndBook);
                             (pPage->ulPageIdNew > 0L && pPage->ulPageIdCur > 0L))
                         {
                             wxWindowOS2*        pWin = wxFindWinFromHandle(pPage->hwndBook);
-                            wxBookCtrlEvent     vEvent( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED
+                            wxBookCtrlEvent     vEvent( wxEVT_NOTEBOOK_PAGE_CHANGED
                                                        ,(int)SHORT1FROMMP(wParam)
                                                        ,(int)pPage->ulPageIdNew
                                                        ,(int)pPage->ulPageIdCur
                                                        ,(int)SHORT1FROMMP(wParam)
                                                        ,(int)pPage->ulPageIdNew
                                                        ,(int)pPage->ulPageIdCur
@@ -3040,11 +3034,7 @@ bool wxWindowOS2::HandleDestroy()
     // Delete our drop target if we've got one
     //
 #if wxUSE_DRAG_AND_DROP
     // Delete our drop target if we've got one
     //
 #if wxUSE_DRAG_AND_DROP
-    if (m_dropTarget != NULL)
-    {
-        delete m_dropTarget;
-        m_dropTarget = NULL;
-    }
+    wxDELETE(m_dropTarget);
 #endif // wxUSE_DRAG_AND_DROP
 
     //
 #endif // wxUSE_DRAG_AND_DROP
 
     //
@@ -3224,7 +3214,7 @@ bool wxWindowOS2::OS2OnDrawItem( int vId,
                                           ,pMeasureStruct->rclItem.yTop - pMeasureStruct->rclItem.yBottom
                                          );
 
                                           ,pMeasureStruct->rclItem.yTop - pMeasureStruct->rclItem.yBottom
                                          );
 
-       wxPMDCImpl *impl = (wxPMDCImpl*) vDc.GetImpl();
+        wxPMDCImpl *impl = (wxPMDCImpl*) vDc.GetImpl();
         impl->SetHDC( hDC, false );
         impl->SetHPS( pMeasureStruct->hps );
         //
         impl->SetHDC( hDC, false );
         impl->SetHPS( pMeasureStruct->hps );
         //