more backwards compatibility
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -9,59 +9,75 @@
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// ============================================================================
|
||||
// declarations
|
||||
// ============================================================================
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "cmndata.h"
|
||||
#pragma implementation "cmndata.h"
|
||||
#endif
|
||||
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include <stdio.h>
|
||||
#include "wx/string.h"
|
||||
#include "wx/utils.h"
|
||||
#include "wx/app.h"
|
||||
#include <stdio.h>
|
||||
#include "wx/string.h"
|
||||
#include "wx/utils.h"
|
||||
#include "wx/app.h"
|
||||
#endif
|
||||
|
||||
#include "wx/gdicmn.h"
|
||||
#include "wx/cmndata.h"
|
||||
|
||||
#include "wx/paper.h"
|
||||
|
||||
// For compatibility
|
||||
#if (defined(__WXMOTIF__) || defined(__WXGTK__)) && wxUSE_POSTSCRIPT
|
||||
#include "wx/generic/dcpsg.h"
|
||||
#define wxCOMPATIBILITY_WITH_PRINTSETUPDATA 1
|
||||
#endif
|
||||
|
||||
#if wxCOMPATIBILITY_WITH_PRINTSETUPDATA
|
||||
#include "wx/generic/dcpsg.h"
|
||||
#endif
|
||||
|
||||
#ifdef __WXMSW__
|
||||
#include <windows.h>
|
||||
#include <windows.h>
|
||||
|
||||
#if !defined(__WIN32__)
|
||||
#include <print.h>
|
||||
#include <commdlg.h>
|
||||
#endif
|
||||
#if !defined(__WIN32__)
|
||||
#include <print.h>
|
||||
#include <commdlg.h>
|
||||
#endif // Win16
|
||||
|
||||
#if defined(__WATCOMC__) || defined(__SC__) || defined(__SALFORDC__)
|
||||
#include <windowsx.h>
|
||||
#include <commdlg.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#if defined(__WATCOMC__) || defined(__SC__) || defined(__SALFORDC__)
|
||||
#include <windowsx.h>
|
||||
#include <commdlg.h>
|
||||
#endif
|
||||
#endif // MSW
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPrintData, wxObject)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPrintDialogData, wxObject)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPageSetupDialogData, wxObject)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxFontData, wxObject)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxColourData, wxObject)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPrintData, wxObject)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPrintDialogData, wxObject)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPageSetupDialogData, wxObject)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxFontData, wxObject)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxColourData, wxObject)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* wxColourData
|
||||
*/
|
||||
// ============================================================================
|
||||
// implementation
|
||||
// ============================================================================
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxColourData
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxColourData::wxColourData()
|
||||
{
|
||||
@@ -108,9 +124,9 @@ void wxColourData::operator=(const wxColourData& data)
|
||||
chooseFull = data.chooseFull;
|
||||
}
|
||||
|
||||
/*
|
||||
* Font data
|
||||
*/
|
||||
// ----------------------------------------------------------------------------
|
||||
// Font data
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxFontData::wxFontData()
|
||||
{
|
||||
@@ -145,9 +161,9 @@ void wxFontData::operator=(const wxFontData& data)
|
||||
maxSize = data.maxSize;
|
||||
}
|
||||
|
||||
/*
|
||||
* Print data
|
||||
*/
|
||||
// ----------------------------------------------------------------------------
|
||||
// Print data
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxPrintData::wxPrintData()
|
||||
{
|
||||
@@ -556,7 +572,7 @@ void wxPrintData::operator=(const wxPrintData& data)
|
||||
}
|
||||
|
||||
// For compatibility
|
||||
#if (defined(__WXMOTIF__) || defined(__WXGTK__)) && wxUSE_POSTSCRIPT
|
||||
#if wxCOMPATIBILITY_WITH_PRINTSETUPDATA
|
||||
void wxPrintData::operator=(const wxPrintSetupData& setupData)
|
||||
{
|
||||
SetPrinterCommand(setupData.GetPrinterCommand());
|
||||
@@ -579,12 +595,12 @@ void wxPrintData::operator=(const wxPrintSetupData& setupData)
|
||||
SetColour(setupData.GetColour());
|
||||
SetFilename(setupData.GetPrinterFile());
|
||||
}
|
||||
#endif
|
||||
#endif // wxCOMPATIBILITY_WITH_PRINTSETUPDATA
|
||||
|
||||
|
||||
/*
|
||||
* Print dialog data
|
||||
*/
|
||||
// ----------------------------------------------------------------------------
|
||||
// Print dialog data
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxPrintDialogData::wxPrintDialogData()
|
||||
{
|
||||
@@ -791,7 +807,7 @@ void wxPrintDialogData::SetOwnerWindow(wxWindow* win)
|
||||
pd->hwndOwner=(HWND) win->GetHWND();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif // MSW
|
||||
|
||||
void wxPrintDialogData::operator=(const wxPrintDialogData& data)
|
||||
{
|
||||
@@ -817,9 +833,9 @@ void wxPrintDialogData::operator=(const wxPrintData& data)
|
||||
m_printData = data;
|
||||
}
|
||||
|
||||
/*
|
||||
* wxPageSetupDialogData
|
||||
*/
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxPageSetupDialogData
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxPageSetupDialogData::wxPageSetupDialogData()
|
||||
{
|
||||
@@ -911,7 +927,7 @@ void wxPageSetupDialogData::operator=(const wxPrintData& data)
|
||||
m_printData = data;
|
||||
}
|
||||
|
||||
#if defined(__WXMSW__) && defined(__WIN95__)
|
||||
#if defined(__WIN95__)
|
||||
void wxPageSetupDialogData::ConvertToNative()
|
||||
{
|
||||
m_printData.ConvertToNative();
|
||||
@@ -1056,7 +1072,7 @@ void wxPageSetupDialogData::SetOwnerWindow(wxWindow* win)
|
||||
pd->hwndOwner=(HWND) win->GetHWND();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif // Win95
|
||||
|
||||
// If a corresponding paper type is found in the paper database, will set the m_printData
|
||||
// paper size id member as well.
|
||||
@@ -1079,7 +1095,9 @@ void wxPageSetupDialogData::SetPaperSize(wxPaperSize id)
|
||||
// paper id
|
||||
void wxPageSetupDialogData::CalculateIdFromPaperSize()
|
||||
{
|
||||
wxASSERT_MSG( (wxThePrintPaperDatabase != (wxPrintPaperDatabase*) NULL), "wxThePrintPaperDatabase should not be NULL. Do not create global print dialog data objects." );
|
||||
wxASSERT_MSG( (wxThePrintPaperDatabase != (wxPrintPaperDatabase*) NULL),
|
||||
"wxThePrintPaperDatabase should not be NULL. "
|
||||
"Do not create global print dialog data objects." );
|
||||
|
||||
wxSize sz = GetPaperSize();
|
||||
|
||||
@@ -1093,7 +1111,9 @@ void wxPageSetupDialogData::CalculateIdFromPaperSize()
|
||||
// Use paper id in wxPrintData to set this object's paper size
|
||||
void wxPageSetupDialogData::CalculatePaperSizeFromId()
|
||||
{
|
||||
wxASSERT_MSG( (wxThePrintPaperDatabase != (wxPrintPaperDatabase*) NULL), "wxThePrintPaperDatabase should not be NULL. Do not create global print dialog data objects." );
|
||||
wxASSERT_MSG( (wxThePrintPaperDatabase != (wxPrintPaperDatabase*) NULL),
|
||||
"wxThePrintPaperDatabase should not be NULL. "
|
||||
"Do not create global print dialog data objects." );
|
||||
|
||||
wxSize sz = wxThePrintPaperDatabase->GetSize(m_printData.GetPaperId());
|
||||
|
||||
@@ -1104,3 +1124,4 @@ void wxPageSetupDialogData::CalculatePaperSizeFromId()
|
||||
m_paperSize.y = sz.y * 10;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -223,12 +223,12 @@ void wxPreviewCanvas::OnSysColourChanged(wxSysColourChangedEvent& event)
|
||||
*/
|
||||
|
||||
BEGIN_EVENT_TABLE(wxPreviewControlBar, wxPanel)
|
||||
EVT_BUTTON(wxID_PREVIEW_CLOSE, wxPreviewControlBar::OnWindowClose)
|
||||
EVT_BUTTON(wxID_PREVIEW_PRINT, wxPreviewControlBar::OnPrint)
|
||||
EVT_BUTTON(wxID_PREVIEW_PREVIOUS, wxPreviewControlBar::OnPrevious)
|
||||
EVT_BUTTON(wxID_PREVIEW_NEXT, wxPreviewControlBar::OnNext)
|
||||
EVT_CHOICE(wxID_PREVIEW_ZOOM, wxPreviewControlBar::OnZoom)
|
||||
EVT_PAINT(wxPreviewControlBar::OnPaint)
|
||||
EVT_BUTTON(wxID_PREVIEW_CLOSE, wxPreviewControlBar::OnWindowClose)
|
||||
EVT_BUTTON(wxID_PREVIEW_PRINT, wxPreviewControlBar::OnPrint)
|
||||
EVT_BUTTON(wxID_PREVIEW_PREVIOUS, wxPreviewControlBar::OnPrevious)
|
||||
EVT_BUTTON(wxID_PREVIEW_NEXT, wxPreviewControlBar::OnNext)
|
||||
EVT_CHOICE(wxID_PREVIEW_ZOOM, wxPreviewControlBar::OnZoom)
|
||||
EVT_PAINT(wxPreviewControlBar::OnPaint)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
wxPreviewControlBar::wxPreviewControlBar(wxPrintPreviewBase *preview, long buttons,
|
||||
@@ -531,7 +531,28 @@ void wxPreviewFrame::CreateControlBar()
|
||||
* Print preview
|
||||
*/
|
||||
|
||||
wxPrintPreviewBase::wxPrintPreviewBase(wxPrintout *printout, wxPrintout *printoutForPrinting, wxPrintDialogData *data)
|
||||
wxPrintPreviewBase::wxPrintPreviewBase(wxPrintout *printout,
|
||||
wxPrintout *printoutForPrinting,
|
||||
wxPrintData *data)
|
||||
{
|
||||
if (data)
|
||||
m_printDialogData = (*data);
|
||||
|
||||
Init(printout, printoutForPrinting);
|
||||
}
|
||||
|
||||
wxPrintPreviewBase::wxPrintPreviewBase(wxPrintout *printout,
|
||||
wxPrintout *printoutForPrinting,
|
||||
wxPrintDialogData *data)
|
||||
{
|
||||
if (data)
|
||||
m_printDialogData = (*data);
|
||||
|
||||
Init(printout, printoutForPrinting);
|
||||
}
|
||||
|
||||
void wxPrintPreviewBase::Init(wxPrintout *printout,
|
||||
wxPrintout *printoutForPrinting)
|
||||
{
|
||||
m_isOk = TRUE;
|
||||
m_previewPrintout = printout;
|
||||
@@ -539,8 +560,6 @@ wxPrintPreviewBase::wxPrintPreviewBase(wxPrintout *printout, wxPrintout *printou
|
||||
m_previewPrintout->SetIsPreview(TRUE);
|
||||
|
||||
m_printPrintout = printoutForPrinting;
|
||||
if (data)
|
||||
m_printDialogData = (*data);
|
||||
|
||||
m_previewCanvas = NULL;
|
||||
m_previewFrame = NULL;
|
||||
|
@@ -1935,7 +1935,7 @@ wxPostScriptPrintDialog::wxPostScriptPrintDialog (wxWindow *parent, const wxStri
|
||||
radio0->SetSelection((int)wxThePrintSetupData->GetPrinterOrientation() - 1);
|
||||
|
||||
// @@@ Configuration hook
|
||||
if (wxThePrintSetupData->GetPrintPreviewCommand() == NULL)
|
||||
if ( !wxThePrintSetupData->GetPrintPreviewCommand() )
|
||||
wxThePrintSetupData->SetPrintPreviewCommand(PS_VIEWER_PROG);
|
||||
|
||||
// wxGetResource ("wxWindows", "PSView", &wxThePrintSetupData->m_previewCommand);
|
||||
|
@@ -9,25 +9,33 @@
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// ============================================================================
|
||||
// declarations
|
||||
// ============================================================================
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "printps.h"
|
||||
#pragma implementation "printps.h"
|
||||
#endif
|
||||
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/utils.h"
|
||||
#include "wx/dc.h"
|
||||
#include "wx/app.h"
|
||||
#include "wx/msgdlg.h"
|
||||
#include <wx/intl.h>
|
||||
#include "wx/utils.h"
|
||||
#include "wx/dc.h"
|
||||
#include "wx/app.h"
|
||||
#include "wx/msgdlg.h"
|
||||
#include <wx/intl.h>
|
||||
#endif
|
||||
|
||||
#include "wx/generic/printps.h"
|
||||
@@ -38,21 +46,29 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxWin macros
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPostScriptPrinter, wxPrinterBase)
|
||||
IMPLEMENT_CLASS(wxPostScriptPrintPreview, wxPrintPreviewBase)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPostScriptPrinter, wxPrinterBase)
|
||||
IMPLEMENT_CLASS(wxPostScriptPrintPreview, wxPrintPreviewBase)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Printer
|
||||
*/
|
||||
// ============================================================================
|
||||
// implementation
|
||||
// ============================================================================
|
||||
|
||||
wxPostScriptPrinter::wxPostScriptPrinter(wxPrintDialogData *data):
|
||||
wxPrinterBase(data)
|
||||
// ----------------------------------------------------------------------------
|
||||
// Printer
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxPostScriptPrinter::wxPostScriptPrinter(wxPrintDialogData *data)
|
||||
: wxPrinterBase(data)
|
||||
{
|
||||
}
|
||||
|
||||
wxPostScriptPrinter::~wxPostScriptPrinter(void)
|
||||
wxPostScriptPrinter::~wxPostScriptPrinter()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -225,18 +241,34 @@ bool wxPostScriptPrinter::Setup(wxWindow *parent)
|
||||
return (ret == wxID_OK);
|
||||
}
|
||||
|
||||
/*
|
||||
* Print preview
|
||||
*/
|
||||
// ----------------------------------------------------------------------------
|
||||
// Print preview
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxPostScriptPrintPreview::wxPostScriptPrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting, wxPrintDialogData *data):
|
||||
wxPrintPreviewBase(printout, printoutForPrinting, data)
|
||||
void wxPostScriptPrintPreview::Init(wxPrintout * WXUNUSED(printout),
|
||||
wxPrintout * WXUNUSED(printoutForPrinting))
|
||||
{
|
||||
// Have to call it here since base constructor can't call it
|
||||
DetermineScaling();
|
||||
}
|
||||
|
||||
wxPostScriptPrintPreview::~wxPostScriptPrintPreview(void)
|
||||
wxPostScriptPrintPreview::wxPostScriptPrintPreview(wxPrintout *printout,
|
||||
wxPrintout *printoutForPrinting,
|
||||
wxPrintDialogData *data)
|
||||
: wxPrintPreviewBase(printout, printoutForPrinting, data)
|
||||
{
|
||||
Init(printout, printoutForPrinting);
|
||||
}
|
||||
|
||||
wxPostScriptPrintPreview::wxPostScriptPrintPreview(wxPrintout *printout,
|
||||
wxPrintout *printoutForPrinting,
|
||||
wxPrintData *data)
|
||||
: wxPrintPreviewBase(printout, printoutForPrinting, data)
|
||||
{
|
||||
Init(printout, printoutForPrinting);
|
||||
}
|
||||
|
||||
wxPostScriptPrintPreview::~wxPostScriptPrintPreview()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -248,7 +280,7 @@ bool wxPostScriptPrintPreview::Print(bool interactive)
|
||||
return printer.Print(m_previewFrame, m_printPrintout, interactive);
|
||||
}
|
||||
|
||||
void wxPostScriptPrintPreview::DetermineScaling(void)
|
||||
void wxPostScriptPrintPreview::DetermineScaling()
|
||||
{
|
||||
wxPaperSize paperType = m_printDialogData.GetPrintData().GetPaperId();
|
||||
if (paperType == wxPAPER_NONE)
|
||||
|
@@ -9,39 +9,47 @@
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// ============================================================================
|
||||
// declarations
|
||||
// ============================================================================
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "prntdlgg.h"
|
||||
#pragma implementation "prntdlgg.h"
|
||||
#endif
|
||||
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/utils.h"
|
||||
#include "wx/dc.h"
|
||||
#include "wx/app.h"
|
||||
#include "wx/frame.h"
|
||||
#include "wx/stattext.h"
|
||||
#include "wx/statbox.h"
|
||||
#include "wx/button.h"
|
||||
#include "wx/checkbox.h"
|
||||
#include "wx/textctrl.h"
|
||||
#include "wx/radiobox.h"
|
||||
#include "wx/filedlg.h"
|
||||
#include "wx/choice.h"
|
||||
#include <wx/intl.h>
|
||||
#include "wx/utils.h"
|
||||
#include "wx/dc.h"
|
||||
#include "wx/app.h"
|
||||
#include "wx/frame.h"
|
||||
#include "wx/stattext.h"
|
||||
#include "wx/statbox.h"
|
||||
#include "wx/button.h"
|
||||
#include "wx/checkbox.h"
|
||||
#include "wx/textctrl.h"
|
||||
#include "wx/radiobox.h"
|
||||
#include "wx/filedlg.h"
|
||||
#include "wx/choice.h"
|
||||
#include <wx/intl.h>
|
||||
#endif
|
||||
|
||||
#include "wx/generic/prntdlgg.h"
|
||||
|
||||
#if wxUSE_POSTSCRIPT
|
||||
#include "wx/generic/dcpsg.h"
|
||||
#include "wx/generic/dcpsg.h"
|
||||
#endif
|
||||
|
||||
#include "wx/printdlg.h"
|
||||
@@ -53,37 +61,70 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxWin macros
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_POSTSCRIPT
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
IMPLEMENT_CLASS(wxGenericPrintDialog, wxDialog)
|
||||
IMPLEMENT_CLASS(wxGenericPrintSetupDialog, wxDialog)
|
||||
IMPLEMENT_CLASS(wxGenericPageSetupDialog, wxDialog)
|
||||
IMPLEMENT_CLASS(wxGenericPrintDialog, wxDialog)
|
||||
IMPLEMENT_CLASS(wxGenericPrintSetupDialog, wxDialog)
|
||||
IMPLEMENT_CLASS(wxGenericPageSetupDialog, wxDialog)
|
||||
|
||||
BEGIN_EVENT_TABLE(wxGenericPrintDialog, wxDialog)
|
||||
EVT_BUTTON(wxID_OK, wxGenericPrintDialog::OnOK)
|
||||
EVT_BUTTON(wxPRINTID_SETUP, wxGenericPrintDialog::OnSetup)
|
||||
EVT_RADIOBOX(wxPRINTID_RANGE, wxGenericPrintDialog::OnRange)
|
||||
END_EVENT_TABLE()
|
||||
BEGIN_EVENT_TABLE(wxGenericPrintDialog, wxDialog)
|
||||
EVT_BUTTON(wxID_OK, wxGenericPrintDialog::OnOK)
|
||||
EVT_BUTTON(wxPRINTID_SETUP, wxGenericPrintDialog::OnSetup)
|
||||
EVT_RADIOBOX(wxPRINTID_RANGE, wxGenericPrintDialog::OnRange)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
BEGIN_EVENT_TABLE(wxGenericPageSetupDialog, wxDialog)
|
||||
EVT_BUTTON(wxPRINTID_SETUP, wxGenericPageSetupDialog::OnPrinter)
|
||||
END_EVENT_TABLE()
|
||||
#endif
|
||||
BEGIN_EVENT_TABLE(wxGenericPageSetupDialog, wxDialog)
|
||||
EVT_BUTTON(wxPRINTID_SETUP, wxGenericPageSetupDialog::OnPrinter)
|
||||
END_EVENT_TABLE()
|
||||
#endif // USE_SHARED_LIBRARY
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// global vars
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
extern wxPrintPaperDatabase *wxThePrintPaperDatabase;
|
||||
|
||||
/*
|
||||
* Generic print dialog for non-Windows printing use.
|
||||
*/
|
||||
// ============================================================================
|
||||
// implementation
|
||||
// ============================================================================
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Generic print dialog for non-Windows printing use.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxGenericPrintDialog::wxGenericPrintDialog(wxWindow *parent, wxPrintDialogData* data):
|
||||
wxDialog(parent, -1, _("Print"), wxPoint(0, 0), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL|wxTAB_TRAVERSAL)
|
||||
wxGenericPrintDialog::wxGenericPrintDialog(wxWindow *parent,
|
||||
wxPrintDialogData* data)
|
||||
: wxDialog(parent, -1, _("Print"),
|
||||
wxPoint(0, 0), wxSize(600, 600),
|
||||
wxDEFAULT_DIALOG_STYLE |
|
||||
wxDIALOG_MODAL |
|
||||
wxTAB_TRAVERSAL)
|
||||
{
|
||||
if ( data )
|
||||
m_printDialogData = *data;
|
||||
|
||||
Init(parent);
|
||||
}
|
||||
|
||||
wxGenericPrintDialog::wxGenericPrintDialog(wxWindow *parent,
|
||||
wxPrintData* data)
|
||||
{
|
||||
if ( data )
|
||||
m_printDialogData = *data;
|
||||
|
||||
Init(parent);
|
||||
}
|
||||
|
||||
void wxGenericPrintDialog::Init(wxWindow *parent)
|
||||
{
|
||||
wxDialog::Create(parent, -1, _("Print"), wxPoint(0, 0), wxSize(600, 600),
|
||||
wxDEFAULT_DIALOG_STYLE | wxDIALOG_MODAL | wxTAB_TRAVERSAL);
|
||||
|
||||
(void)new wxStaticBox( this, -1, _( "Printer options" ), wxPoint( 5, 5), wxSize( 300, 60 ) );
|
||||
|
||||
m_printToFileCheckBox = new wxCheckBox(this, wxPRINTID_PRINTTOFILE, _("Print to File"), wxPoint(20, 25) );
|
||||
@@ -99,7 +140,9 @@ wxDialog(parent, -1, _("Print"), wxPoint(0, 0), wxSize(600, 600), wxDEFAULT_DIAL
|
||||
if (m_printDialogData.GetFromPage() != 0)
|
||||
{
|
||||
m_rangeRadioBox = new wxRadioBox(this, wxPRINTID_RANGE, _("Print Range"),
|
||||
wxPoint(5, 80), wxSize(-1, -1), 2, choices, 1, wxRA_VERTICAL);
|
||||
wxPoint(5, 80), wxSize(-1, -1),
|
||||
2, choices,
|
||||
1, wxRA_VERTICAL);
|
||||
m_rangeRadioBox->SetSelection(1);
|
||||
}
|
||||
|
||||
@@ -299,9 +342,9 @@ wxDC *wxGenericPrintDialog::GetPrintDC()
|
||||
return new wxPostScriptDC(wxThePrintSetupData->GetPrinterFile(), FALSE, (wxWindow *) NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Generic print setup dialog
|
||||
*/
|
||||
// ----------------------------------------------------------------------------
|
||||
// Generic print setup dialog
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxGenericPrintSetupDialog::wxGenericPrintSetupDialog(wxWindow *parent, wxPrintData* data):
|
||||
wxDialog(parent, -1, _("Print Setup"), wxPoint(0, 0), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL|wxTAB_TRAVERSAL)
|
||||
@@ -460,12 +503,11 @@ wxChoice *wxGenericPrintSetupDialog::CreatePaperTypeChoice(int *x, int *y)
|
||||
choice->SetSelection(sel);
|
||||
return choice;
|
||||
}
|
||||
#endif
|
||||
// wxUSE_POSTSCRIPT
|
||||
#endif // wxUSE_POSTSCRIPT
|
||||
|
||||
/*
|
||||
* Generic page setup dialog
|
||||
*/
|
||||
// ----------------------------------------------------------------------------
|
||||
// Generic page setup dialog
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void wxGenericPageSetupDialog::OnPrinter(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
|
Reference in New Issue
Block a user