Support for automatic setup.h in OS/2 with OW builds. __WXOS2__ final removal. Source cleaning.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,4 +1,15 @@
|
|||||||
\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
|
These are preprocessor symbols used in the wxWidgets source, grouped
|
||||||
by category (and sorted by alphabetical order inside each category). All of
|
by category (and sorted by alphabetical order inside each category). All of
|
||||||
@@ -28,7 +39,6 @@ always tested using \texttt{#ifdef} and not \texttt{#if}.
|
|||||||
\twocolitem{\_\_WXMGL\_\_}{SciTech Soft MGL (\_\_WXUNIVERSAL\_\_ will be also
|
\twocolitem{\_\_WXMGL\_\_}{SciTech Soft MGL (\_\_WXUNIVERSAL\_\_ will be also
|
||||||
defined)}
|
defined)}
|
||||||
\twocolitem{\_\_WXMSW\_\_}{Any Windows}
|
\twocolitem{\_\_WXMSW\_\_}{Any Windows}
|
||||||
\twocolitem{\_\_WXOS2\_\_}{Identical to \_\_WXPM\_\_}
|
|
||||||
\twocolitem{\_\_WXOSX\_\_}{Any Mac OS X port (either Carbon or Cocoa)}
|
\twocolitem{\_\_WXOSX\_\_}{Any Mac OS X port (either Carbon or Cocoa)}
|
||||||
\twocolitem{\_\_WXPALMOS\_\_}{PalmOS}
|
\twocolitem{\_\_WXPALMOS\_\_}{PalmOS}
|
||||||
\twocolitem{\_\_WXPM\_\_}{OS/2 native Presentation Manager}
|
\twocolitem{\_\_WXPM\_\_}{OS/2 native Presentation Manager}
|
||||||
@@ -52,7 +62,7 @@ summarize:
|
|||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
\item If you want to test for all Mac platforms, classic and OS X, you
|
\item If you want to test for all Mac platforms, classic and OS X, you
|
||||||
should test both \texttt{\_\_WXMAC\_\_} and \texttt{\_\_WXCOCOA\_\_}.
|
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\_\_}.
|
\texttt{\_\_WXOSX\_\_}.
|
||||||
\item If you want to test for any port under Mac OS X, including, for
|
\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).
|
example, wxGTK and also wxBase, use \texttt{\_\_DARWIN\_\_} (see below).
|
||||||
@@ -125,9 +135,9 @@ compiler used.
|
|||||||
to the compiler version: $500$ is $5.0$.}
|
to the compiler version: $500$ is $5.0$.}
|
||||||
\twocolitem{\_\_DJGPP\_\_}{DJGPP}
|
\twocolitem{\_\_DJGPP\_\_}{DJGPP}
|
||||||
\twocolitem{\_\_DIGITALMARS\_\_}{Digital Mars}
|
\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}}
|
\helpref{wxCHECK\_GCC\_VERSION}{wxcheckgccversion}}
|
||||||
\twocolitem{\_\_GNUWIN32\_\_}{Gnu-Win32 compiler, see also
|
\twocolitem{\_\_GNUWIN32\_\_}{Gnu-Win32 compiler, see also
|
||||||
\helpref{wxCHECK\_W32API\_VERSION}{wxcheckw32apiversion}}
|
\helpref{wxCHECK\_W32API\_VERSION}{wxcheckw32apiversion}}
|
||||||
\twocolitem{\_\_MINGW32\_\_}{MinGW}
|
\twocolitem{\_\_MINGW32\_\_}{MinGW}
|
||||||
\twocolitem{\_\_MWERKS\_\_}{CodeWarrior MetroWerks compiler}
|
\twocolitem{\_\_MWERKS\_\_}{CodeWarrior MetroWerks compiler}
|
||||||
@@ -157,7 +167,7 @@ also \helpref{wxCHECK\_VERSION}{wxcheckversion}}
|
|||||||
this case, \texttt{wx/wxprec.h} includes \texttt{wx/wx.h} which, in turn,
|
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
|
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
|
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
|
\texttt{wx/wxprec.h} and then, inside \texttt{#ifndef WX\_PRECOMP}, individual
|
||||||
headers you need.}
|
headers you need.}
|
||||||
\twocolitem{\_UNICODE and UNICODE}{both are defined if wxUSE\_UNICODE is set to $1$}
|
\twocolitem{\_UNICODE and UNICODE}{both are defined if wxUSE\_UNICODE is set to $1$}
|
||||||
@@ -175,4 +185,3 @@ don't include compiler flags needed for multithreaded code generation. This
|
|||||||
implies that wxUSE\_THREADS is $0$ and also that other (non wx-based) threading
|
implies that wxUSE\_THREADS is $0$ and also that other (non wx-based) threading
|
||||||
packages cannot be used neither.}
|
packages cannot be used neither.}
|
||||||
\end{twocollist}
|
\end{twocollist}
|
||||||
|
|
||||||
|
@@ -23,6 +23,8 @@
|
|||||||
# include "wx/msw/chkconf.h"
|
# include "wx/msw/chkconf.h"
|
||||||
#elif defined(__WXMAC__)
|
#elif defined(__WXMAC__)
|
||||||
# include "wx/mac/chkconf.h"
|
# include "wx/mac/chkconf.h"
|
||||||
|
#elif defined(__OS2__)
|
||||||
|
# include "wx/os2/chkconf.h"
|
||||||
#elif defined(__WXMOTIF__)
|
#elif defined(__WXMOTIF__)
|
||||||
# include "wx/motif/chkconf.h"
|
# include "wx/motif/chkconf.h"
|
||||||
#endif
|
#endif
|
||||||
|
36
include/wx/os2/chkconf.h
Normal file
36
include/wx/os2/chkconf.h
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
* 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_ */
|
@@ -20,8 +20,21 @@
|
|||||||
#define INCL_WINSYS
|
#define INCL_WINSYS
|
||||||
#define INCL_SHLERRORS
|
#define INCL_SHLERRORS
|
||||||
#define INCL_DOS
|
#define INCL_DOS
|
||||||
|
#define INCL_WINATOM
|
||||||
|
#define INCL_WIN
|
||||||
#include <os2.h>
|
#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__)
|
#if defined(__WATCOMC__) && defined(__WXMOTIF__)
|
||||||
#include <os2def.h>
|
#include <os2def.h>
|
||||||
#define I_NEED_OS2_H
|
#define I_NEED_OS2_H
|
||||||
|
@@ -519,7 +519,7 @@
|
|||||||
( defined( __CYGWIN__ ) && defined( __WINDOWS__ ) ) || \
|
( defined( __CYGWIN__ ) && defined( __WINDOWS__ ) ) || \
|
||||||
(defined(__WATCOMC__) && __WATCOMC__ >= 1200) ) && \
|
(defined(__WATCOMC__) && __WATCOMC__ >= 1200) ) && \
|
||||||
!defined(__DOS__) && \
|
!defined(__DOS__) && \
|
||||||
!defined(__WXOS2__) && \
|
!defined(__WXPM__) && \
|
||||||
!defined(__WXMOTIF__) && \
|
!defined(__WXMOTIF__) && \
|
||||||
!defined(__WXGTK__) && \
|
!defined(__WXGTK__) && \
|
||||||
!defined(__WXX11__) && \
|
!defined(__WXX11__) && \
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: wxprec.h
|
// Name: wx/wxprec.h
|
||||||
// Purpose: Includes the appropriate files for precompiled headers
|
// Purpose: Includes the appropriate files for precompiled headers
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -50,6 +50,11 @@
|
|||||||
# include <PalmOS.h>
|
# include <PalmOS.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// include <os2.h>
|
||||||
|
#ifdef __OS2__
|
||||||
|
# include "wx/os2/private.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
// include the most common wx headers
|
// include the most common wx headers
|
||||||
#include "wx/wx.h"
|
#include "wx/wx.h"
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: nativdlg.cpp
|
// Name: samples/nativdlg/nativdlg.cpp
|
||||||
// Purpose: Native Windows dialog sample
|
// Purpose: Native Windows dialog sample
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -82,7 +82,7 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
|||||||
|
|
||||||
void MyFrame::OnTest1(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::OnTest1(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
#if ( defined(__WXOS2__) || defined(__WXMSW__) ) && !defined(__WXUNIVERSAL__)
|
#if ( defined(__WXPM__) || defined(__WXMSW__) ) && !defined(__WXUNIVERSAL__)
|
||||||
MyDialog dialog;
|
MyDialog dialog;
|
||||||
if (dialog.LoadNativeDialog(this, _T("dialog1")))
|
if (dialog.LoadNativeDialog(this, _T("dialog1")))
|
||||||
{
|
{
|
||||||
@@ -108,5 +108,3 @@ void MyDialog::OnCancel(wxCommandEvent& WXUNUSED(event))
|
|||||||
{
|
{
|
||||||
EndModal(wxID_CANCEL);
|
EndModal(wxID_CANCEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: vscroll.cpp
|
// Name: samples/vscroll/vstest.cpp
|
||||||
// Purpose: VScroll wxWidgets sample
|
// Purpose: VScroll wxWidgets sample
|
||||||
// Author: Vadim Zeitlin
|
// Author: Vadim Zeitlin
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
// the application icon (under Windows and OS/2 it is in resources)
|
// 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"
|
#include "../sample.xpm"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: prntbase.cpp
|
// Name: src/common/prntbase.cpp
|
||||||
// Purpose: Printing framework base class implementation
|
// Purpose: Printing framework base class implementation
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -1513,5 +1513,4 @@ void wxPrintPreview::DetermineScaling()
|
|||||||
m_pimpl->DetermineScaling();
|
m_pimpl->DetermineScaling();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif // wxUSE_PRINTING_ARCHITECTURE
|
#endif // wxUSE_PRINTING_ARCHITECTURE
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: clipbrd.cpp
|
// Name: src/os2/clipbrd.cpp
|
||||||
// Purpose: Clipboard functionality
|
// Purpose: Clipboard functionality
|
||||||
// Author: David Webster
|
// Author: David Webster
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
// old-style clipboard functions using Windows API
|
// old-style clipboard functions using Windows API
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
static bool gs_wxClipboardIsOpen = FALSE;
|
static bool gs_wxClipboardIsOpen = false;
|
||||||
|
|
||||||
bool wxOpenClipboard()
|
bool wxOpenClipboard()
|
||||||
{
|
{
|
||||||
@@ -76,24 +76,24 @@ bool wxOpenClipboard()
|
|||||||
{
|
{
|
||||||
wxLogDebug(wxT("Can not open clipboard without a main window."));
|
wxLogDebug(wxT("Can not open clipboard without a main window."));
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxCloseClipboard()
|
bool wxCloseClipboard()
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( gs_wxClipboardIsOpen, FALSE, wxT("clipboard is not opened") );
|
wxCHECK_MSG( gs_wxClipboardIsOpen, false, wxT("clipboard is not opened") );
|
||||||
// TODO:
|
// TODO:
|
||||||
/*
|
/*
|
||||||
gs_wxClipboardIsOpen = FALSE;
|
gs_wxClipboardIsOpen = false;
|
||||||
|
|
||||||
if ( ::CloseClipboard() == 0 )
|
if ( ::CloseClipboard() == 0 )
|
||||||
{
|
{
|
||||||
wxLogSysError(_("Failed to close the clipboard."));
|
wxLogSysError(_("Failed to close the clipboard."));
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
return true;
|
return true;
|
||||||
@@ -107,7 +107,7 @@ bool wxEmptyClipboard()
|
|||||||
{
|
{
|
||||||
wxLogSysError(_("Failed to empty the clipboard."));
|
wxLogSysError(_("Failed to empty the clipboard."));
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
return true;
|
return true;
|
||||||
@@ -137,7 +137,7 @@ static bool wxSetClipboardData(wxDataObject *data)
|
|||||||
wxLogSysError(_("Failed to allocate %dKb of memory for clipboard "
|
wxLogSysError(_("Failed to allocate %dKb of memory for clipboard "
|
||||||
"transfer."), size / 1024);
|
"transfer."), size / 1024);
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
LPVOID lpGlobalMemory = ::GlobalLock(hGlobal);
|
LPVOID lpGlobalMemory = ::GlobalLock(hGlobal);
|
||||||
@@ -152,7 +152,7 @@ static bool wxSetClipboardData(wxDataObject *data)
|
|||||||
wxLogSysError(_("Failed to set clipboard data in format %s"),
|
wxLogSysError(_("Failed to set clipboard data in format %s"),
|
||||||
wxDataObject::GetFormatName(format));
|
wxDataObject::GetFormatName(format));
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
return true;
|
return true;
|
||||||
@@ -160,9 +160,9 @@ static bool wxSetClipboardData(wxDataObject *data)
|
|||||||
#endif // wxUSE_DRAG_AND_DROP
|
#endif // wxUSE_DRAG_AND_DROP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool wxSetClipboardData(wxDataFormat dataFormat,
|
bool wxSetClipboardData(wxDataFormat WXUNUSED(dataFormat),
|
||||||
const void *data,
|
const void *WXUNUSED(data),
|
||||||
int width, int height)
|
int WXUNUSED(width), int WXUNUSED(height))
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
/*
|
/*
|
||||||
@@ -185,7 +185,7 @@ bool wxSetClipboardData(wxDataFormat dataFormat,
|
|||||||
SelectObject(hdcSrc, old);
|
SelectObject(hdcSrc, old);
|
||||||
DeleteDC(hdcMem);
|
DeleteDC(hdcMem);
|
||||||
DeleteDC(hdcSrc);
|
DeleteDC(hdcSrc);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
HBITMAP old1 = (HBITMAP) SelectObject(hdcMem, hBitmap);
|
HBITMAP old1 = (HBITMAP) SelectObject(hdcMem, hBitmap);
|
||||||
@@ -242,7 +242,7 @@ bool wxSetClipboardData(wxDataFormat dataFormat,
|
|||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
wxLogError(_("Unsupported clipboard format."));
|
wxLogError(_("Unsupported clipboard format."));
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
case wxDF_OEMTEXT:
|
case wxDF_OEMTEXT:
|
||||||
@@ -275,13 +275,13 @@ bool wxSetClipboardData(wxDataFormat dataFormat,
|
|||||||
{
|
{
|
||||||
wxLogSysError(_("Failed to set clipboard data."));
|
wxLogSysError(_("Failed to set clipboard data."));
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *wxGetClipboardData(wxDataFormat dataFormat, long *len)
|
void *wxGetClipboardData(wxDataFormat WXUNUSED(dataFormat), long *WXUNUSED(len))
|
||||||
{
|
{
|
||||||
// void *retval = NULL;
|
// void *retval = NULL;
|
||||||
// TODO:
|
// TODO:
|
||||||
@@ -342,7 +342,7 @@ void *wxGetClipboardData(wxDataFormat dataFormat, long *len)
|
|||||||
case wxDF_DIB:
|
case wxDF_DIB:
|
||||||
{
|
{
|
||||||
wxLogError(_("Unsupported clipboard format."));
|
wxLogError(_("Unsupported clipboard format."));
|
||||||
return FALSE;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
case wxDF_OEMTEXT:
|
case wxDF_OEMTEXT:
|
||||||
@@ -414,15 +414,15 @@ wxDataFormat wxEnumClipboardFormats(wxDataFormat dataFormat)
|
|||||||
return dataFormat;
|
return dataFormat;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxRegisterClipboardFormat(wxChar *formatName)
|
int wxRegisterClipboardFormat(wxChar *WXUNUSED(formatName))
|
||||||
{
|
{
|
||||||
// TODO: return ::RegisterClipboardFormat(formatName);
|
// TODO: return ::RegisterClipboardFormat(formatName);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxGetClipboardFormatName(wxDataFormat dataFormat,
|
bool wxGetClipboardFormatName(wxDataFormat WXUNUSED(dataFormat),
|
||||||
wxChar *formatName,
|
wxChar *WXUNUSED(formatName),
|
||||||
int maxCount)
|
int WXUNUSED(maxCount))
|
||||||
{
|
{
|
||||||
// TODO: return ::GetClipboardFormatName((int)dataFormat, formatName, maxCount) > 0;
|
// TODO: return ::GetClipboardFormatName((int)dataFormat, formatName, maxCount) > 0;
|
||||||
return 0;
|
return 0;
|
||||||
@@ -450,7 +450,7 @@ void wxClipboard::Clear()
|
|||||||
bool wxClipboard::Flush()
|
bool wxClipboard::Flush()
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxClipboard::Open()
|
bool wxClipboard::Open()
|
||||||
@@ -463,7 +463,7 @@ bool wxClipboard::IsOpened() const
|
|||||||
return wxIsClipboardOpened();
|
return wxIsClipboardOpened();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxClipboard::SetData( wxDataObject *data )
|
bool wxClipboard::SetData( wxDataObject *WXUNUSED(data) )
|
||||||
{
|
{
|
||||||
(void)wxEmptyClipboard();
|
(void)wxEmptyClipboard();
|
||||||
// TODO:
|
// TODO:
|
||||||
@@ -478,10 +478,10 @@ bool wxClipboard::SetData( wxDataObject *data )
|
|||||||
|
|
||||||
bool wxClipboard::AddData( wxDataObject *data )
|
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
|
#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();
|
// wxDataFormat format = data->GetPreferredFormat();
|
||||||
// TODO:
|
// TODO:
|
||||||
@@ -521,9 +521,9 @@ bool wxClipboard::AddData( wxDataObject *data )
|
|||||||
}
|
}
|
||||||
#else // !wxUSE_DRAG_AND_DROP
|
#else // !wxUSE_DRAG_AND_DROP
|
||||||
*/
|
*/
|
||||||
return FALSE;
|
return false;
|
||||||
#else
|
#else
|
||||||
return FALSE;
|
return false;
|
||||||
#endif // wxUSE_DRAG_AND_DROP/!wxUSE_DRAG_AND_DROP
|
#endif // wxUSE_DRAG_AND_DROP/!wxUSE_DRAG_AND_DROP
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -537,9 +537,9 @@ bool wxClipboard::IsSupported( const wxDataFormat& format )
|
|||||||
return wxIsClipboardFormatAvailable(format);
|
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
|
#if wxUSE_DRAG_AND_DROP
|
||||||
// wxDataFormat format = data.GetPreferredFormat();
|
// wxDataFormat format = data.GetPreferredFormat();
|
||||||
@@ -559,7 +559,7 @@ bool wxClipboard::GetData( wxDataObject& data )
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
case wxDF_BITMAP:
|
case wxDF_BITMAP:
|
||||||
@@ -574,7 +574,7 @@ bool wxClipboard::GetData( wxDataObject& data )
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
#if wxUSE_METAFILE
|
#if wxUSE_METAFILE
|
||||||
case wxDF_METAFILE:
|
case wxDF_METAFILE:
|
||||||
@@ -588,7 +588,7 @@ bool wxClipboard::GetData( wxDataObject& data )
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
@@ -597,7 +597,7 @@ bool wxClipboard::GetData( wxDataObject& data )
|
|||||||
void *buf = wxGetClipboardData(format, &len);
|
void *buf = wxGetClipboardData(format, &len);
|
||||||
if ( buf )
|
if ( buf )
|
||||||
{
|
{
|
||||||
// FIXME this is for testing only!!
|
// FIXME this is for testing only!
|
||||||
((wxPrivateDataObject &)data).SetData(buf, len);
|
((wxPrivateDataObject &)data).SetData(buf, len);
|
||||||
free(buf);
|
free(buf);
|
||||||
|
|
||||||
@@ -605,13 +605,13 @@ bool wxClipboard::GetData( wxDataObject& data )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
*/
|
*/
|
||||||
return FALSE;
|
return false;
|
||||||
#else
|
#else
|
||||||
return FALSE;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: os2/dataobj.cpp
|
// Name: src/os2/dataobj.cpp
|
||||||
// Purpose: implementation of wx[I]DataObject class
|
// Purpose: implementation of wx[I]DataObject class
|
||||||
// Author: David Webster
|
// Author: David Webster
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -32,8 +32,7 @@
|
|||||||
#include "wx/mstream.h"
|
#include "wx/mstream.h"
|
||||||
#include "wx/image.h"
|
#include "wx/image.h"
|
||||||
|
|
||||||
#define INCL_DOS
|
#include "wx/os2/private.h"
|
||||||
#include <os2.h>
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// functions
|
// functions
|
||||||
@@ -98,7 +97,7 @@ bool CIDataObject::GetData ( const wxDataFormat& rFormat,
|
|||||||
{
|
{
|
||||||
QueryGetData(rFormat);
|
QueryGetData(rFormat);
|
||||||
if (rFormat.GetType() == wxDF_INVALID)
|
if (rFormat.GetType() == wxDF_INVALID)
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
ULONG ulSize = m_pDataObject->GetDataSize(rFormat);
|
ULONG ulSize = m_pDataObject->GetDataSize(rFormat);
|
||||||
|
|
||||||
@@ -107,7 +106,7 @@ bool CIDataObject::GetData ( const wxDataFormat& rFormat,
|
|||||||
//
|
//
|
||||||
// It probably means that the method is just not implemented
|
// It probably means that the method is just not implemented
|
||||||
//
|
//
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
if (rFormat.GetType() == wxDF_PRIVATE)
|
if (rFormat.GetType() == wxDF_PRIVATE)
|
||||||
{
|
{
|
||||||
@@ -119,7 +118,7 @@ bool CIDataObject::GetData ( const wxDataFormat& rFormat,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ulSize > ulLen) // not enough room to copy
|
if (ulSize > ulLen) // not enough room to copy
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Copy the data
|
// Copy the data
|
||||||
@@ -303,16 +302,13 @@ bool wxBitmapDataObject::GetDataHere( void* pBuf ) const
|
|||||||
if (!m_pngSize)
|
if (!m_pngSize)
|
||||||
{
|
{
|
||||||
wxFAIL_MSG(wxT("attempt to copy empty bitmap failed"));
|
wxFAIL_MSG(wxT("attempt to copy empty bitmap failed"));
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
memcpy(pBuf, m_pngData, m_pngSize);
|
memcpy(pBuf, m_pngData, m_pngSize);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxBitmapDataObject::SetData(
|
bool wxBitmapDataObject::SetData( size_t nSize, const void* pBuf)
|
||||||
size_t nSize
|
|
||||||
, const void* pBuf
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Clear();
|
Clear();
|
||||||
m_pngSize = nSize;
|
m_pngSize = nSize;
|
||||||
@@ -327,7 +323,7 @@ bool wxBitmapDataObject::SetData(
|
|||||||
|
|
||||||
if (!vHandler.LoadFile(&vImage, vMstream))
|
if (!vHandler.LoadFile(&vImage, vMstream))
|
||||||
{
|
{
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_bitmap = wxBitmap(vImage);
|
m_bitmap = wxBitmap(vImage);
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: dc.cpp
|
// Name: src/os2/dc.cpp
|
||||||
// Purpose: wxDC class
|
// Purpose: wxDC class
|
||||||
// Author: David Webster
|
// Author: David Webster
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -774,11 +774,7 @@ 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;
|
||||||
#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
|
::GpiPointArc(m_hPS, vPtlArc); // Draws the arc
|
||||||
#endif
|
|
||||||
CalcBoundingBox( (wxCoord)(vXc - dRadius)
|
CalcBoundingBox( (wxCoord)(vXc - dRadius)
|
||||||
,(wxCoord)(vYc - dRadius)
|
,(wxCoord)(vYc - dRadius)
|
||||||
);
|
);
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: dcprint.cpp
|
// Name: src/os2/dcprint.cpp
|
||||||
// Purpose: wxPrinterDC class
|
// Purpose: wxPrinterDC class
|
||||||
// Author: David Webster
|
// Author: David Webster
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -34,13 +34,11 @@ IMPLEMENT_CLASS(wxPrinterDC, wxDC)
|
|||||||
|
|
||||||
|
|
||||||
// This form is deprecated
|
// This form is deprecated
|
||||||
wxPrinterDC::wxPrinterDC(
|
wxPrinterDC::wxPrinterDC( const wxString& rsDriverName,
|
||||||
const wxString& rsDriverName
|
const wxString& rsDeviceName,
|
||||||
, const wxString& rsDeviceName
|
const wxString& rsFile,
|
||||||
, const wxString& rsFile
|
bool bInteractive,
|
||||||
, bool bInteractive
|
int nOrientation )
|
||||||
, int nOrientation
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
DEVOPENSTRUC vDevOpen = { (char*)rsDeviceName.c_str()
|
DEVOPENSTRUC vDevOpen = { (char*)rsDeviceName.c_str()
|
||||||
,(char*)rsDriverName.c_str()
|
,(char*)rsDriverName.c_str()
|
||||||
@@ -55,7 +53,7 @@ wxPrinterDC::wxPrinterDC(
|
|||||||
|
|
||||||
m_isInteractive = bInteractive;
|
m_isInteractive = bInteractive;
|
||||||
|
|
||||||
if (!rsFile.IsNull() && rsFile != wxT(""))
|
if (!rsFile.IsNull() && !rsFile.empty())
|
||||||
m_printData.SetFilename(rsFile);
|
m_printData.SetFilename(rsFile);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -80,22 +78,20 @@ wxPrinterDC::wxPrinterDC(
|
|||||||
if ( PrintDlg( &pd ) != 0 )
|
if ( PrintDlg( &pd ) != 0 )
|
||||||
{
|
{
|
||||||
m_hDC = (WXHDC) pd.hDC;
|
m_hDC = (WXHDC) pd.hDC;
|
||||||
m_ok = TRUE;
|
m_ok = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_ok = FALSE;
|
m_ok = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// m_dontDelete = TRUE;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
*/
|
*/
|
||||||
if ((!rsDriverName.IsNull() && rsDriverName != wxT("")) &&
|
if ( !rsDriverName.empty() &&
|
||||||
(!rsDeviceName.IsNull() && rsDeviceName != wxT("")) &&
|
!rsDeviceName.empty() &&
|
||||||
(!rsFile.IsNull() && rsFile != wxT("")))
|
!rsFile.empty() )
|
||||||
{
|
{
|
||||||
m_hDC = (WXHDC) ::DevOpenDC( vHabmain
|
m_hDC = (WXHDC) ::DevOpenDC( vHabmain
|
||||||
,OD_QUEUED
|
,OD_QUEUED
|
||||||
@@ -104,7 +100,7 @@ wxPrinterDC::wxPrinterDC(
|
|||||||
,(PDEVOPENDATA)&vDevOpen
|
,(PDEVOPENDATA)&vDevOpen
|
||||||
,NULLHANDLE
|
,NULLHANDLE
|
||||||
);
|
);
|
||||||
m_ok = m_hDC ? TRUE: FALSE;
|
m_ok = m_hDC ? true: false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -112,7 +108,7 @@ wxPrinterDC::wxPrinterDC(
|
|||||||
|
|
||||||
vPrintData.SetOrientation(nOrientation);
|
vPrintData.SetOrientation(nOrientation);
|
||||||
m_hDC = wxGetPrinterDC(vPrintData);
|
m_hDC = wxGetPrinterDC(vPrintData);
|
||||||
m_ok = m_hDC ? TRUE: FALSE;
|
m_ok = m_hDC ? true: false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_hDC)
|
if (m_hDC)
|
||||||
@@ -125,12 +121,10 @@ wxPrinterDC::wxPrinterDC(
|
|||||||
SetPen(*wxBLACK_PEN);
|
SetPen(*wxBLACK_PEN);
|
||||||
} // end of wxPrinterDC::wxPrinterDC
|
} // end of wxPrinterDC::wxPrinterDC
|
||||||
|
|
||||||
wxPrinterDC::wxPrinterDC(
|
wxPrinterDC::wxPrinterDC( const wxPrintData& rPrintData )
|
||||||
const wxPrintData& rPrintData
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
m_printData = rPrintData;
|
m_printData = rPrintData;
|
||||||
m_isInteractive = FALSE;
|
m_isInteractive = false;
|
||||||
m_hDC = wxGetPrinterDC(rPrintData);
|
m_hDC = wxGetPrinterDC(rPrintData);
|
||||||
m_ok = (m_hDC != 0);
|
m_ok = (m_hDC != 0);
|
||||||
if (m_hDC)
|
if (m_hDC)
|
||||||
@@ -139,13 +133,11 @@ wxPrinterDC::wxPrinterDC(
|
|||||||
SetPen(*wxBLACK_PEN);
|
SetPen(*wxBLACK_PEN);
|
||||||
} // end of wxPrinterDC::wxPrinterDC
|
} // end of wxPrinterDC::wxPrinterDC
|
||||||
|
|
||||||
wxPrinterDC::wxPrinterDC(
|
wxPrinterDC::wxPrinterDC( WXHDC hTheDC )
|
||||||
WXHDC hTheDC
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
m_isInteractive = FALSE;
|
m_isInteractive = false;
|
||||||
m_hDC = hTheDC;
|
m_hDC = hTheDC;
|
||||||
m_ok = TRUE;
|
m_ok = true;
|
||||||
if (m_hDC)
|
if (m_hDC)
|
||||||
{
|
{
|
||||||
SetMapMode(wxMM_TEXT);
|
SetMapMode(wxMM_TEXT);
|
||||||
@@ -165,9 +157,7 @@ void wxPrinterDC::Init()
|
|||||||
}
|
}
|
||||||
} // end of wxPrinterDC::Init
|
} // end of wxPrinterDC::Init
|
||||||
|
|
||||||
bool wxPrinterDC::StartDoc(
|
bool wxPrinterDC::StartDoc(const wxString& WXUNUSED(rsMessage))
|
||||||
const wxString& rsMessage
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
/* TODO: PM's implementation
|
/* TODO: PM's implementation
|
||||||
DOCINFO docinfo;
|
DOCINFO docinfo;
|
||||||
@@ -176,7 +166,7 @@ bool wxPrinterDC::StartDoc(
|
|||||||
|
|
||||||
wxString filename(m_printData.GetFilename());
|
wxString filename(m_printData.GetFilename());
|
||||||
|
|
||||||
if (filename.IsEmpty())
|
if (filename.empty())
|
||||||
docinfo.lpszOutput = NULL;
|
docinfo.lpszOutput = NULL;
|
||||||
else
|
else
|
||||||
docinfo.lpszOutput = (const wxChar *) filename;
|
docinfo.lpszOutput = (const wxChar *) filename;
|
||||||
@@ -187,7 +177,7 @@ bool wxPrinterDC::StartDoc(
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!m_hDC)
|
if (!m_hDC)
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
int ret =
|
int ret =
|
||||||
#ifndef __WIN32__
|
#ifndef __WIN32__
|
||||||
@@ -213,7 +203,7 @@ bool wxPrinterDC::StartDoc(
|
|||||||
#endif
|
#endif
|
||||||
return (ret > 0);
|
return (ret > 0);
|
||||||
*/
|
*/
|
||||||
return(TRUE);
|
return true;
|
||||||
} // end of wxPrinterDC::StartDoc
|
} // end of wxPrinterDC::StartDoc
|
||||||
|
|
||||||
void wxPrinterDC::EndDoc()
|
void wxPrinterDC::EndDoc()
|
||||||
@@ -234,12 +224,9 @@ void wxPrinterDC::EndPage()
|
|||||||
} // end of wxPrinterDC::EndPage
|
} // end of wxPrinterDC::EndPage
|
||||||
#if 0
|
#if 0
|
||||||
// Returns default device and port names
|
// Returns default device and port names
|
||||||
static bool wxGetDefaultDeviceName(
|
static bool wxGetDefaultDeviceName( wxString& rsDeviceName, wxString& rsPortName )
|
||||||
wxString& rsDeviceName
|
|
||||||
, wxString& rsPortName
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
rsDeviceName = "";
|
rsDeviceName = wxEmptyString;
|
||||||
/*
|
/*
|
||||||
LPDEVNAMES lpDevNames;
|
LPDEVNAMES lpDevNames;
|
||||||
LPSTR lpszDriverName;
|
LPSTR lpszDriverName;
|
||||||
@@ -268,7 +255,7 @@ static bool wxGetDefaultDeviceName(
|
|||||||
if (pd.hDevNames)
|
if (pd.hDevNames)
|
||||||
GlobalFree(pd.hDevNames);
|
GlobalFree(pd.hDevNames);
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pd.hDevNames)
|
if (pd.hDevNames)
|
||||||
@@ -292,14 +279,12 @@ static bool wxGetDefaultDeviceName(
|
|||||||
}
|
}
|
||||||
return ( deviceName != wxT("") );
|
return ( deviceName != wxT("") );
|
||||||
*/
|
*/
|
||||||
return(TRUE);
|
return true;
|
||||||
} // end of wxGetDefaultDeviceName
|
} // end of wxGetDefaultDeviceName
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Gets an HDC for the specified printer configuration
|
// Gets an HDC for the specified printer configuration
|
||||||
WXHDC WXDLLEXPORT wxGetPrinterDC(
|
WXHDC WXDLLEXPORT wxGetPrinterDC( const wxPrintData& WXUNUSED(rPrintDataConst) )
|
||||||
const wxPrintData& rPrintDataConst
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
HDC hDC = NULLHANDLE;
|
HDC hDC = NULLHANDLE;
|
||||||
/*
|
/*
|
||||||
@@ -312,7 +297,7 @@ WXHDC WXDLLEXPORT wxGetPrinterDC(
|
|||||||
wxChar* deviceName;
|
wxChar* deviceName;
|
||||||
wxChar* portName = (wxChar*) NULL; // Obsolete in WIN32
|
wxChar* portName = (wxChar*) NULL; // Obsolete in WIN32
|
||||||
|
|
||||||
if (devNameStr == wxT(""))
|
if (devNameStr.empty())
|
||||||
deviceName = (wxChar*) NULL;
|
deviceName = (wxChar*) NULL;
|
||||||
else
|
else
|
||||||
deviceName = WXSTRINGCAST devNameStr;
|
deviceName = WXSTRINGCAST devNameStr;
|
||||||
@@ -324,7 +309,7 @@ WXHDC WXDLLEXPORT wxGetPrinterDC(
|
|||||||
if ( hDevMode )
|
if ( hDevMode )
|
||||||
lpDevMode = (DEVMODE*) GlobalLock(hDevMode);
|
lpDevMode = (DEVMODE*) GlobalLock(hDevMode);
|
||||||
|
|
||||||
if (devNameStr == wxT(""))
|
if (devNameStr.empty())
|
||||||
{
|
{
|
||||||
// Retrieve the default device name
|
// Retrieve the default device name
|
||||||
wxString portName;
|
wxString portName;
|
||||||
@@ -347,12 +332,10 @@ WXHDC WXDLLEXPORT wxGetPrinterDC(
|
|||||||
return (WXHDC) hDC;
|
return (WXHDC) hDC;
|
||||||
} // end of wxGetPrinterDC
|
} // end of wxGetPrinterDC
|
||||||
|
|
||||||
void wxPrinterDC::DoDrawBitmap(
|
void wxPrinterDC::DoDrawBitmap( const wxBitmap& rBmp,
|
||||||
const wxBitmap& rBmp
|
wxCoord WXUNUSED(vX),
|
||||||
, wxCoord vX
|
wxCoord WXUNUSED(vY),
|
||||||
, wxCoord vY
|
bool WXUNUSED(bUseMask))
|
||||||
, bool bUseMask
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
wxCHECK_RET( rBmp.Ok(), _T("invalid bitmap in wxPrinterDC::DrawBitmap") );
|
wxCHECK_RET( rBmp.Ok(), _T("invalid bitmap in wxPrinterDC::DrawBitmap") );
|
||||||
|
|
||||||
@@ -363,26 +346,23 @@ void wxPrinterDC::DoDrawBitmap(
|
|||||||
|
|
||||||
} // end of wxPrinterDC::DoDrawBitmap
|
} // end of wxPrinterDC::DoDrawBitmap
|
||||||
|
|
||||||
bool wxPrinterDC::DoBlit(
|
bool wxPrinterDC::DoBlit( wxCoord WXUNUSED(vXdest),
|
||||||
wxCoord vXdest
|
wxCoord WXUNUSED(vYdest),
|
||||||
, wxCoord vYdest
|
wxCoord WXUNUSED(vWidth),
|
||||||
, wxCoord vWidth
|
wxCoord WXUNUSED(vHeight),
|
||||||
, wxCoord vHeight
|
wxDC* WXUNUSED(pSource),
|
||||||
, wxDC* pSource
|
wxCoord WXUNUSED(vXsrc),
|
||||||
, wxCoord vXsrc
|
wxCoord WXUNUSED(vYsrc),
|
||||||
, wxCoord vYsrc
|
int WXUNUSED(nRop),
|
||||||
, int nRop
|
bool WXUNUSED(bUseMask),
|
||||||
, bool bUseMask
|
wxCoord WXUNUSED(xsrcMask),
|
||||||
, wxCoord xsrcMask
|
wxCoord WXUNUSED(ysrcMask) )
|
||||||
, wxCoord ysrcMask
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
bool bSuccess = TRUE;
|
bool bSuccess = true;
|
||||||
|
|
||||||
// TODO:
|
// TODO:
|
||||||
|
|
||||||
return bSuccess;
|
return bSuccess;
|
||||||
} // end of wxPrintDC::DoBlit
|
} // end of wxPrintDC::DoBlit
|
||||||
|
|
||||||
|
|
||||||
#endif //wxUSE_PRINTING_ARCHITECTURE
|
#endif //wxUSE_PRINTING_ARCHITECTURE
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: dnd.cpp
|
// Name: src/os2/dnd.cpp
|
||||||
// Purpose: wxDropTarget, wxDropSource, wxDataObject implementation
|
// Purpose: wxDropTarget, wxDropSource, wxDataObject implementation
|
||||||
// Author: David Webster
|
// Author: David Webster
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -440,17 +440,12 @@ bool wxDropTarget::OnDrop (
|
|||||||
// wxDropSource
|
// wxDropSource
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
wxDropSource::wxDropSource (
|
wxDropSource::wxDropSource ( wxWindow* WXUNUSED(pWin) )
|
||||||
wxWindow* pWin
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Init();
|
Init();
|
||||||
} // end of wxDropSource::wxDropSource
|
} // end of wxDropSource::wxDropSource
|
||||||
|
|
||||||
wxDropSource::wxDropSource (
|
wxDropSource::wxDropSource ( wxDataObject& rData, wxWindow* WXUNUSED(pWin) )
|
||||||
wxDataObject& rData
|
|
||||||
, wxWindow* pWin
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Init();
|
Init();
|
||||||
SetData(rData);
|
SetData(rData);
|
||||||
@@ -548,13 +543,13 @@ void wxDropSource::Init ()
|
|||||||
m_vDragImage.cxOffset = 0;
|
m_vDragImage.cxOffset = 0;
|
||||||
m_vDragImage.cyOffset = 0;
|
m_vDragImage.cyOffset = 0;
|
||||||
|
|
||||||
HSTR hStrType = ::DrgAddStrHandle(DRT_UNKNOWN);
|
HSTR hStrType = ::DrgAddStrHandle(DRT_UNKNOWN);
|
||||||
HSTR hStrRMF;
|
HSTR hStrRMF;
|
||||||
HSTR hStrContainer;
|
HSTR hStrContainer;
|
||||||
wxChar zFormats[128];
|
wxChar zFormats[128];
|
||||||
wxChar zContainer[128];
|
wxChar zContainer[128];
|
||||||
USHORT uSize = GetDataObject()->GetDataSize(GetDataObject()->GetPreferredFormat()) + 1;
|
USHORT uSize = (USHORT)(GetDataObject()->GetDataSize(GetDataObject()->GetPreferredFormat()) + 1);
|
||||||
wxChar* pzBuffer = new wxChar[uSize];
|
wxChar* pzBuffer = new wxChar[uSize];
|
||||||
|
|
||||||
memset(pzBuffer, '\0', GetDataObject()->GetDataSize(GetDataObject()->GetPreferredFormat()));
|
memset(pzBuffer, '\0', GetDataObject()->GetDataSize(GetDataObject()->GetPreferredFormat()));
|
||||||
pzBuffer[GetDataObject()->GetDataSize(GetDataObject()->GetPreferredFormat())] = '\0';
|
pzBuffer[GetDataObject()->GetDataSize(GetDataObject()->GetPreferredFormat())] = '\0';
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: frame.cpp
|
// Name: src/os2/frame.cpp
|
||||||
// Purpose: wxFrame
|
// Purpose: wxFrame
|
||||||
// Author: David Webster
|
// Author: David Webster
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -242,13 +242,8 @@ wxStatusBar* wxFrame::OnCreateStatusBar(
|
|||||||
,nHeight
|
,nHeight
|
||||||
);
|
);
|
||||||
|
|
||||||
::WinSetParent( pStatusBar->GetHWND()
|
::WinSetParent( pStatusBar->GetHWND(), m_hFrame, FALSE );
|
||||||
,m_hFrame
|
::WinSetOwner( pStatusBar->GetHWND(), m_hFrame);
|
||||||
,FALSE
|
|
||||||
);
|
|
||||||
::WinSetOwner( pStatusBar->GetHWND()
|
|
||||||
,m_hFrame
|
|
||||||
);
|
|
||||||
//
|
//
|
||||||
// to show statusbar
|
// to show statusbar
|
||||||
//
|
//
|
||||||
@@ -310,24 +305,15 @@ void wxFrame::PositionStatusBar()
|
|||||||
#endif // wxUSE_STATUSBAR
|
#endif // wxUSE_STATUSBAR
|
||||||
|
|
||||||
#if wxUSE_TOOLBAR
|
#if wxUSE_TOOLBAR
|
||||||
wxToolBar* wxFrame::OnCreateToolBar(
|
wxToolBar* wxFrame::OnCreateToolBar( long lStyle, wxWindowID vId, const wxString& rsName )
|
||||||
long lStyle
|
|
||||||
, wxWindowID vId
|
|
||||||
, const wxString& rsName
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
wxToolBar* pToolBar = wxFrameBase::OnCreateToolBar( lStyle
|
wxToolBar* pToolBar = wxFrameBase::OnCreateToolBar( lStyle
|
||||||
,vId
|
,vId
|
||||||
,rsName
|
,rsName
|
||||||
);
|
);
|
||||||
|
|
||||||
::WinSetParent( pToolBar->GetHWND()
|
::WinSetParent( pToolBar->GetHWND(), m_hFrame, FALSE);
|
||||||
,m_hFrame
|
::WinSetOwner( pToolBar->GetHWND(), m_hFrame);
|
||||||
,FALSE
|
|
||||||
);
|
|
||||||
::WinSetOwner( pToolBar->GetHWND()
|
|
||||||
,m_hFrame
|
|
||||||
);
|
|
||||||
return pToolBar;
|
return pToolBar;
|
||||||
} // end of WinGuiBase_CFrame::OnCreateToolBar
|
} // end of WinGuiBase_CFrame::OnCreateToolBar
|
||||||
#endif
|
#endif
|
||||||
@@ -875,17 +861,12 @@ bool wxFrame::HandlePaint()
|
|||||||
|
|
||||||
::WinQueryWindowRect(GetHwnd(), &vRect3);
|
::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 nIconWidth = 32;
|
||||||
static const int nIconHeight = 32;
|
static const int nIconHeight = 32;
|
||||||
int nIconX = (int)((vRect3.xRight - nIconWidth)/2);
|
int nIconX = (int)((vRect3.xRight - nIconWidth)/2);
|
||||||
int nIconY = (int)((vRect3.yBottom + nIconHeight)/2);
|
int nIconY = (int)((vRect3.yBottom + nIconHeight)/2);
|
||||||
|
|
||||||
::WinDrawPointer(hPs, nIconX, nIconY, hIcon, DP_NORMAL);
|
::WinDrawPointer(hPs, nIconX, nIconY, hIcon, DP_NORMAL);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
::WinEndPaint(hPs);
|
::WinEndPaint(hPs);
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: icon.cpp
|
// Name: src/os2/icon.cpp
|
||||||
// Purpose: wxIcon class
|
// Purpose: wxIcon class
|
||||||
// Author: David Webster
|
// Author: David Webster
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -73,7 +73,7 @@ wxIcon::wxIcon( const wxString& rIconFile,
|
|||||||
// So we have a modified name where replace the last three characters
|
// So we have a modified name where replace the last three characters
|
||||||
// with os2. Also need the extension.
|
// 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");
|
sOs2Name += wxT("Os2.ico");
|
||||||
LoadFile( sOs2Name
|
LoadFile( sOs2Name
|
||||||
@@ -122,21 +122,20 @@ void wxIcon::CopyFromBitmap( const wxBitmap& rBmp )
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
BITMAPINFOHEADER2 vHeader;
|
BITMAPINFOHEADER2 vHeader;
|
||||||
SIZEL vSize = {0, 0};
|
SIZEL vSize = {0, 0};
|
||||||
DEVOPENSTRUC vDop = {0L, "DISPLAY", NULL, 0L, 0L, 0L, 0L, 0L, 0L};
|
DEVOPENSTRUC vDop = {0L, "DISPLAY", NULL, 0L, 0L, 0L, 0L, 0L, 0L};
|
||||||
HDC hDCSrc = ::DevOpenDC(vHabmain, OD_MEMORY, "*", 5L, (PDEVOPENDATA)&vDop, NULLHANDLE);
|
HDC hDCSrc = ::DevOpenDC(vHabmain, OD_MEMORY, "*", 5L, (PDEVOPENDATA)&vDop, NULLHANDLE);
|
||||||
HDC hDCDst = ::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 hPSSrc = ::GpiCreatePS(vHabmain, hDCSrc, &vSize, PU_PELS | GPIA_ASSOC);
|
||||||
HPS hPSDst = ::GpiCreatePS(vHabmain, hDCDst, &vSize, PU_PELS | GPIA_ASSOC);
|
HPS hPSDst = ::GpiCreatePS(vHabmain, hDCDst, &vSize, PU_PELS | GPIA_ASSOC);
|
||||||
POINTL vPoint[4] = { {0, 0}, {rBmp.GetWidth(), rBmp.GetHeight()},
|
POINTL vPoint[4] = { {0, 0}, {rBmp.GetWidth(), rBmp.GetHeight()},
|
||||||
{0, 0}, {rBmp.GetWidth(), rBmp.GetHeight()}
|
{0, 0}, {rBmp.GetWidth(), rBmp.GetHeight()}
|
||||||
};
|
};
|
||||||
POINTL vPointMask[4] = { {0, 0}, {rBmp.GetWidth(), rBmp.GetHeight() * 2},
|
POINTL vPointMask[4] = { {0, 0}, {rBmp.GetWidth(), rBmp.GetHeight() * 2},
|
||||||
{0, 0}, {rBmp.GetWidth(), rBmp.GetHeight()}
|
{0, 0}, {rBmp.GetWidth(), rBmp.GetHeight()}
|
||||||
};
|
};
|
||||||
|
POINTERINFO vIconInfo;
|
||||||
POINTERINFO vIconInfo;
|
|
||||||
|
|
||||||
memset(&vIconInfo, '\0', sizeof(POINTERINFO));
|
memset(&vIconInfo, '\0', sizeof(POINTERINFO));
|
||||||
vIconInfo.fPointer = FALSE; // we want an icon, not a pointer
|
vIconInfo.fPointer = FALSE; // we want an icon, not a pointer
|
||||||
@@ -230,10 +229,6 @@ void wxIcon::CopyFromBitmap( const wxBitmap& rBmp )
|
|||||||
|
|
||||||
vIconInfo.hbmPointer = hBmpMask;
|
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);
|
HICON hIcon = ::WinCreatePointerIndirect( HWND_DESKTOP, &vIconInfo);
|
||||||
|
|
||||||
if (!hIcon)
|
if (!hIcon)
|
||||||
@@ -249,7 +244,6 @@ void wxIcon::CopyFromBitmap( const wxBitmap& rBmp )
|
|||||||
,rBmp.GetHeight()
|
,rBmp.GetHeight()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!rBmp.GetMask())
|
if (!rBmp.GetMask())
|
||||||
{
|
{
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: print.cpp
|
// Name: src/os2/print.cpp
|
||||||
// Purpose: Print framework
|
// Purpose: Print framework
|
||||||
// Author: David Webster
|
// Author: David Webster
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -40,13 +40,15 @@ wxOS2Printer::~wxOS2Printer()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
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.
|
// TODO. See wxPostScriptPrinter::Print for hints.
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxDC* wxOS2Printer::PrintDialog(wxWindow *parent)
|
wxDC* wxOS2Printer::PrintDialog(wxWindow *WXUNUSED(parent))
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
/*
|
/*
|
||||||
@@ -56,15 +58,17 @@ wxDC* wxOS2Printer::PrintDialog(wxWindow *parent)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxOS2Printer::Setup(wxWindow *parent)
|
bool wxOS2Printer::Setup(wxWindow *WXUNUSED(parent))
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
/*
|
/*
|
||||||
wxPrintDialog dialog(parent, & m_printData);
|
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 (dialog.ShowModal() == wxID_OK);
|
||||||
*/
|
*/
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -87,13 +91,13 @@ wxOS2PrintPreview::~wxOS2PrintPreview()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxOS2PrintPreview::Print(bool interactive)
|
bool wxOS2PrintPreview::Print(bool WXUNUSED(interactive))
|
||||||
{
|
{
|
||||||
if (!m_printPrintout)
|
if (!m_printPrintout)
|
||||||
return FALSE;
|
return false;
|
||||||
// wxOS2Printer printer(&m_printData);
|
// wxOS2Printer printer(&m_printData);
|
||||||
// return printer.Print(m_previewFrame, m_printPrintout, interactive);
|
// return printer.Print(m_previewFrame, m_printPrintout, interactive);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxOS2PrintPreview::DetermineScaling()
|
void wxOS2PrintPreview::DetermineScaling()
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: windows.cpp
|
// Name: src/os2/window.cpp
|
||||||
// Purpose: wxWindow
|
// Purpose: wxWindow
|
||||||
// Author: David Webster
|
// Author: David Webster
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -1809,7 +1809,7 @@ void wxWindowOS2::GetTextExtent( const wxString& rString,
|
|||||||
|
|
||||||
hPS = ::WinGetPS(GetHwnd());
|
hPS = ::WinGetPS(GetHwnd());
|
||||||
|
|
||||||
l = rString.Length();
|
l = rString.length();
|
||||||
if (l > 0L)
|
if (l > 0L)
|
||||||
{
|
{
|
||||||
pStr = (PCH)rString.c_str();
|
pStr = (PCH)rString.c_str();
|
||||||
@@ -1817,12 +1817,12 @@ void wxWindowOS2::GetTextExtent( const wxString& rString,
|
|||||||
//
|
//
|
||||||
// In world coordinates.
|
// In world coordinates.
|
||||||
//
|
//
|
||||||
bRc = ::GpiQueryTextBox( hPS
|
bRc = ::GpiQueryTextBox( hPS,
|
||||||
,l
|
l,
|
||||||
,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)
|
||||||
{
|
{
|
||||||
vPtMin.x = avPoint[0].x;
|
vPtMin.x = avPoint[0].x;
|
||||||
@@ -1910,9 +1910,7 @@ bool wxWindowOS2::IsMouseInWindow() const
|
|||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
#if wxUSE_MENUS_NATIVE
|
#if wxUSE_MENUS_NATIVE
|
||||||
bool wxWindowOS2::DoPopupMenu( wxMenu* pMenu,
|
bool wxWindowOS2::DoPopupMenu( wxMenu* pMenu, int nX, int nY )
|
||||||
int nX,
|
|
||||||
int nY )
|
|
||||||
{
|
{
|
||||||
HWND hWndOwner = GetHwnd();
|
HWND hWndOwner = GetHwnd();
|
||||||
HWND hWndParent = GetHwnd();
|
HWND hWndParent = GetHwnd();
|
||||||
@@ -3878,25 +3876,15 @@ bool wxWindowOS2::HandleGetMinMaxInfo( PSWP pSwp )
|
|||||||
switch(pSwp->fl)
|
switch(pSwp->fl)
|
||||||
{
|
{
|
||||||
case SWP_MAXIMIZE:
|
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);
|
::WinGetMaxPosition(GetHwnd(), pSwp);
|
||||||
m_maxWidth = pSwp->cx;
|
m_maxWidth = pSwp->cx;
|
||||||
m_maxHeight = pSwp->cy;
|
m_maxHeight = pSwp->cy;
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SWP_MINIMIZE:
|
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);
|
::WinGetMinPosition(GetHwnd(), pSwp, &vPoint);
|
||||||
m_minWidth = pSwp->cx;
|
m_minWidth = pSwp->cx;
|
||||||
m_minHeight = pSwp->cy;
|
m_minHeight = pSwp->cy;
|
||||||
#else
|
|
||||||
wxUnusedVar(vPoint);
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -3955,7 +3943,7 @@ bool wxWindowOS2::HandleSysCommand( WXWPARAM wParam,
|
|||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// mouse events
|
// mouse events
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
//TODO!!! check against MSW
|
//TODO: check against MSW
|
||||||
void wxWindowOS2::InitMouseEvent(
|
void wxWindowOS2::InitMouseEvent(
|
||||||
wxMouseEvent& rEvent
|
wxMouseEvent& rEvent
|
||||||
, int nX
|
, int nX
|
||||||
@@ -5168,14 +5156,14 @@ wxWindow* wxFindWindowAtPointer(wxPoint& WXUNUSED(rPt))
|
|||||||
|
|
||||||
wxWindow* wxFindWindowAtPoint(const wxPoint& rPt)
|
wxWindow* wxFindWindowAtPoint(const wxPoint& rPt)
|
||||||
{
|
{
|
||||||
POINTL vPt2;
|
POINTL vPt2;
|
||||||
|
|
||||||
vPt2.x = rPt.x;
|
vPt2.x = rPt.x;
|
||||||
vPt2.y = rPt.y;
|
vPt2.y = rPt.y;
|
||||||
|
|
||||||
HWND hWndHit = ::WinWindowFromPoint(HWND_DESKTOP, &vPt2, FALSE);
|
HWND hWndHit = ::WinWindowFromPoint(HWND_DESKTOP, &vPt2, FALSE);
|
||||||
wxWindow* pWin = wxFindWinFromHandle((WXHWND)hWndHit) ;
|
wxWindow* pWin = wxFindWinFromHandle((WXHWND)hWndHit) ;
|
||||||
HWND hWnd = 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
|
||||||
|
Reference in New Issue
Block a user