X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2049ba38adafa0ec146880de29f26e32dd69a125..5d1902d6d6efc842c8f488520d3cca40f1ae99f8:/src/common/cmndata.cpp?ds=sidebyside diff --git a/src/common/cmndata.cpp b/src/common/cmndata.cpp index b3e4eb2c21..07fd3cd826 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 @@ -32,10 +33,16 @@ #ifdef __WXMSW__ #include -#ifndef __WIN32__ +#if !defined(__WIN32__) #include #include #endif + +#if defined(__WATCOMC__) || defined(__SC__) || defined(__SALFORDC__) +#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,7 +132,7 @@ void wxFontData::operator=(const wxFontData& data) * Print data */ -wxPrintData::wxPrintData(void) +wxPrintData::wxPrintData() { #ifdef __WXMSW__ printData = NULL; @@ -146,7 +153,7 @@ wxPrintData::wxPrintData(void) printSetupDialog = FALSE; } -wxPrintData::~wxPrintData(void) +wxPrintData::~wxPrintData() { #ifdef __WXMSW__ PRINTDLG *pd = (PRINTDLG *)printData; @@ -158,7 +165,7 @@ wxPrintData::~wxPrintData(void) } #ifdef __WXMSW__ -void wxPrintData::ConvertToNative(void) +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 ) @@ -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 )