projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
don't merge msw/it.po with wxstd.pot during 'make allmo', it's manually maintained
[wxWidgets.git]
/
src
/
os2
/
window.cpp
diff --git
a/src/os2/window.cpp
b/src/os2/window.cpp
index d8449e47a028c33ef8582f6e8362ac64d3a2474e..4a631a84520a848d5b4aa7094c52b4ec9edeb564 100644
(file)
--- a/
src/os2/window.cpp
+++ b/
src/os2/window.cpp
@@
-51,6
+51,8
@@
#include <stdio.h>
#endif
#include <stdio.h>
#endif
+#include "wx/os2/dcclient.h"
+
#if wxUSE_OWNER_DRAWN
#include "wx/ownerdrw.h"
#endif
#if wxUSE_OWNER_DRAWN
#include "wx/ownerdrw.h"
#endif
@@
-121,7
+123,7
@@
QMSG s_currentMsg;
#if wxUSE_MENUS_NATIVE
QMSG s_currentMsg;
#if wxUSE_MENUS_NATIVE
-
wxMenu* wxCurrentPopupMenu = NULL
;
+
extern wxMenu* wxCurrentPopupMenu
;
#endif // wxUSE_MENUS_NATIVE
// ---------------------------------------------------------------------------
#endif // wxUSE_MENUS_NATIVE
// ---------------------------------------------------------------------------
@@
-1109,12
+1111,12
@@
void wxWindowOS2::Update()
::WinUpdateWindow(GetHwnd());
} // end of wxWindowOS2::Update
::WinUpdateWindow(GetHwnd());
} // end of wxWindowOS2::Update
-void wxWindowOS2::Freeze()
+void wxWindowOS2::
Do
Freeze()
{
::WinSendMsg(GetHwnd(), WM_VRNDISABLED, (MPARAM)0, (MPARAM)0);
} // end of wxWindowOS2::Freeze
{
::WinSendMsg(GetHwnd(), WM_VRNDISABLED, (MPARAM)0, (MPARAM)0);
} // end of wxWindowOS2::Freeze
-void wxWindowOS2::Thaw()
+void wxWindowOS2::
Do
Thaw()
{
::WinSendMsg(GetHwnd(), WM_VRNENABLED, (MPARAM)TRUE, (MPARAM)0);
{
::WinSendMsg(GetHwnd(), WM_VRNENABLED, (MPARAM)TRUE, (MPARAM)0);
@@
-1784,10
+1786,6
@@
bool wxWindowOS2::DoPopupMenu( wxMenu* pMenu, int nX, int nY )
bool bIsWaiting = true;
int nHeight;
bool bIsWaiting = true;
int nHeight;
- // Protect against recursion
- if (wxCurrentPopupMenu)
- return false;
-
pMenu->SetInvokingWindow(this);
pMenu->UpdateUI();
pMenu->SetInvokingWindow(this);
pMenu->UpdateUI();
@@
-1804,7
+1802,6
@@
bool wxWindowOS2::DoPopupMenu( wxMenu* pMenu, int nX, int nY )
DoGetSize(0,&nHeight);
nY = nHeight - nY;
}
DoGetSize(0,&nHeight);
nY = nHeight - nY;
}
- wxCurrentPopupMenu = pMenu;
::WinPopupMenu( hWndParent
,hWndOwner
::WinPopupMenu( hWndParent
,hWndOwner
@@
-1825,7
+1822,6
@@
bool wxWindowOS2::DoPopupMenu( wxMenu* pMenu, int nX, int nY )
::WinDispatchMsg(vHabmain, (PQMSG)&vMsg);
}
::WinDispatchMsg(vHabmain, (PQMSG)&vMsg);
}
- wxCurrentPopupMenu = NULL;
pMenu->SetInvokingWindow(NULL);
return true;
} // end of wxWindowOS2::DoPopupMenu
pMenu->SetInvokingWindow(NULL);
return true;
} // end of wxWindowOS2::DoPopupMenu
@@
-3206,7
+3202,7
@@
bool wxWindowOS2::OS2OnDrawItem( int vId,
WXDRAWITEMSTRUCT* pItemStruct )
{
#if wxUSE_OWNER_DRAWN
WXDRAWITEMSTRUCT* pItemStruct )
{
#if wxUSE_OWNER_DRAWN
- wx
DC vDc
;
+ wx
ClientDC vDc(this)
;
#if wxUSE_MENUS_NATIVE
//
#if wxUSE_MENUS_NATIVE
//
@@
-3225,8
+3221,10
@@
bool wxWindowOS2::OS2OnDrawItem( int vId,
,pMeasureStruct->rclItem.xRight - pMeasureStruct->rclItem.xLeft
,pMeasureStruct->rclItem.yTop - pMeasureStruct->rclItem.yBottom
);
,pMeasureStruct->rclItem.xRight - pMeasureStruct->rclItem.xLeft
,pMeasureStruct->rclItem.yTop - pMeasureStruct->rclItem.yBottom
);
- vDc.SetHDC( hDC, false );
- vDc.SetHPS( pMeasureStruct->hps );
+
+ wxPMDCImpl *impl = (wxPMDCImpl*) vDc.GetImpl();
+ impl->SetHDC( hDC, false );
+ impl->SetHPS( pMeasureStruct->hps );
//
// Load the wxWidgets Pallete and set to RGB mode
//
//
// Load the wxWidgets Pallete and set to RGB mode
//
@@
-3487,7
+3485,7
@@
void wxWindow::OnPaint (
wxPaintEvent& rEvent
)
{
wxPaintEvent& rEvent
)
{
- HDC hDC = (HDC)wxPaintDC::FindDCInCache((wxWindow*) rEvent.GetEventObject());
+ HDC hDC = (HDC)wxPaintDC
Impl
::FindDCInCache((wxWindow*) rEvent.GetEventObject());
if (hDC != 0)
{
if (hDC != 0)
{
@@
-3672,10
+3670,10
@@
bool wxWindowOS2::HandleEraseBkgnd( WXHDC hDC )
if (vSwp.fl & SWP_MINIMIZE)
return true;
if (vSwp.fl & SWP_MINIMIZE)
return true;
- wx
DC vDC
;
-
- vDC.m_hPS = (HPS)hDC; // this is really a PS
- vDC.SetWindow((wxWindow*)this);
+ wx
ClientDC vDC(this)
;
+ wxPMDCImpl *impl = (wxPMDCImpl*) vDC.GetImpl();
+ impl->SetHDC(hDC);
+ impl->SetHPS((HPS)hDC); // this is really a PS
wxEraseEvent vEvent(m_windowId, &vDC);
wxEraseEvent vEvent(m_windowId, &vDC);
@@
-3683,14
+3681,15
@@
bool wxWindowOS2::HandleEraseBkgnd( WXHDC hDC )
rc = HandleWindowEvent(vEvent);
rc = HandleWindowEvent(vEvent);
-
vDC.m_hPS = NULLHANDLE
;
+
impl->SetHPS(NULLHANDLE)
;
return true;
} // end of wxWindowOS2::HandleEraseBkgnd
void wxWindowOS2::OnEraseBackground(wxEraseEvent& rEvent)
{
RECTL vRect;
return true;
} // end of wxWindowOS2::HandleEraseBkgnd
void wxWindowOS2::OnEraseBackground(wxEraseEvent& rEvent)
{
RECTL vRect;
- HPS hPS = rEvent.GetDC()->GetHPS();
+ wxPMDCImpl *impl = (wxPMDCImpl*) rEvent.GetDC()->GetImpl();
+ HPS hPS = impl->GetHPS();
APIRET rc;
LONG lColor = m_backgroundColour.GetPixel();
APIRET rc;
LONG lColor = m_backgroundColour.GetPixel();