X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..daebb84bff054d3833baca58a5dc506de56c64a1:/src/mac/classic/printdlg.cpp diff --git a/src/mac/classic/printdlg.cpp b/src/mac/classic/printdlg.cpp index 8836ea007b..94f7469d8c 100644 --- a/src/mac/classic/printdlg.cpp +++ b/src/mac/classic/printdlg.cpp @@ -1,19 +1,21 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: printdlg.cpp +// Name: src/mac/classic/printdlg.cpp // Purpose: wxPrintDialog, wxPageSetupDialog // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 // RCS-ID: $Id$ // Copyright: (c) Stefan Csomor -// Licence: wxWidgets licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "printdlg.h" +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifndef WX_PRECOMP + #include "wx/object.h" #endif -#include "wx/object.h" #include "wx/printdlg.h" #include "wx/dcprint.h" #include "wx/msgdlg.h" @@ -21,16 +23,14 @@ // Use generic page setup dialog: use your own native one if one exists. -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxPrintDialog, wxDialog) IMPLEMENT_CLASS(wxPageSetupDialog, wxDialog) -#endif wxPrintDialog::wxPrintDialog() { m_dialogParent = NULL; m_printerDC = NULL; - m_destroyDC = TRUE; + m_destroyDC = true; } wxPrintDialog::wxPrintDialog(wxWindow *p, wxPrintDialogData* data) @@ -43,7 +43,7 @@ wxPrintDialog::wxPrintDialog(wxWindow *p, wxPrintData* data) wxPrintDialogData data2; if ( data ) data2 = *data; - + Create(p, &data2); } @@ -51,12 +51,12 @@ bool wxPrintDialog::Create(wxWindow *p, wxPrintDialogData* data) { m_dialogParent = p; m_printerDC = NULL; - m_destroyDC = TRUE; - + m_destroyDC = true; + if ( data ) m_printDialogData = *data; - - return TRUE; + + return true; } wxPrintDialog::~wxPrintDialog() @@ -73,7 +73,7 @@ int wxPrintDialog::ShowModal() int result = m_printDialogData.GetPrintData().m_nativePrintData->ShowPrintDialog() ; if ( result == wxID_OK ) m_printDialogData.ConvertFromNative() ; - + return result ; } @@ -101,11 +101,11 @@ wxDialog() bool wxPageSetupDialog::Create(wxWindow *p, wxPageSetupData *data) { m_dialogParent = p; - + if (data) m_pageSetupData = (*data); - - return TRUE; + + return true; } wxPageSetupDialog::~wxPageSetupDialog() @@ -118,7 +118,6 @@ int wxPageSetupDialog::ShowModal() int result = m_pageSetupData.GetPrintData().m_nativePrintData->ShowPageSetupDialog() ; if (result == wxID_OK ) m_pageSetupData.ConvertFromNative() ; - + return result ; } -