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