OS/2 fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -182,7 +182,7 @@ void wxStatusBarGeneric::OnPaint(wxPaintEvent& WXUNUSED(event) )
|
|||||||
dc.SetBackgroundMode(wxTRANSPARENT);
|
dc.SetBackgroundMode(wxTRANSPARENT);
|
||||||
|
|
||||||
#ifdef __WXPM__
|
#ifdef __WXPM__
|
||||||
::WinFillRect(vDC.m_hPS, &vDC.m_rclPaint, CLR_GREEN);
|
::WinFillRect(dc.m_hPS, &dc.m_vRclPaint, CLR_GREEN);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for ( i = 0; i < m_nFields; i ++ )
|
for ( i = 0; i < m_nFields; i ++ )
|
||||||
|
@@ -77,10 +77,11 @@ int QueryTextBkColor(
|
|||||||
{
|
{
|
||||||
CHARBUNDLE vCbnd;
|
CHARBUNDLE vCbnd;
|
||||||
|
|
||||||
::GpiQueryAttrs(hPS // presentation-space handle
|
::GpiQueryAttrs( hPS // presentation-space handle
|
||||||
PRIM_CHAR // Char primitive.
|
,PRIM_CHAR // Char primitive.
|
||||||
CBB_BACK_COLOR // Background color.
|
,CBB_BACK_COLOR // Background color.
|
||||||
&vCbnd // buffer for attributes.
|
,&vCbnd // buffer for attributes.
|
||||||
|
);
|
||||||
return vCbnd.lBackColor;
|
return vCbnd.lBackColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -338,7 +339,7 @@ void wxDC::DoDrawLines( int n, wxPoint points[]
|
|||||||
}
|
}
|
||||||
|
|
||||||
void wxDC::DoDrawRectangle(
|
void wxDC::DoDrawRectangle(
|
||||||
wxCoord vS
|
wxCoord vX
|
||||||
, wxCoord vY
|
, wxCoord vY
|
||||||
, wxCoord vWidth
|
, wxCoord vWidth
|
||||||
, wxCoord vHeight
|
, wxCoord vHeight
|
||||||
@@ -348,8 +349,8 @@ void wxDC::DoDrawRectangle(
|
|||||||
|
|
||||||
vPoint[0].x = vX;
|
vPoint[0].x = vX;
|
||||||
vPoint[0].y = vY;
|
vPoint[0].y = vY;
|
||||||
vPoint[1].x = vX + Width;
|
vPoint[1].x = vX + vWidth;
|
||||||
vPoint[1].y = vY - Height; //mustdie !!! ??
|
vPoint[1].y = vY - vHeight; //mustdie !!! ??
|
||||||
|
|
||||||
::GpiMove(m_hPS, &vPoint[0]);
|
::GpiMove(m_hPS, &vPoint[0]);
|
||||||
::GpiBox( m_hPS // handle to a presentation space
|
::GpiBox( m_hPS // handle to a presentation space
|
||||||
@@ -376,11 +377,11 @@ void wxDC::DoDrawRoundedRectangle(
|
|||||||
vPoint[1].y = vY + vHeight; //or -height aka mustdie !!! ??
|
vPoint[1].y = vY + vHeight; //or -height aka mustdie !!! ??
|
||||||
|
|
||||||
::GpiMove(m_hPS, &vPoint[0]);
|
::GpiMove(m_hPS, &vPoint[0]);
|
||||||
::GpiBox( m_hPS // handle to a presentation space
|
::GpiBox( m_hPS // handle to a presentation space
|
||||||
,DRO_OUTLINE // draw the box outline ? or ?
|
,DRO_OUTLINE // draw the box outline ? or ?
|
||||||
,&vPoint[1] // address of the corner
|
,&vPoint[1] // address of the corner
|
||||||
,(LONG)radius // horizontal corner radius
|
,(LONG)dRadius // horizontal corner radius
|
||||||
,(LONG)radius // vertical corner radius
|
,(LONG)dRadius // vertical corner radius
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -617,8 +618,8 @@ void wxDC::SetPen(
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
double dW = 0.5 +
|
double dW = 0.5 +
|
||||||
( fabs((double) XLOG2DEVREL(width)) +
|
( fabs((double) XLOG2DEVREL(nWidth)) +
|
||||||
fabs((double) YLOG2DEVREL(width))
|
fabs((double) YLOG2DEVREL(nWidth))
|
||||||
) / 2.0;
|
) / 2.0;
|
||||||
nWidth = (int)dW;
|
nWidth = (int)dW;
|
||||||
}
|
}
|
||||||
@@ -721,7 +722,7 @@ void wxDC::DoGetTextExtent(
|
|||||||
const wxString& rsString
|
const wxString& rsString
|
||||||
, wxCoord* pvX
|
, wxCoord* pvX
|
||||||
, wxCoord* pvY
|
, wxCoord* pvY
|
||||||
, wxCoord* pvDecent
|
, wxCoord* pvDescent
|
||||||
, wxCoord* pvExternalLeading
|
, wxCoord* pvExternalLeading
|
||||||
, wxFont* pTheFont
|
, wxFont* pTheFont
|
||||||
) const
|
) const
|
||||||
@@ -750,7 +751,7 @@ void wxDC::DoGetTextExtent(
|
|||||||
,pStr
|
,pStr
|
||||||
,TXTBOX_COUNT // return maximum information
|
,TXTBOX_COUNT // return maximum information
|
||||||
,avPoint // array of coordinates points
|
,avPoint // array of coordinates points
|
||||||
)
|
);
|
||||||
if(!bRc)
|
if(!bRc)
|
||||||
{
|
{
|
||||||
vErrorCode = ::WinGetLastError(wxGetInstance());
|
vErrorCode = ::WinGetLastError(wxGetInstance());
|
||||||
@@ -778,7 +779,7 @@ void wxDC::DoGetTextExtent(
|
|||||||
*pvY = (wxCoord)(vPtMax.y - vPtMin.y + 1);
|
*pvY = (wxCoord)(vPtMax.y - vPtMin.y + 1);
|
||||||
if (pvDescent)
|
if (pvDescent)
|
||||||
*pvDescent = vFM.lMaxDescender;
|
*pvDescent = vFM.lMaxDescender;
|
||||||
if (externalLeading)
|
if (pvExternalLeading)
|
||||||
*pvExternalLeading = vFM.lExternalLeading;
|
*pvExternalLeading = vFM.lExternalLeading;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -150,7 +150,7 @@ wxClientDC::wxClientDC(wxWindow *the_canvas)
|
|||||||
m_hDC = (WXHDC) ::WinOpenWindowDC(GetWinHwnd(the_canvas));
|
m_hDC = (WXHDC) ::WinOpenWindowDC(GetWinHwnd(the_canvas));
|
||||||
m_hPS = ::GpiCreatePS( wxGetInstance()
|
m_hPS = ::GpiCreatePS( wxGetInstance()
|
||||||
,m_hDC
|
,m_hDC
|
||||||
,&sizl
|
,&vSizl
|
||||||
,PU_PELS | GPIF_LONG | GPIA_ASSOC
|
,PU_PELS | GPIF_LONG | GPIA_ASSOC
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -208,7 +208,7 @@ wxPaintDC::wxPaintDC(
|
|||||||
wxWindow* pCanvas
|
wxWindow* pCanvas
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
wxCHECK_RET( canvas, wxT("NULL canvas in wxPaintDC ctor") );
|
wxCHECK_RET(pCanvas, wxT("NULL canvas in wxPaintDC ctor"));
|
||||||
|
|
||||||
#ifdef __WXDEBUG__
|
#ifdef __WXDEBUG__
|
||||||
if (g_isPainting <= 0)
|
if (g_isPainting <= 0)
|
||||||
@@ -265,7 +265,7 @@ wxPaintDC::~wxPaintDC()
|
|||||||
if ( !--info->count )
|
if ( !--info->count )
|
||||||
{
|
{
|
||||||
::WinEndPaint(m_hPS);
|
::WinEndPaint(m_hPS);
|
||||||
m_hPS = m_OldhPS;
|
m_hPS = m_hOldPS;
|
||||||
m_bIsPaintTime = FALSE;
|
m_bIsPaintTime = FALSE;
|
||||||
ms_cache.Remove(index);
|
ms_cache.Remove(index);
|
||||||
}
|
}
|
||||||
|
@@ -2861,7 +2861,7 @@ bool wxWindow::HandlePaint()
|
|||||||
//
|
//
|
||||||
#ifdef __WXDEBUG__
|
#ifdef __WXDEBUG__
|
||||||
{
|
{
|
||||||
HWND hWnd
|
HWND hWnd;
|
||||||
HWND hWnd0 = NULLHANDLE;
|
HWND hWnd0 = NULLHANDLE;
|
||||||
|
|
||||||
hWnd = GetHwnd();
|
hWnd = GetHwnd();
|
||||||
@@ -4012,28 +4012,43 @@ static void TranslateKbdEventToMouse(
|
|||||||
|
|
||||||
// Find the wxWindow at the current mouse position, returning the mouse
|
// Find the wxWindow at the current mouse position, returning the mouse
|
||||||
// position.
|
// position.
|
||||||
wxWindow* wxFindWindowAtPointer(wxPoint& pt)
|
wxWindow* wxFindWindowAtPointer(
|
||||||
|
wxPoint& rPt
|
||||||
|
)
|
||||||
{
|
{
|
||||||
return wxFindWindowAtPoint(wxGetMousePosition());
|
return wxFindWindowAtPoint(wxGetMousePosition());
|
||||||
}
|
}
|
||||||
|
|
||||||
wxWindow* wxFindWindowAtPoint(const wxPoint& pt)
|
wxWindow* wxFindWindowAtPoint(
|
||||||
|
const wxPoint& rPt
|
||||||
|
)
|
||||||
{
|
{
|
||||||
POINT pt2;
|
POINTL vPt2;
|
||||||
pt2.x = pt.x;
|
|
||||||
pt2.y = pt.y;
|
|
||||||
HWND hWndHit = ::WindowFromPoint(pt2);
|
|
||||||
|
|
||||||
wxWindow* win = wxFindWinFromHandle((WXHWND) hWndHit) ;
|
vPt2.x = rPt.x;
|
||||||
HWND hWnd = hWndHit;
|
vPt2.y = rPt.y;
|
||||||
|
|
||||||
|
HWND hWndHit = ::WinWindowFromPoint(HWND_DESKTOP, &vPt2, FALSE);
|
||||||
|
wxWindow* pWin = wxFindWinFromHandle((WXHWND)hWndHit) ;
|
||||||
|
HWND hWnd = hWndHit;
|
||||||
|
|
||||||
|
//
|
||||||
// Try to find a window with a wxWindow associated with it
|
// Try to find a window with a wxWindow associated with it
|
||||||
while (!win && (hWnd != 0))
|
//
|
||||||
|
while (!pWin && (hWnd != 0))
|
||||||
{
|
{
|
||||||
hWnd = ::GetParent(hWnd);
|
hWnd = ::WinQueryWindow(hWnd, QW_PARENT);
|
||||||
win = wxFindWinFromHandle((WXHWND) hWnd) ;
|
pWin = wxFindWinFromHandle((WXHWND)hWnd) ;
|
||||||
}
|
}
|
||||||
return win;
|
return pWin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get the current mouse position.
|
||||||
|
wxPoint wxGetMousePosition()
|
||||||
|
{
|
||||||
|
POINTL vPt;
|
||||||
|
|
||||||
|
::WinQueryPointerPos(HWND_DESKTOP, &vPt);
|
||||||
|
return wxPoint(vPt.x, vPt.y);
|
||||||
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user