X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c801d85f158c4cba50b588807daabdcbd0ed3853..e29b83a455bead3dae44300f631d07aa9635d3e9:/src/common/cmndata.cpp diff --git a/src/common/cmndata.cpp b/src/common/cmndata.cpp index 100112b331..91eb71f5a5 100644 --- a/src/common/cmndata.cpp +++ b/src/common/cmndata.cpp @@ -6,7 +6,7 @@ // Created: 01/02/97 // RCS-ID: $Id$ // Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ @@ -22,6 +22,7 @@ #ifndef WX_PRECOMP #include +#include "wx/string.h" #include "wx/utils.h" #include "wx/app.h" #endif @@ -29,13 +30,19 @@ #include "wx/gdicmn.h" #include "wx/cmndata.h" -#ifdef __WINDOWS__ +#ifdef __WXMSW__ #include -#ifndef __WIN32__ +#if !defined(__WIN32__) #include #include #endif + +#if defined(__WATCOMC__) || defined(__SC__) +#include +#include +#endif + #endif #if !USE_SHARED_LIBRARY @@ -49,7 +56,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxColourData, wxObject) * wxColourData */ -wxColourData::wxColourData(void) +wxColourData::wxColourData() { int i; for (i = 0; i < 16; i++) @@ -57,9 +64,9 @@ wxColourData::wxColourData(void) chooseFull = FALSE; dataColour.Set(0,0,0); -} +} -wxColourData::~wxColourData(void) +wxColourData::~wxColourData() { } @@ -93,7 +100,7 @@ void wxColourData::operator=(const wxColourData& data) * Font data */ -wxFontData::wxFontData(void) +wxFontData::wxFontData() { // Intialize colour to black. fontColour.Set(0, 0, 0); @@ -105,7 +112,7 @@ wxFontData::wxFontData(void) maxSize = 0; } -wxFontData::~wxFontData(void) +wxFontData::~wxFontData() { } @@ -125,9 +132,9 @@ void wxFontData::operator=(const wxFontData& data) * Print data */ -wxPrintData::wxPrintData(void) +wxPrintData::wxPrintData() { -#ifdef __WINDOWS__ +#ifdef __WXMSW__ printData = NULL; #endif printOrientation = wxPORTRAIT; @@ -146,9 +153,9 @@ wxPrintData::wxPrintData(void) printSetupDialog = FALSE; } -wxPrintData::~wxPrintData(void) +wxPrintData::~wxPrintData() { -#ifdef __WINDOWS__ +#ifdef __WXMSW__ PRINTDLG *pd = (PRINTDLG *)printData; if ( pd && pd->hDevMode ) GlobalFree(pd->hDevMode); @@ -157,8 +164,8 @@ wxPrintData::~wxPrintData(void) #endif } -#ifdef __WINDOWS__ -void wxPrintData::ConvertToNative(void) +#ifdef __WXMSW__ +void wxPrintData::ConvertToNative() { PRINTDLG *pd = (PRINTDLG*) printData; if ( pd == NULL ) @@ -173,8 +180,6 @@ void wxPrintData::ConvertToNative(void) pd->hDevMode = NULL; // Will be created by PrintDlg pd->hDevNames = NULL; // Ditto - // Why had I put this #ifdef in?? Seems fine to me. -#if 1 pd->Flags = PD_RETURNDEFAULT; pd->nCopies = 1; @@ -195,7 +200,6 @@ void wxPrintData::ConvertToNative(void) GlobalFree(pd->hDevNames); pd->hDevNames = NULL; } -#endif } if ( pd->hDevMode ) @@ -215,7 +219,7 @@ void wxPrintData::ConvertToNative(void) pd->Flags = PD_RETURNDC ; // pd->lStructSize = sizeof( PRINTDLG ); pd->lStructSize = 66 ; - pd->hwndOwner=(HANDLE)NULL; + pd->hwndOwner=(HWND)NULL; pd->hDevNames=(HANDLE)NULL; pd->hInstance=(HINSTANCE)NULL; pd->lCustData = (LPARAM) NULL; @@ -244,7 +248,7 @@ void wxPrintData::ConvertToNative(void) pd->Flags |= PD_PRINTSETUP; } -void wxPrintData::ConvertFromNative(void) +void wxPrintData::ConvertFromNative() { PRINTDLG *pd = (PRINTDLG*) printData; if ( pd == NULL ) @@ -307,7 +311,7 @@ void wxPrintData::operator=(const wxPrintData& data) * wxPageSetupData */ -wxPageSetupData::wxPageSetupData(void) +wxPageSetupData::wxPageSetupData() { #if defined(__WIN95__) m_pageSetupData = NULL; @@ -329,9 +333,9 @@ wxPageSetupData::wxPageSetupData(void) m_getDefaultInfo = FALSE; } -wxPageSetupData::~wxPageSetupData(void) +wxPageSetupData::~wxPageSetupData() { -#if defined(__WIN95__) +#if defined(__WIN95__) && defined(__WXMSW__) PAGESETUPDLG *pd = (PAGESETUPDLG *)m_pageSetupData; if ( pd && pd->hDevMode ) GlobalFree(pd->hDevMode); @@ -358,8 +362,8 @@ void wxPageSetupData::operator=(const wxPageSetupData& data) m_enableHelp = data.m_enableHelp; } -#if defined(__WIN95__) -void wxPageSetupData::ConvertToNative(void) +#if defined(__WXMSW__) && defined(__WIN95__) +void wxPageSetupData::ConvertToNative() { PAGESETUPDLG *pd = (PAGESETUPDLG*) m_pageSetupData; if ( m_pageSetupData == NULL ) @@ -368,7 +372,7 @@ void wxPageSetupData::ConvertToNative(void) pd->hDevMode = GlobalAlloc(GMEM_MOVEABLE, sizeof(DEVMODE)); m_pageSetupData = (void *)pd; } - + pd->Flags = PSD_MARGINS|PSD_MINMARGINS; if ( m_defaultMinMargins ) @@ -387,7 +391,7 @@ void wxPageSetupData::ConvertToNative(void) pd->Flags |= PSD_SHOWHELP; pd->lStructSize = sizeof( PAGESETUPDLG ); - pd->hwndOwner=(HANDLE)NULL; + pd->hwndOwner=(HWND)NULL; pd->hDevNames=(HWND)NULL; pd->hInstance=(HINSTANCE)NULL; @@ -421,7 +425,7 @@ void wxPageSetupData::ConvertToNative(void) } } -void wxPageSetupData::ConvertFromNative(void) +void wxPageSetupData::ConvertFromNative() { PAGESETUPDLG *pd = (PAGESETUPDLG *) m_pageSetupData ; if ( !pd )