projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
correction to last commit: Korean and Romanian translations will only be in 2.9.1...
[wxWidgets.git]
/
src
/
os2
/
window.cpp
diff --git
a/src/os2/window.cpp
b/src/os2/window.cpp
index c1ec1c18f648ae9409413d80e9f456e81f52c50b..36548384d62cf83104383464598a4ee6a5f7662f 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
// ---------------------------------------------------------------------------
@@
-332,7
+334,7
@@
void wxWindowOS2::Init()
//
wxWindowOS2::~wxWindowOS2()
{
//
wxWindowOS2::~wxWindowOS2()
{
-
m_isBeingDeleted = true
;
+
SendDestroyEvent()
;
for (wxWindow* pWin = GetParent(); pWin; pWin = pWin->GetParent())
{
for (wxWindow* pWin = GetParent(); pWin; pWin = pWin->GetParent())
{
@@
-543,7
+545,7
@@
void wxWindowOS2::DoReleaseMouse()
/* static */ wxWindow* wxWindowBase::GetCapture()
{
HWND hwnd = ::WinQueryCapture(HWND_DESKTOP);
/* static */ wxWindow* wxWindowBase::GetCapture()
{
HWND hwnd = ::WinQueryCapture(HWND_DESKTOP);
- return hwnd ? wxFindWinFromHandle((WXHWND)hwnd) :
(wxWindow *)
NULL;
+ return hwnd ? wxFindWinFromHandle((WXHWND)hwnd) : NULL;
} // end of wxWindowBase::GetCapture
bool wxWindowOS2::SetFont( const wxFont& rFont )
} // end of wxWindowBase::GetCapture
bool wxWindowOS2::SetFont( const wxFont& rFont )
@@
-1092,7
+1094,7
@@
void wxWindowOS2::OnIdle(
//
// Set this window to be the child of 'parent'.
//
//
// Set this window to be the child of 'parent'.
//
-bool wxWindowOS2::Reparent( wxWindow* pParent)
+bool wxWindowOS2::Reparent( wxWindow
Base
* pParent)
{
if (!wxWindowBase::Reparent(pParent))
return false;
{
if (!wxWindowBase::Reparent(pParent))
return false;
@@
-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();
@@
-2550,7
+2548,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);
- wx
Notebook
Event vEvent( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED
+ wx
BookCtrl
Event vEvent( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED
,(int)SHORT1FROMMP(wParam)
,(int)pPage->ulPageIdNew
,(int)pPage->ulPageIdCur
,(int)SHORT1FROMMP(wParam)
,(int)pPage->ulPageIdNew
,(int)pPage->ulPageIdCur
@@
-3204,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
//
@@
-3223,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
//
@@
-3485,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)
{
@@
-3670,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);
@@
-3681,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();