Updated info about missing parts in OW headers (now reported and fixed for incoming OW 1.4) and further source cleaning.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -774,8 +774,9 @@ void wxDC::DoDrawArc(
|
|||||||
vPtlArc[0].y = vYm;
|
vPtlArc[0].y = vYm;
|
||||||
vPtlArc[1].x = vX2;
|
vPtlArc[1].x = vX2;
|
||||||
vPtlArc[1].y = vY2;
|
vPtlArc[1].y = vY2;
|
||||||
#ifndef __WATCOMC__
|
#if !(defined(__WATCOMC__) && __WATCOMC__ < 1240 )
|
||||||
// FIXME: incomplete headers ???
|
// Open Watcom 1.3 had incomplete headers
|
||||||
|
// that's reported and should be fixed for OW 1.4
|
||||||
::GpiPointArc(m_hPS, vPtlArc); // Draws the arc
|
::GpiPointArc(m_hPS, vPtlArc); // Draws the arc
|
||||||
#endif
|
#endif
|
||||||
CalcBoundingBox( (wxCoord)(vXc - dRadius)
|
CalcBoundingBox( (wxCoord)(vXc - dRadius)
|
||||||
@@ -2364,10 +2365,8 @@ void wxDC::SetMapMode(
|
|||||||
// ????
|
// ????
|
||||||
}; // end of wxDC::SetMapMode
|
}; // end of wxDC::SetMapMode
|
||||||
|
|
||||||
void wxDC::SetUserScale(
|
void wxDC::SetUserScale( double dX,
|
||||||
double dX
|
double dY )
|
||||||
, double dY
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
m_userScaleX = dX;
|
m_userScaleX = dX;
|
||||||
m_userScaleY = dY;
|
m_userScaleY = dY;
|
||||||
@@ -2375,10 +2374,8 @@ void wxDC::SetUserScale(
|
|||||||
SetMapMode(m_mappingMode);
|
SetMapMode(m_mappingMode);
|
||||||
} // end of wxDC::SetUserScale
|
} // end of wxDC::SetUserScale
|
||||||
|
|
||||||
void wxDC::SetAxisOrientation(
|
void wxDC::SetAxisOrientation( bool bXLeftRight,
|
||||||
bool bXLeftRight
|
bool bYBottomUp )
|
||||||
, bool bYBottomUp
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
m_signX = bXLeftRight ? 1 : -1;
|
m_signX = bXLeftRight ? 1 : -1;
|
||||||
m_signY = bYBottomUp ? -1 : 1;
|
m_signY = bYBottomUp ? -1 : 1;
|
||||||
|
@@ -83,7 +83,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxWindow)
|
|||||||
#if wxUSE_NATIVE_STATUSBAR
|
#if wxUSE_NATIVE_STATUSBAR
|
||||||
bool wxFrame::m_bUseNativeStatusBar = true;
|
bool wxFrame::m_bUseNativeStatusBar = true;
|
||||||
#else
|
#else
|
||||||
bool wxFrame::m_bUseNativeStatusBar = FALSE;
|
bool wxFrame::m_bUseNativeStatusBar = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif //wxUSE_STATUSBAR
|
#endif //wxUSE_STATUSBAR
|
||||||
@@ -98,7 +98,7 @@ void wxFrame::Init()
|
|||||||
m_nFsStatusBarHeight = 0;
|
m_nFsStatusBarHeight = 0;
|
||||||
m_nFsToolBarHeight = 0;
|
m_nFsToolBarHeight = 0;
|
||||||
m_hWndToolTip = 0L;
|
m_hWndToolTip = 0L;
|
||||||
m_bWasMinimized = FALSE;
|
m_bWasMinimized = false;
|
||||||
|
|
||||||
|
|
||||||
m_frameMenuBar = NULL;
|
m_frameMenuBar = NULL;
|
||||||
@@ -118,7 +118,7 @@ void wxFrame::Init()
|
|||||||
memset(&m_vSwpVScroll, 0, sizeof(SWP));
|
memset(&m_vSwpVScroll, 0, sizeof(SWP));
|
||||||
memset(&m_vSwpStatusBar, 0, sizeof(SWP));
|
memset(&m_vSwpStatusBar, 0, sizeof(SWP));
|
||||||
memset(&m_vSwpToolBar, 0, sizeof(SWP));
|
memset(&m_vSwpToolBar, 0, sizeof(SWP));
|
||||||
m_bIconized = FALSE;
|
m_bIconized = false;
|
||||||
|
|
||||||
} // end of wxFrame::Init
|
} // end of wxFrame::Init
|
||||||
|
|
||||||
@@ -236,9 +236,9 @@ wxStatusBar* wxFrame::OnCreateStatusBar(
|
|||||||
|
|
||||||
int nHeight = ((11 * nY) / 10 + 2 * pStatusBar->GetBorderY());
|
int nHeight = ((11 * nY) / 10 + 2 * pStatusBar->GetBorderY());
|
||||||
|
|
||||||
pStatusBar->SetSize( -1
|
pStatusBar->SetSize( wxDefaultCoord
|
||||||
,-1
|
,wxDefaultCoord
|
||||||
,-1
|
,wxDefaultCoord
|
||||||
,nHeight
|
,nHeight
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -480,7 +480,7 @@ bool wxFrame::ShowFullScreen( bool bShow, long lStyle )
|
|||||||
if (bShow)
|
if (bShow)
|
||||||
{
|
{
|
||||||
if (IsFullScreen())
|
if (IsFullScreen())
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
m_bFsIsShowing = true;
|
m_bFsIsShowing = true;
|
||||||
m_lFsStyle = lStyle;
|
m_lFsStyle = lStyle;
|
||||||
@@ -511,8 +511,8 @@ bool wxFrame::ShowFullScreen( bool bShow, long lStyle )
|
|||||||
//
|
//
|
||||||
if ((lStyle & wxFULLSCREEN_NOTOOLBAR) && pTheToolBar)
|
if ((lStyle & wxFULLSCREEN_NOTOOLBAR) && pTheToolBar)
|
||||||
{
|
{
|
||||||
pTheToolBar->SetSize(-1,0);
|
pTheToolBar->SetSize(wxDefaultCoord,0);
|
||||||
pTheToolBar->Show(FALSE);
|
pTheToolBar->Show(false);
|
||||||
}
|
}
|
||||||
#endif //wxUSE_TOOLBAR
|
#endif //wxUSE_TOOLBAR
|
||||||
|
|
||||||
@@ -619,7 +619,7 @@ bool wxFrame::ShowFullScreen( bool bShow, long lStyle )
|
|||||||
//
|
//
|
||||||
if (pTheToolBar && (m_lFsStyle & wxFULLSCREEN_NOTOOLBAR))
|
if (pTheToolBar && (m_lFsStyle & wxFULLSCREEN_NOTOOLBAR))
|
||||||
{
|
{
|
||||||
pTheToolBar->SetSize(-1, m_nFsToolBarHeight);
|
pTheToolBar->SetSize(wxDefaultCoord, m_nFsToolBarHeight);
|
||||||
pTheToolBar->Show(true);
|
pTheToolBar->Show(true);
|
||||||
}
|
}
|
||||||
#endif //wxUSE_TOOLBAR
|
#endif //wxUSE_TOOLBAR
|
||||||
@@ -817,9 +817,7 @@ WXHICON wxFrame::GetDefaultIcon() const
|
|||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// preprocessing
|
// preprocessing
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
bool wxFrame::OS2TranslateMessage(
|
bool wxFrame::OS2TranslateMessage( WXMSG* pMsg )
|
||||||
WXMSG* pMsg
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// try the menu bar accels
|
// try the menu bar accels
|
||||||
@@ -827,13 +825,13 @@ bool wxFrame::OS2TranslateMessage(
|
|||||||
wxMenuBar* pMenuBar = GetMenuBar();
|
wxMenuBar* pMenuBar = GetMenuBar();
|
||||||
|
|
||||||
if (!pMenuBar)
|
if (!pMenuBar)
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
#if wxUSE_ACCEL && wxUSE_MENUS_NATIVE
|
#if wxUSE_ACCEL && wxUSE_MENUS_NATIVE
|
||||||
const wxAcceleratorTable& rAcceleratorTable = pMenuBar->GetAccelTable();
|
const wxAcceleratorTable& rAcceleratorTable = pMenuBar->GetAccelTable();
|
||||||
return rAcceleratorTable.Translate(GetHWND(), pMsg);
|
return rAcceleratorTable.Translate(GetHWND(), pMsg);
|
||||||
#else
|
#else
|
||||||
return FALSE;
|
return false;
|
||||||
#endif //wxUSE_ACCEL
|
#endif //wxUSE_ACCEL
|
||||||
} // end of wxFrame::OS2TranslateMessage
|
} // end of wxFrame::OS2TranslateMessage
|
||||||
|
|
||||||
@@ -877,8 +875,9 @@ bool wxFrame::HandlePaint()
|
|||||||
|
|
||||||
::WinQueryWindowRect(GetHwnd(), &vRect3);
|
::WinQueryWindowRect(GetHwnd(), &vRect3);
|
||||||
|
|
||||||
#ifndef __WATCOMC__
|
#if !(defined(__WATCOMC__) && __WATCOMC__ < 1240 )
|
||||||
// FIXME: incomplete headers ???
|
// Open Watcom 1.3 had incomplete headers
|
||||||
|
// that's reported and should be fixed for OW 1.4
|
||||||
|
|
||||||
static const int nIconWidth = 32;
|
static const int nIconWidth = 32;
|
||||||
static const int nIconHeight = 32;
|
static const int nIconHeight = 32;
|
||||||
@@ -931,13 +930,9 @@ bool wxFrame::HandlePaint()
|
|||||||
return true;
|
return true;
|
||||||
} // end of wxFrame::HandlePaint
|
} // end of wxFrame::HandlePaint
|
||||||
|
|
||||||
bool wxFrame::HandleSize(
|
bool wxFrame::HandleSize( int nX, int nY, WXUINT nId )
|
||||||
int nX
|
|
||||||
, int nY
|
|
||||||
, WXUINT nId
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
bool bProcessed = FALSE;
|
bool bProcessed = false;
|
||||||
|
|
||||||
switch (nId)
|
switch (nId)
|
||||||
{
|
{
|
||||||
@@ -952,22 +947,22 @@ bool wxFrame::HandleSize(
|
|||||||
//
|
//
|
||||||
// restore all child frames too
|
// restore all child frames too
|
||||||
//
|
//
|
||||||
IconizeChildFrames(FALSE);
|
IconizeChildFrames(false);
|
||||||
(void)SendIconizeEvent(FALSE);
|
(void)SendIconizeEvent(false);
|
||||||
|
|
||||||
//
|
//
|
||||||
// fall through
|
// fall through
|
||||||
//
|
//
|
||||||
|
|
||||||
case kSizeMax:
|
case kSizeMax:
|
||||||
m_bIconized = FALSE;
|
m_bIconized = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kSizeMin:
|
case kSizeMin:
|
||||||
//
|
//
|
||||||
// Iconize all child frames too
|
// Iconize all child frames too
|
||||||
//
|
//
|
||||||
IconizeChildFrames(TRUE);
|
IconizeChildFrames(true);
|
||||||
(void)SendIconizeEvent();
|
(void)SendIconizeEvent();
|
||||||
m_bIconized = true;
|
m_bIconized = true;
|
||||||
break;
|
break;
|
||||||
@@ -1044,11 +1039,9 @@ bool wxFrame::HandleCommand( WXWORD nId,
|
|||||||
return false;
|
return false;
|
||||||
} // end of wxFrame::HandleCommand
|
} // end of wxFrame::HandleCommand
|
||||||
|
|
||||||
bool wxFrame::HandleMenuSelect(
|
bool wxFrame::HandleMenuSelect( WXWORD nItem,
|
||||||
WXWORD nItem
|
WXWORD nFlags,
|
||||||
, WXWORD nFlags
|
WXHMENU hMenu )
|
||||||
, WXHMENU hMenu
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if( !nFlags )
|
if( !nFlags )
|
||||||
{
|
{
|
||||||
@@ -1066,25 +1059,23 @@ bool wxFrame::HandleMenuSelect(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DoGiveHelp(wxEmptyString, FALSE);
|
DoGiveHelp(wxEmptyString, false);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
} // end of wxFrame::HandleMenuSelect
|
} // end of wxFrame::HandleMenuSelect
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Main Frame window proc
|
// Main Frame window proc
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
MRESULT EXPENTRY wxFrameMainWndProc(
|
MRESULT EXPENTRY wxFrameMainWndProc( HWND hWnd,
|
||||||
HWND hWnd
|
ULONG ulMsg,
|
||||||
, ULONG ulMsg
|
MPARAM wParam,
|
||||||
, MPARAM wParam
|
MPARAM lParam )
|
||||||
, MPARAM lParam
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
MRESULT rc = (MRESULT)0;
|
MRESULT rc = (MRESULT)0;
|
||||||
bool bProcessed = FALSE;
|
bool bProcessed = false;
|
||||||
wxFrame* pWnd = NULL;
|
wxFrame* pWnd = NULL;
|
||||||
|
|
||||||
pWnd = (wxFrame*) wxFindWinFromHandle((WXHWND) hWnd);
|
pWnd = (wxFrame*) wxFindWinFromHandle((WXHWND) hWnd);
|
||||||
@@ -1155,7 +1146,7 @@ MRESULT EXPENTRY wxFrameMainWndProc(
|
|||||||
pSWP[i].hwndInsertBehind = HWND_TOP;
|
pSWP[i].hwndInsertBehind = HWND_TOP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bProcessed = TRUE;
|
bProcessed = true;
|
||||||
rc = MRFROMSHORT(nItemCount);
|
rc = MRFROMSHORT(nItemCount);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -1211,14 +1202,12 @@ MRESULT EXPENTRY wxFrameWndProc(
|
|||||||
return rc;
|
return rc;
|
||||||
} // end of wxFrameWndProc
|
} // end of wxFrameWndProc
|
||||||
|
|
||||||
MRESULT wxFrame::OS2WindowProc(
|
MRESULT wxFrame::OS2WindowProc( WXUINT uMessage,
|
||||||
WXUINT uMessage
|
WXWPARAM wParam,
|
||||||
, WXWPARAM wParam
|
WXLPARAM lParam )
|
||||||
, WXLPARAM lParam
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
MRESULT mRc = 0L;
|
MRESULT mRc = 0L;
|
||||||
bool bProcessed = FALSE;
|
bool bProcessed = false;
|
||||||
|
|
||||||
switch (uMessage)
|
switch (uMessage)
|
||||||
{
|
{
|
||||||
@@ -1327,9 +1316,7 @@ void wxFrame::SetClient(WXHWND WXUNUSED(c_Hwnd))
|
|||||||
// Duh...nothing to do under OS/2
|
// Duh...nothing to do under OS/2
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFrame::SetClient(
|
void wxFrame::SetClient( wxWindow* pWindow )
|
||||||
wxWindow* pWindow
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
wxWindow* pOldClient = this->GetClient();
|
wxWindow* pOldClient = this->GetClient();
|
||||||
bool bClientHasFocus = pOldClient && (pOldClient == wxWindow::FindFocus());
|
bool bClientHasFocus = pOldClient && (pOldClient == wxWindow::FindFocus());
|
||||||
@@ -1344,8 +1331,8 @@ void wxFrame::SetClient(
|
|||||||
if(bClientHasFocus )
|
if(bClientHasFocus )
|
||||||
this->SetFocus();
|
this->SetFocus();
|
||||||
|
|
||||||
pOldClient->Enable( FALSE );
|
pOldClient->Enable( false );
|
||||||
pOldClient->Show( FALSE );
|
pOldClient->Show( false );
|
||||||
::WinSetWindowUShort(pOldClient->GetHWND(), QWS_ID, (USHORT)pOldClient->GetId());
|
::WinSetWindowUShort(pOldClient->GetHWND(), QWS_ID, (USHORT)pOldClient->GetId());
|
||||||
// to avoid OS/2 bug need to update frame
|
// to avoid OS/2 bug need to update frame
|
||||||
::WinSendMsg((HWND)this->GetFrame(), WM_UPDATEFRAME, (MPARAM)~0, 0);
|
::WinSendMsg((HWND)this->GetFrame(), WM_UPDATEFRAME, (MPARAM)~0, 0);
|
||||||
@@ -1361,8 +1348,8 @@ void wxFrame::SetClient(
|
|||||||
::WinEnableWindowUpdate((HWND)GetHWND(), FALSE);
|
::WinEnableWindowUpdate((HWND)GetHWND(), FALSE);
|
||||||
if(pOldClient)
|
if(pOldClient)
|
||||||
{
|
{
|
||||||
pOldClient->Enable(FALSE);
|
pOldClient->Enable(false);
|
||||||
pOldClient->Show(FALSE);
|
pOldClient->Show(false);
|
||||||
::WinSetWindowUShort(pOldClient->GetHWND(), QWS_ID, (USHORT)pOldClient->GetId());
|
::WinSetWindowUShort(pOldClient->GetHWND(), QWS_ID, (USHORT)pOldClient->GetId());
|
||||||
}
|
}
|
||||||
pWindow->Reparent(this);
|
pWindow->Reparent(this);
|
||||||
|
@@ -51,26 +51,22 @@ void wxIconRefData::Free()
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
wxIcon::wxIcon()
|
wxIcon::wxIcon()
|
||||||
: m_bIsXpm(FALSE)
|
:m_bIsXpm(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
wxIcon::wxIcon(
|
wxIcon::wxIcon( const char WXUNUSED(bits)[],
|
||||||
const char WXUNUSED(bits)[]
|
int WXUNUSED(nWidth),
|
||||||
, int WXUNUSED(nWidth)
|
int WXUNUSED(nHeight) )
|
||||||
, int WXUNUSED(nHeight)
|
:m_bIsXpm(false)
|
||||||
)
|
|
||||||
: m_bIsXpm(FALSE)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
wxIcon::wxIcon(
|
wxIcon::wxIcon( const wxString& rIconFile,
|
||||||
const wxString& rIconFile
|
long lFlags,
|
||||||
, long lFlags
|
int nDesiredWidth,
|
||||||
, int nDesiredWidth
|
int nDesiredHeight )
|
||||||
, int nDesiredHeight
|
:m_bIsXpm(false)
|
||||||
)
|
|
||||||
: m_bIsXpm(FALSE)
|
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// A very poor hack, but we have to have separate icon files from windows
|
// A very poor hack, but we have to have separate icon files from windows
|
||||||
@@ -234,8 +230,9 @@ void wxIcon::CopyFromBitmap( const wxBitmap& rBmp )
|
|||||||
|
|
||||||
vIconInfo.hbmPointer = hBmpMask;
|
vIconInfo.hbmPointer = hBmpMask;
|
||||||
|
|
||||||
#ifndef __WATCOMC__
|
#if !(defined(__WATCOMC__) && __WATCOMC__ < 1240 )
|
||||||
// FIXME: incomplete headers ???
|
// Open Watcom 1.3 had incomplete headers
|
||||||
|
// that's reported and should be fixed for OW 1.4
|
||||||
|
|
||||||
HICON hIcon = ::WinCreatePointerIndirect( HWND_DESKTOP, &vIconInfo);
|
HICON hIcon = ::WinCreatePointerIndirect( HWND_DESKTOP, &vIconInfo);
|
||||||
|
|
||||||
@@ -269,12 +266,10 @@ void wxIcon::CopyFromBitmap( const wxBitmap& rBmp )
|
|||||||
::DevCloseDC(hDCDst);
|
::DevCloseDC(hDCDst);
|
||||||
} // end of wxIcon::CopyFromBitmap
|
} // end of wxIcon::CopyFromBitmap
|
||||||
|
|
||||||
bool wxIcon::LoadFile(
|
bool wxIcon::LoadFile( const wxString& rFilename,
|
||||||
const wxString& rFilename
|
long lType,
|
||||||
, long lType
|
int nDesiredWidth,
|
||||||
, int nDesiredWidth
|
int nDesiredHeight )
|
||||||
, int nDesiredHeight
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
HPS hPs = NULLHANDLE;
|
HPS hPs = NULLHANDLE;
|
||||||
|
|
||||||
@@ -291,5 +286,5 @@ bool wxIcon::LoadFile(
|
|||||||
,nDesiredHeight
|
,nDesiredHeight
|
||||||
));
|
));
|
||||||
else
|
else
|
||||||
return(FALSE);
|
return false;
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user