-\section{Preprocesser symbols defined by wxWidgets}\label{cppconst}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Name: cppconst.tex
+%% Purpose: Peprocessor symbols
+%% Author:
+%% Modified by:
+%% Created:
+%% RCS-ID: $Id$
+%% Copyright: (c) wxWidgets
+%% License: wxWindows license
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\section{Preprocessor symbols defined by wxWidgets}\label{cppconst}
These are preprocessor symbols used in the wxWidgets source, grouped
by category (and sorted by alphabetical order inside each category). All of
\twocolitem{\_\_WXMGL\_\_}{SciTech Soft MGL (\_\_WXUNIVERSAL\_\_ will be also
defined)}
\twocolitem{\_\_WXMSW\_\_}{Any Windows}
-\twocolitem{\_\_WXOS2\_\_}{Identical to \_\_WXPM\_\_}
\twocolitem{\_\_WXOSX\_\_}{Any Mac OS X port (either Carbon or Cocoa)}
\twocolitem{\_\_WXPALMOS\_\_}{PalmOS}
\twocolitem{\_\_WXPM\_\_}{OS/2 native Presentation Manager}
\begin{itemize}
\item If you want to test for all Mac platforms, classic and OS X, you
should test both \texttt{\_\_WXMAC\_\_} and \texttt{\_\_WXCOCOA\_\_}.
-\item If you want to test for any GUI Mac port under OS X, use
+\item If you want to test for any GUI Mac port under OS X, use
\texttt{\_\_WXOSX\_\_}.
\item If you want to test for any port under Mac OS X, including, for
example, wxGTK and also wxBase, use \texttt{\_\_DARWIN\_\_} (see below).
to the compiler version: $500$ is $5.0$.}
\twocolitem{\_\_DJGPP\_\_}{DJGPP}
\twocolitem{\_\_DIGITALMARS\_\_}{Digital Mars}
-\twocolitem{\_\_GNUG\_\_}{Gnu C++ on any platform, see also
+\twocolitem{\_\_GNUG\_\_}{Gnu C++ on any platform, see also
\helpref{wxCHECK\_GCC\_VERSION}{wxcheckgccversion}}
-\twocolitem{\_\_GNUWIN32\_\_}{Gnu-Win32 compiler, see also
+\twocolitem{\_\_GNUWIN32\_\_}{Gnu-Win32 compiler, see also
\helpref{wxCHECK\_W32API\_VERSION}{wxcheckw32apiversion}}
\twocolitem{\_\_MINGW32\_\_}{MinGW}
\twocolitem{\_\_MWERKS\_\_}{CodeWarrior MetroWerks compiler}
this case, \texttt{wx/wxprec.h} includes \texttt{wx/wx.h} which, in turn,
includes a number of wxWidgets headers thus making it unnecessary to include
them explicitly. However if this is not defined, you do need to include them
-and so the usual idiom which allows to support both cases is to first include
+and so the usual idiom which allows to support both cases is to first include
\texttt{wx/wxprec.h} and then, inside \texttt{#ifndef WX\_PRECOMP}, individual
headers you need.}
\twocolitem{\_UNICODE and UNICODE}{both are defined if wxUSE\_UNICODE is set to $1$}
implies that wxUSE\_THREADS is $0$ and also that other (non wx-based) threading
packages cannot be used neither.}
\end{twocollist}
-
# include "wx/msw/chkconf.h"
#elif defined(__WXMAC__)
# include "wx/mac/chkconf.h"
+#elif defined(__OS2__)
+# include "wx/os2/chkconf.h"
#elif defined(__WXMOTIF__)
# include "wx/motif/chkconf.h"
#endif
--- /dev/null
+/*
+ * Name: wx/os2/chkconf.h
+ * Purpose: Compiler-specific configuration checking
+ * Author: Julian Smart
+ * Modified by:
+ * Created: 01/02/97
+ * RCS-ID: $Id$
+ * Copyright: (c) Julian Smart
+ * Licence: wxWindows licence
+ */
+
+/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
+
+#ifndef _WX_OS2_CHKCONF_H_
+#define _WX_OS2_CHKCONF_H_
+
+#ifdef __WATCOMC__
+
+/* Watcom builds for OS/2 port are setup.h driven and setup.h is
+ automatically generated from include/wx/setup_inc.h so we have
+ to disable here features not supported currently or enable
+ features required */
+
+#if wxUSE_STACKWALKER
+# undef wxUSE_STACKWALKER
+# define wxUSE_STACKWALKER 0
+#endif /* wxUSE_STACKWALKER */
+
+#if !wxUSE_POSTSCRIPT
+# undef wxUSE_POSTSCRIPT
+# define wxUSE_POSTSCRIPT 1
+#endif
+
+#endif /* __WATCOM__ */
+
+#endif /* _WX_OS2_CHKCONF_H_ */
#define INCL_WINSYS
#define INCL_SHLERRORS
#define INCL_DOS
+#define INCL_WINATOM
+#define INCL_WIN
#include <os2.h>
+#if defined(__WATCOMC__) && ( __WATCOMC__ < 1240 )
+ // missing in OpenWatcom 1.3 but added in 1.4
+ inline HATOMTBL APIENTRY WinQuerySystemAtomTable(VOID){return NULL;}
+ inline ULONG APIENTRY WinQueryAtomName(HATOMTBL,ATOM,PCSZ,ULONG){return 0;}
+ inline LONG APIENTRY GpiPointArc(HPS,PPOINTL){return GPI_ERROR;}
+ inline BOOL APIENTRY WinDrawPointer(HPS,LONG,LONG,HPOINTER,ULONG){return FALSE;}
+ inline HPOINTER APIENTRY WinCreatePointerIndirect(HWND,PPOINTERINFO){return NULLHANDLE;}
+ inline BOOL APIENTRY WinGetMaxPosition(HWND,PSWP){return FALSE;}
+ inline BOOL APIENTRY WinGetMinPosition(HWND,PSWP,PPOINTL){return FALSE;}
+#endif
+
#if defined(__WATCOMC__) && defined(__WXMOTIF__)
#include <os2def.h>
#define I_NEED_OS2_H
( defined( __CYGWIN__ ) && defined( __WINDOWS__ ) ) || \
(defined(__WATCOMC__) && __WATCOMC__ >= 1200) ) && \
!defined(__DOS__) && \
- !defined(__WXOS2__) && \
+ !defined(__WXPM__) && \
!defined(__WXMOTIF__) && \
!defined(__WXGTK__) && \
!defined(__WXX11__) && \
/////////////////////////////////////////////////////////////////////////////
-// Name: wxprec.h
+// Name: wx/wxprec.h
// Purpose: Includes the appropriate files for precompiled headers
// Author: Julian Smart
// Modified by:
# include <PalmOS.h>
#endif
+// include <os2.h>
+#ifdef __OS2__
+# include "wx/os2/private.h"
+#endif
+
// include the most common wx headers
#include "wx/wx.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: nativdlg.cpp
+// Name: samples/nativdlg/nativdlg.cpp
// Purpose: Native Windows dialog sample
// Author: Julian Smart
// Modified by:
void MyFrame::OnTest1(wxCommandEvent& WXUNUSED(event))
{
-#if ( defined(__WXOS2__) || defined(__WXMSW__) ) && !defined(__WXUNIVERSAL__)
+#if ( defined(__WXPM__) || defined(__WXMSW__) ) && !defined(__WXUNIVERSAL__)
MyDialog dialog;
if (dialog.LoadNativeDialog(this, _T("dialog1")))
{
{
EndModal(wxID_CANCEL);
}
-
-
/////////////////////////////////////////////////////////////////////////////
-// Name: vscroll.cpp
+// Name: samples/vscroll/vstest.cpp
// Purpose: VScroll wxWidgets sample
// Author: Vadim Zeitlin
// Modified by:
// ----------------------------------------------------------------------------
// the application icon (under Windows and OS/2 it is in resources)
-#if !defined(__WXMSW__) && !defined(__WXOS2__)
+#if !defined(__WXMSW__) && !defined(__WXPM__)
#include "../sample.xpm"
#endif
/////////////////////////////////////////////////////////////////////////////
-// Name: prntbase.cpp
+// Name: src/common/prntbase.cpp
// Purpose: Printing framework base class implementation
// Author: Julian Smart
// Modified by:
m_pimpl->DetermineScaling();
}
-
#endif // wxUSE_PRINTING_ARCHITECTURE
/////////////////////////////////////////////////////////////////////////////
-// Name: clipbrd.cpp
+// Name: src/os2/clipbrd.cpp
// Purpose: Clipboard functionality
// Author: David Webster
// Modified by:
// old-style clipboard functions using Windows API
// ---------------------------------------------------------------------------
-static bool gs_wxClipboardIsOpen = FALSE;
+static bool gs_wxClipboardIsOpen = false;
bool wxOpenClipboard()
{
{
wxLogDebug(wxT("Can not open clipboard without a main window."));
- return FALSE;
+ return false;
}
*/
- return FALSE;
+ return false;
}
bool wxCloseClipboard()
{
- wxCHECK_MSG( gs_wxClipboardIsOpen, FALSE, wxT("clipboard is not opened") );
+ wxCHECK_MSG( gs_wxClipboardIsOpen, false, wxT("clipboard is not opened") );
// TODO:
/*
- gs_wxClipboardIsOpen = FALSE;
+ gs_wxClipboardIsOpen = false;
if ( ::CloseClipboard() == 0 )
{
wxLogSysError(_("Failed to close the clipboard."));
- return FALSE;
+ return false;
}
*/
return true;
{
wxLogSysError(_("Failed to empty the clipboard."));
- return FALSE;
+ return false;
}
*/
return true;
wxLogSysError(_("Failed to allocate %dKb of memory for clipboard "
"transfer."), size / 1024);
- return FALSE;
+ return false;
}
LPVOID lpGlobalMemory = ::GlobalLock(hGlobal);
wxLogSysError(_("Failed to set clipboard data in format %s"),
wxDataObject::GetFormatName(format));
- return FALSE;
+ return false;
}
*/
return true;
#endif // wxUSE_DRAG_AND_DROP
#endif
-bool wxSetClipboardData(wxDataFormat dataFormat,
- const void *data,
- int width, int height)
+bool wxSetClipboardData(wxDataFormat WXUNUSED(dataFormat),
+ const void *WXUNUSED(data),
+ int WXUNUSED(width), int WXUNUSED(height))
{
// TODO:
/*
SelectObject(hdcSrc, old);
DeleteDC(hdcMem);
DeleteDC(hdcSrc);
- return FALSE;
+ return false;
}
HBITMAP old1 = (HBITMAP) SelectObject(hdcMem, hBitmap);
default:
{
wxLogError(_("Unsupported clipboard format."));
- return FALSE;
+ return false;
}
case wxDF_OEMTEXT:
{
wxLogSysError(_("Failed to set clipboard data."));
- return FALSE;
+ return false;
}
*/
return true;
}
-void *wxGetClipboardData(wxDataFormat dataFormat, long *len)
+void *wxGetClipboardData(wxDataFormat WXUNUSED(dataFormat), long *WXUNUSED(len))
{
// void *retval = NULL;
// TODO:
case wxDF_DIB:
{
wxLogError(_("Unsupported clipboard format."));
- return FALSE;
+ return NULL;
}
case wxDF_OEMTEXT:
return dataFormat;
}
-int wxRegisterClipboardFormat(wxChar *formatName)
+int wxRegisterClipboardFormat(wxChar *WXUNUSED(formatName))
{
// TODO: return ::RegisterClipboardFormat(formatName);
return 0;
}
-bool wxGetClipboardFormatName(wxDataFormat dataFormat,
- wxChar *formatName,
- int maxCount)
+bool wxGetClipboardFormatName(wxDataFormat WXUNUSED(dataFormat),
+ wxChar *WXUNUSED(formatName),
+ int WXUNUSED(maxCount))
{
// TODO: return ::GetClipboardFormatName((int)dataFormat, formatName, maxCount) > 0;
return 0;
bool wxClipboard::Flush()
{
// TODO:
- return FALSE;
+ return false;
}
bool wxClipboard::Open()
return wxIsClipboardOpened();
}
-bool wxClipboard::SetData( wxDataObject *data )
+bool wxClipboard::SetData( wxDataObject *WXUNUSED(data) )
{
(void)wxEmptyClipboard();
// TODO:
bool wxClipboard::AddData( wxDataObject *data )
{
- wxCHECK_MSG( data, FALSE, wxT("data is invalid") );
+ wxCHECK_MSG( data, false, wxT("data is invalid") );
#if wxUSE_DRAG_AND_DROP
- wxCHECK_MSG( wxIsClipboardOpened(), FALSE, wxT("clipboard not open") );
+ wxCHECK_MSG( wxIsClipboardOpened(), false, wxT("clipboard not open") );
// wxDataFormat format = data->GetPreferredFormat();
// TODO:
}
#else // !wxUSE_DRAG_AND_DROP
*/
- return FALSE;
+ return false;
#else
- return FALSE;
+ return false;
#endif // wxUSE_DRAG_AND_DROP/!wxUSE_DRAG_AND_DROP
}
return wxIsClipboardFormatAvailable(format);
}
-bool wxClipboard::GetData( wxDataObject& data )
+bool wxClipboard::GetData( wxDataObject& WXUNUSED(data) )
{
- wxCHECK_MSG( wxIsClipboardOpened(), FALSE, wxT("clipboard not open") );
+ wxCHECK_MSG( wxIsClipboardOpened(), false, wxT("clipboard not open") );
#if wxUSE_DRAG_AND_DROP
// wxDataFormat format = data.GetPreferredFormat();
return true;
}
else
- return FALSE;
+ return false;
}
case wxDF_BITMAP:
return true;
}
else
- return FALSE;
+ return false;
}
#if wxUSE_METAFILE
case wxDF_METAFILE:
return true;
}
else
- return FALSE;
+ return false;
}
#endif
default:
void *buf = wxGetClipboardData(format, &len);
if ( buf )
{
- // FIXME this is for testing only!!
+ // FIXME this is for testing only!
((wxPrivateDataObject &)data).SetData(buf, len);
free(buf);
}
}
- return FALSE;
+ return false;
}
#else
*/
- return FALSE;
+ return false;
#else
- return FALSE;
+ return false;
#endif
}
///////////////////////////////////////////////////////////////////////////////
-// Name: os2/dataobj.cpp
+// Name: src/os2/dataobj.cpp
// Purpose: implementation of wx[I]DataObject class
// Author: David Webster
// Modified by:
#include "wx/mstream.h"
#include "wx/image.h"
-#define INCL_DOS
-#include <os2.h>
+#include "wx/os2/private.h"
// ----------------------------------------------------------------------------
// functions
{
QueryGetData(rFormat);
if (rFormat.GetType() == wxDF_INVALID)
- return FALSE;
+ return false;
ULONG ulSize = m_pDataObject->GetDataSize(rFormat);
//
// It probably means that the method is just not implemented
//
- return FALSE;
+ return false;
}
if (rFormat.GetType() == wxDF_PRIVATE)
{
}
if (ulSize > ulLen) // not enough room to copy
- return FALSE;
+ return false;
//
// Copy the data
if (!m_pngSize)
{
wxFAIL_MSG(wxT("attempt to copy empty bitmap failed"));
- return FALSE;
+ return false;
}
memcpy(pBuf, m_pngData, m_pngSize);
return true;
}
-bool wxBitmapDataObject::SetData(
- size_t nSize
-, const void* pBuf
-)
+bool wxBitmapDataObject::SetData( size_t nSize, const void* pBuf)
{
Clear();
m_pngSize = nSize;
if (!vHandler.LoadFile(&vImage, vMstream))
{
- return FALSE;
+ return false;
}
m_bitmap = wxBitmap(vImage);
/////////////////////////////////////////////////////////////////////////////
-// Name: dc.cpp
+// Name: src/os2/dc.cpp
// Purpose: wxDC class
// Author: David Webster
// Modified by:
vPtlArc[0].y = vYm;
vPtlArc[1].x = vX2;
vPtlArc[1].y = vY2;
-#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)
,(wxCoord)(vYc - dRadius)
);
/////////////////////////////////////////////////////////////////////////////
-// Name: dcprint.cpp
+// Name: src/os2/dcprint.cpp
// Purpose: wxPrinterDC class
// Author: David Webster
// Modified by:
// This form is deprecated
-wxPrinterDC::wxPrinterDC(
- const wxString& rsDriverName
-, const wxString& rsDeviceName
-, const wxString& rsFile
-, bool bInteractive
-, int nOrientation
-)
+wxPrinterDC::wxPrinterDC( const wxString& rsDriverName,
+ const wxString& rsDeviceName,
+ const wxString& rsFile,
+ bool bInteractive,
+ int nOrientation )
{
DEVOPENSTRUC vDevOpen = { (char*)rsDeviceName.c_str()
,(char*)rsDriverName.c_str()
m_isInteractive = bInteractive;
- if (!rsFile.IsNull() && rsFile != wxT(""))
+ if (!rsFile.IsNull() && !rsFile.empty())
m_printData.SetFilename(rsFile);
/*
if ( PrintDlg( &pd ) != 0 )
{
m_hDC = (WXHDC) pd.hDC;
- m_ok = TRUE;
+ m_ok = true;
}
else
{
- m_ok = FALSE;
+ m_ok = false;
return;
}
-
- // m_dontDelete = TRUE;
}
else
#endif
*/
- if ((!rsDriverName.IsNull() && rsDriverName != wxT("")) &&
- (!rsDeviceName.IsNull() && rsDeviceName != wxT("")) &&
- (!rsFile.IsNull() && rsFile != wxT("")))
+ if ( !rsDriverName.empty() &&
+ !rsDeviceName.empty() &&
+ !rsFile.empty() )
{
m_hDC = (WXHDC) ::DevOpenDC( vHabmain
,OD_QUEUED
,(PDEVOPENDATA)&vDevOpen
,NULLHANDLE
);
- m_ok = m_hDC ? TRUE: FALSE;
+ m_ok = m_hDC ? true: false;
}
else
{
vPrintData.SetOrientation(nOrientation);
m_hDC = wxGetPrinterDC(vPrintData);
- m_ok = m_hDC ? TRUE: FALSE;
+ m_ok = m_hDC ? true: false;
}
if (m_hDC)
SetPen(*wxBLACK_PEN);
} // end of wxPrinterDC::wxPrinterDC
-wxPrinterDC::wxPrinterDC(
- const wxPrintData& rPrintData
-)
+wxPrinterDC::wxPrinterDC( const wxPrintData& rPrintData )
{
m_printData = rPrintData;
- m_isInteractive = FALSE;
+ m_isInteractive = false;
m_hDC = wxGetPrinterDC(rPrintData);
m_ok = (m_hDC != 0);
if (m_hDC)
SetPen(*wxBLACK_PEN);
} // end of wxPrinterDC::wxPrinterDC
-wxPrinterDC::wxPrinterDC(
- WXHDC hTheDC
-)
+wxPrinterDC::wxPrinterDC( WXHDC hTheDC )
{
- m_isInteractive = FALSE;
+ m_isInteractive = false;
m_hDC = hTheDC;
- m_ok = TRUE;
+ m_ok = true;
if (m_hDC)
{
SetMapMode(wxMM_TEXT);
}
} // end of wxPrinterDC::Init
-bool wxPrinterDC::StartDoc(
- const wxString& rsMessage
-)
+bool wxPrinterDC::StartDoc(const wxString& WXUNUSED(rsMessage))
{
/* TODO: PM's implementation
DOCINFO docinfo;
wxString filename(m_printData.GetFilename());
- if (filename.IsEmpty())
+ if (filename.empty())
docinfo.lpszOutput = NULL;
else
docinfo.lpszOutput = (const wxChar *) filename;
#endif
if (!m_hDC)
- return FALSE;
+ return false;
int ret =
#ifndef __WIN32__
#endif
return (ret > 0);
*/
- return(TRUE);
+ return true;
} // end of wxPrinterDC::StartDoc
void wxPrinterDC::EndDoc()
} // end of wxPrinterDC::EndPage
#if 0
// Returns default device and port names
-static bool wxGetDefaultDeviceName(
- wxString& rsDeviceName
-, wxString& rsPortName
-)
+static bool wxGetDefaultDeviceName( wxString& rsDeviceName, wxString& rsPortName )
{
- rsDeviceName = "";
+ rsDeviceName = wxEmptyString;
/*
LPDEVNAMES lpDevNames;
LPSTR lpszDriverName;
if (pd.hDevNames)
GlobalFree(pd.hDevNames);
- return FALSE;
+ return false;
}
if (pd.hDevNames)
}
return ( deviceName != wxT("") );
*/
- return(TRUE);
+ return true;
} // end of wxGetDefaultDeviceName
#endif
// Gets an HDC for the specified printer configuration
-WXHDC WXDLLEXPORT wxGetPrinterDC(
- const wxPrintData& rPrintDataConst
-)
+WXHDC WXDLLEXPORT wxGetPrinterDC( const wxPrintData& WXUNUSED(rPrintDataConst) )
{
HDC hDC = NULLHANDLE;
/*
wxChar* deviceName;
wxChar* portName = (wxChar*) NULL; // Obsolete in WIN32
- if (devNameStr == wxT(""))
+ if (devNameStr.empty())
deviceName = (wxChar*) NULL;
else
deviceName = WXSTRINGCAST devNameStr;
if ( hDevMode )
lpDevMode = (DEVMODE*) GlobalLock(hDevMode);
- if (devNameStr == wxT(""))
+ if (devNameStr.empty())
{
// Retrieve the default device name
wxString portName;
return (WXHDC) hDC;
} // end of wxGetPrinterDC
-void wxPrinterDC::DoDrawBitmap(
- const wxBitmap& rBmp
-, wxCoord vX
-, wxCoord vY
-, bool bUseMask
-)
+void wxPrinterDC::DoDrawBitmap( const wxBitmap& rBmp,
+ wxCoord WXUNUSED(vX),
+ wxCoord WXUNUSED(vY),
+ bool WXUNUSED(bUseMask))
{
wxCHECK_RET( rBmp.Ok(), _T("invalid bitmap in wxPrinterDC::DrawBitmap") );
} // end of wxPrinterDC::DoDrawBitmap
-bool wxPrinterDC::DoBlit(
- wxCoord vXdest
-, wxCoord vYdest
-, wxCoord vWidth
-, wxCoord vHeight
-, wxDC* pSource
-, wxCoord vXsrc
-, wxCoord vYsrc
-, int nRop
-, bool bUseMask
-, wxCoord xsrcMask
-, wxCoord ysrcMask
-)
+bool wxPrinterDC::DoBlit( wxCoord WXUNUSED(vXdest),
+ wxCoord WXUNUSED(vYdest),
+ wxCoord WXUNUSED(vWidth),
+ wxCoord WXUNUSED(vHeight),
+ wxDC* WXUNUSED(pSource),
+ wxCoord WXUNUSED(vXsrc),
+ wxCoord WXUNUSED(vYsrc),
+ int WXUNUSED(nRop),
+ bool WXUNUSED(bUseMask),
+ wxCoord WXUNUSED(xsrcMask),
+ wxCoord WXUNUSED(ysrcMask) )
{
- bool bSuccess = TRUE;
+ bool bSuccess = true;
// TODO:
return bSuccess;
} // end of wxPrintDC::DoBlit
-
#endif //wxUSE_PRINTING_ARCHITECTURE
///////////////////////////////////////////////////////////////////////////////
-// Name: dnd.cpp
+// Name: src/os2/dnd.cpp
// Purpose: wxDropTarget, wxDropSource, wxDataObject implementation
// Author: David Webster
// Modified by:
// wxDropSource
//-------------------------------------------------------------------------
-wxDropSource::wxDropSource (
- wxWindow* pWin
-)
+wxDropSource::wxDropSource ( wxWindow* WXUNUSED(pWin) )
{
Init();
} // end of wxDropSource::wxDropSource
-wxDropSource::wxDropSource (
- wxDataObject& rData
-, wxWindow* pWin
-)
+wxDropSource::wxDropSource ( wxDataObject& rData, wxWindow* WXUNUSED(pWin) )
{
Init();
SetData(rData);
m_vDragImage.cxOffset = 0;
m_vDragImage.cyOffset = 0;
- HSTR hStrType = ::DrgAddStrHandle(DRT_UNKNOWN);
- HSTR hStrRMF;
- HSTR hStrContainer;
- wxChar zFormats[128];
- wxChar zContainer[128];
- USHORT uSize = GetDataObject()->GetDataSize(GetDataObject()->GetPreferredFormat()) + 1;
- wxChar* pzBuffer = new wxChar[uSize];
+ HSTR hStrType = ::DrgAddStrHandle(DRT_UNKNOWN);
+ HSTR hStrRMF;
+ HSTR hStrContainer;
+ wxChar zFormats[128];
+ wxChar zContainer[128];
+ USHORT uSize = (USHORT)(GetDataObject()->GetDataSize(GetDataObject()->GetPreferredFormat()) + 1);
+ wxChar* pzBuffer = new wxChar[uSize];
memset(pzBuffer, '\0', GetDataObject()->GetDataSize(GetDataObject()->GetPreferredFormat()));
pzBuffer[GetDataObject()->GetDataSize(GetDataObject()->GetPreferredFormat())] = '\0';
/////////////////////////////////////////////////////////////////////////////
-// Name: frame.cpp
+// Name: src/os2/frame.cpp
// Purpose: wxFrame
// Author: David Webster
// Modified by:
,nHeight
);
- ::WinSetParent( pStatusBar->GetHWND()
- ,m_hFrame
- ,FALSE
- );
- ::WinSetOwner( pStatusBar->GetHWND()
- ,m_hFrame
- );
+ ::WinSetParent( pStatusBar->GetHWND(), m_hFrame, FALSE );
+ ::WinSetOwner( pStatusBar->GetHWND(), m_hFrame);
//
// to show statusbar
//
#endif // wxUSE_STATUSBAR
#if wxUSE_TOOLBAR
-wxToolBar* wxFrame::OnCreateToolBar(
- long lStyle
-, wxWindowID vId
-, const wxString& rsName
-)
+wxToolBar* wxFrame::OnCreateToolBar( long lStyle, wxWindowID vId, const wxString& rsName )
{
wxToolBar* pToolBar = wxFrameBase::OnCreateToolBar( lStyle
,vId
,rsName
);
- ::WinSetParent( pToolBar->GetHWND()
- ,m_hFrame
- ,FALSE
- );
- ::WinSetOwner( pToolBar->GetHWND()
- ,m_hFrame
- );
+ ::WinSetParent( pToolBar->GetHWND(), m_hFrame, FALSE);
+ ::WinSetOwner( pToolBar->GetHWND(), m_hFrame);
return pToolBar;
} // end of WinGuiBase_CFrame::OnCreateToolBar
#endif
::WinQueryWindowRect(GetHwnd(), &vRect3);
-#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;
int nIconX = (int)((vRect3.xRight - nIconWidth)/2);
int nIconY = (int)((vRect3.yBottom + nIconHeight)/2);
::WinDrawPointer(hPs, nIconX, nIconY, hIcon, DP_NORMAL);
-#endif
}
::WinEndPaint(hPs);
}
/////////////////////////////////////////////////////////////////////////////
-// Name: icon.cpp
+// Name: src/os2/icon.cpp
// Purpose: wxIcon class
// Author: David Webster
// Modified by:
// 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
);
}
- BITMAPINFOHEADER2 vHeader;
- SIZEL vSize = {0, 0};
- DEVOPENSTRUC vDop = {0L, "DISPLAY", NULL, 0L, 0L, 0L, 0L, 0L, 0L};
- HDC hDCSrc = ::DevOpenDC(vHabmain, OD_MEMORY, "*", 5L, (PDEVOPENDATA)&vDop, NULLHANDLE);
- HDC hDCDst = ::DevOpenDC(vHabmain, OD_MEMORY, "*", 5L, (PDEVOPENDATA)&vDop, NULLHANDLE);
- HPS hPSSrc = ::GpiCreatePS(vHabmain, hDCSrc, &vSize, PU_PELS | GPIA_ASSOC);
- HPS hPSDst = ::GpiCreatePS(vHabmain, hDCDst, &vSize, PU_PELS | GPIA_ASSOC);
- POINTL vPoint[4] = { {0, 0}, {rBmp.GetWidth(), rBmp.GetHeight()},
- {0, 0}, {rBmp.GetWidth(), rBmp.GetHeight()}
- };
- POINTL vPointMask[4] = { {0, 0}, {rBmp.GetWidth(), rBmp.GetHeight() * 2},
- {0, 0}, {rBmp.GetWidth(), rBmp.GetHeight()}
- };
-
- POINTERINFO vIconInfo;
+ BITMAPINFOHEADER2 vHeader;
+ SIZEL vSize = {0, 0};
+ DEVOPENSTRUC vDop = {0L, "DISPLAY", NULL, 0L, 0L, 0L, 0L, 0L, 0L};
+ HDC hDCSrc = ::DevOpenDC(vHabmain, OD_MEMORY, "*", 5L, (PDEVOPENDATA)&vDop, NULLHANDLE);
+ HDC hDCDst = ::DevOpenDC(vHabmain, OD_MEMORY, "*", 5L, (PDEVOPENDATA)&vDop, NULLHANDLE);
+ HPS hPSSrc = ::GpiCreatePS(vHabmain, hDCSrc, &vSize, PU_PELS | GPIA_ASSOC);
+ HPS hPSDst = ::GpiCreatePS(vHabmain, hDCDst, &vSize, PU_PELS | GPIA_ASSOC);
+ POINTL vPoint[4] = { {0, 0}, {rBmp.GetWidth(), rBmp.GetHeight()},
+ {0, 0}, {rBmp.GetWidth(), rBmp.GetHeight()}
+ };
+ POINTL vPointMask[4] = { {0, 0}, {rBmp.GetWidth(), rBmp.GetHeight() * 2},
+ {0, 0}, {rBmp.GetWidth(), rBmp.GetHeight()}
+ };
+ POINTERINFO vIconInfo;
memset(&vIconInfo, '\0', sizeof(POINTERINFO));
vIconInfo.fPointer = FALSE; // we want an icon, not a pointer
vIconInfo.hbmPointer = hBmpMask;
-#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);
if (!hIcon)
,rBmp.GetHeight()
);
}
-#endif
if (!rBmp.GetMask())
{
/////////////////////////////////////////////////////////////////////////////
-// Name: print.cpp
+// Name: src/os2/print.cpp
// Purpose: Print framework
// Author: David Webster
// Modified by:
{
}
-bool wxOS2Printer::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
+bool wxOS2Printer::Print(wxWindow *WXUNUSED(parent),
+ wxPrintout *WXUNUSED(printout),
+ bool WXUNUSED(prompt))
{
// TODO. See wxPostScriptPrinter::Print for hints.
- return FALSE;
+ return false;
}
-wxDC* wxOS2Printer::PrintDialog(wxWindow *parent)
+wxDC* wxOS2Printer::PrintDialog(wxWindow *WXUNUSED(parent))
{
// TODO:
/*
return NULL;
}
-bool wxOS2Printer::Setup(wxWindow *parent)
+bool wxOS2Printer::Setup(wxWindow *WXUNUSED(parent))
{
// TODO:
/*
wxPrintDialog dialog(parent, & m_printData);
- dialog.GetPrintData().SetSetupDialog(TRUE);
+#if WXWIN_COMPATIBILITY_2_4
+ dialog.GetPrintData().SetSetupDialog(true);
+#endif
return (dialog.ShowModal() == wxID_OK);
*/
- return FALSE;
+ return false;
}
/*
{
}
-bool wxOS2PrintPreview::Print(bool interactive)
+bool wxOS2PrintPreview::Print(bool WXUNUSED(interactive))
{
if (!m_printPrintout)
- return FALSE;
+ return false;
// wxOS2Printer printer(&m_printData);
// return printer.Print(m_previewFrame, m_printPrintout, interactive);
- return FALSE;
+ return false;
}
void wxOS2PrintPreview::DetermineScaling()
/////////////////////////////////////////////////////////////////////////////
-// Name: windows.cpp
+// Name: src/os2/window.cpp
// Purpose: wxWindow
// Author: David Webster
// Modified by:
hPS = ::WinGetPS(GetHwnd());
- l = rString.Length();
+ l = rString.length();
if (l > 0L)
{
pStr = (PCH)rString.c_str();
//
// In world coordinates.
//
- bRc = ::GpiQueryTextBox( hPS
- ,l
- ,pStr
- ,TXTBOX_COUNT // return maximum information
- ,avPoint // array of coordinates points
- );
+ bRc = ::GpiQueryTextBox( hPS,
+ l,
+ pStr,
+ TXTBOX_COUNT,// return maximum information
+ avPoint // array of coordinates points
+ );
if (bRc)
{
vPtMin.x = avPoint[0].x;
// ---------------------------------------------------------------------------
//
#if wxUSE_MENUS_NATIVE
-bool wxWindowOS2::DoPopupMenu( wxMenu* pMenu,
- int nX,
- int nY )
+bool wxWindowOS2::DoPopupMenu( wxMenu* pMenu, int nX, int nY )
{
HWND hWndOwner = GetHwnd();
HWND hWndParent = GetHwnd();
switch(pSwp->fl)
{
case SWP_MAXIMIZE:
-#if !(defined(__WATCOMC__) && __WATCOMC__ < 1240 )
-// Open Watcom 1.3 had incomplete headers
-// that's reported and should be fixed for OW 1.4
::WinGetMaxPosition(GetHwnd(), pSwp);
m_maxWidth = pSwp->cx;
m_maxHeight = pSwp->cy;
-#endif
break;
case SWP_MINIMIZE:
-#if !(defined(__WATCOMC__) && __WATCOMC__ < 1240 )
-// Open Watcom 1.3 had incomplete headers
-// that's reported and should be fixed for OW 1.4
::WinGetMinPosition(GetHwnd(), pSwp, &vPoint);
m_minWidth = pSwp->cx;
m_minHeight = pSwp->cy;
-#else
- wxUnusedVar(vPoint);
-#endif
break;
default:
// ---------------------------------------------------------------------------
// mouse events
// ---------------------------------------------------------------------------
-//TODO!!! check against MSW
+//TODO: check against MSW
void wxWindowOS2::InitMouseEvent(
wxMouseEvent& rEvent
, int nX
wxWindow* wxFindWindowAtPoint(const wxPoint& rPt)
{
- POINTL vPt2;
+ POINTL vPt2;
vPt2.x = rPt.x;
vPt2.y = rPt.y;
- HWND hWndHit = ::WinWindowFromPoint(HWND_DESKTOP, &vPt2, FALSE);
- wxWindow* pWin = wxFindWinFromHandle((WXHWND)hWndHit) ;
- HWND hWnd = hWndHit;
+ 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