1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Generic print dialogs
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart and Markus Holzem
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "prntdlgg.h"
16 // For compilers that support precompilation, includes "wx.h".
17 #include "wx/wxprec.h"
30 #include "wx/stattext.h"
31 #include "wx/statbox.h"
32 #include "wx/button.h"
33 #include "wx/checkbox.h"
34 #include "wx/textctrl.h"
35 #include "wx/radiobox.h"
36 #include "wx/filedlg.h"
37 #include "wx/choice.h"
41 #include "wx/generic/prntdlgg.h"
44 #include "wx/generic/dcpsg.h"
47 #include "wx/printdlg.h"
50 // For print paper things
51 #include "wx/prntbase.h"
58 #if !USE_SHARED_LIBRARY
59 IMPLEMENT_CLASS(wxGenericPrintDialog
, wxDialog
)
60 IMPLEMENT_CLASS(wxGenericPrintSetupDialog
, wxDialog
)
61 IMPLEMENT_CLASS(wxGenericPageSetupDialog
, wxDialog
)
63 BEGIN_EVENT_TABLE(wxGenericPrintDialog
, wxDialog
)
64 EVT_BUTTON(wxID_OK
, wxGenericPrintDialog
::OnOK
)
65 EVT_BUTTON(wxPRINTID_SETUP
, wxGenericPrintDialog
::OnSetup
)
66 EVT_RADIOBOX(wxPRINTID_RANGE
, wxGenericPrintDialog
::OnRange
)
69 BEGIN_EVENT_TABLE(wxGenericPageSetupDialog
, wxDialog
)
70 EVT_BUTTON(wxPRINTID_SETUP
, wxGenericPageSetupDialog
::OnPrinter
)
74 extern wxPrintPaperDatabase
*wxThePrintPaperDatabase
;
77 * Generic print dialog for non-Windows printing use.
81 wxGenericPrintDialog
::wxGenericPrintDialog(wxWindow
*parent
, wxPrintDialogData
* data
):
82 wxDialog(parent
, -1, _("Print"), wxPoint(0, 0), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE
|wxDIALOG_MODAL
|wxTAB_TRAVERSAL
)
85 m_printDialogData
= *data
;
87 (void)new wxStaticBox( this, -1, _( "Printer options" ), wxPoint( 5, 5), wxSize( 300, 60 ) );
89 m_printToFileCheckBox
= new wxCheckBox(this, wxPRINTID_PRINTTOFILE
, _("Print to File"), wxPoint(20, 25) );
91 m_setupButton
= new wxButton(this, wxPRINTID_SETUP
, _("Setup..."), wxPoint(160, 25), wxSize(100, -1));
93 wxString
*choices
= new wxString
[2];
94 choices
[0] = _("All");
95 choices
[1] = _("Pages");
97 m_fromText
= (wxTextCtrl
*)NULL
;
99 if (m_printDialogData
.GetFromPage() != 0)
101 m_rangeRadioBox
= new wxRadioBox(this, wxPRINTID_RANGE
, _("Print Range"),
102 wxPoint(5, 80), wxSize(-1, -1), 2, choices
, 1, wxRA_VERTICAL
);
103 m_rangeRadioBox
->SetSelection(1);
106 if(m_printDialogData
.GetFromPage() != 0)
108 (void) new wxStaticText(this, wxPRINTID_STATIC
, _("From:"), wxPoint(5, 135));
110 m_fromText
= new wxTextCtrl(this, wxPRINTID_FROM
, "", wxPoint(45, 130), wxSize(40, -1));
112 (void) new wxStaticText(this, wxPRINTID_STATIC
, _("To:"), wxPoint(100, 135));
114 m_toText
= new wxTextCtrl(this, wxPRINTID_TO
, "", wxPoint(133, 130), wxSize(40, -1));
117 (void) new wxStaticText(this, wxPRINTID_STATIC
, _("Copies:"), wxPoint(200, 135));
119 m_noCopiesText
= new wxTextCtrl(this, wxPRINTID_COPIES
, "", wxPoint(252, 130), wxSize(40, -1));
121 wxButton
*okButton
= new wxButton(this, wxID_OK
, _("OK"), wxPoint(40, 180), wxSize(100, -1));
122 (void) new wxButton(this, wxID_CANCEL
, _("Cancel"), wxPoint(180, 180), wxSize(100, -1));
124 okButton
->SetDefault();
125 okButton
->SetFocus();
129 // Calls wxWindow::OnInitDialog and then wxGenericPrintDialog::TransferDataToWindow
134 int wxGenericPrintDialog
::ShowModal()
136 if ( m_printDialogData
.GetSetupDialog() )
138 // Make sure wxPrintData object reflects the settings now, in case the setup dialog
139 // changes it. In fact there aren't any common settings at
140 // present, but there might be in future.
141 // TransferDataFromWindow();
143 wxGenericPrintSetupDialog
*genericPrintSetupDialog
=
144 new wxGenericPrintSetupDialog(this, & m_printDialogData
.GetPrintData());
145 int ret
= genericPrintSetupDialog
->ShowModal();
146 if ( ret
!= wxID_CANCEL
)
148 // Transfer settings to the global object (for compatibility) and to
149 // the print dialog's print data.
150 *wxThePrintSetupData
= genericPrintSetupDialog
->GetPrintData();
151 m_printDialogData
.GetPrintData() = genericPrintSetupDialog
->GetPrintData();
153 genericPrintSetupDialog
->Destroy();
155 // Restore the wxPrintData settings again (uncomment if any settings become common
157 // TransferDataToWindow();
163 return wxDialog
::ShowModal();
167 wxGenericPrintDialog
::~wxGenericPrintDialog()
171 void wxGenericPrintDialog
::OnOK(wxCommandEvent
& WXUNUSED(event
))
173 TransferDataFromWindow();
175 // There are some interactions between the global setup data
176 // and the standard print dialog. The global printing 'mode'
177 // is determined by whether the user checks Print to file
179 if (m_printDialogData
.GetPrintToFile())
181 m_printDialogData
.GetPrintData().SetPrintMode(wxPRINT_MODE_FILE
);
182 wxThePrintSetupData
->SetPrinterMode(wxPRINT_MODE_FILE
);
184 wxString f
= wxFileSelector(_("PostScript file"),
185 wxPathOnly(wxThePrintSetupData
->GetPrinterFile()),
186 wxFileNameFromPath(wxThePrintSetupData
->GetPrinterFile()),
187 "ps", "*.ps", 0, this);
191 m_printDialogData
.GetPrintData().SetFilename(f
);
192 wxThePrintSetupData
->SetPrinterFile(f
);
195 wxThePrintSetupData
->SetPrinterMode(wxPRINT_MODE_PRINTER
);
200 void wxGenericPrintDialog
::OnRange(wxCommandEvent
& event
)
202 if (!m_fromText
) return;
204 if (event
.GetInt() == 0)
206 m_fromText
->Enable(FALSE
);
207 m_toText
->Enable(FALSE
);
209 else if (event
.GetInt() == 1)
211 m_fromText
->Enable(TRUE
);
212 m_toText
->Enable(TRUE
);
216 void wxGenericPrintDialog
::OnSetup(wxCommandEvent
& WXUNUSED(event
))
218 wxGenericPrintSetupDialog
*genericPrintSetupDialog
=
219 new wxGenericPrintSetupDialog(this, wxThePrintSetupData
);
220 int ret
= genericPrintSetupDialog
->ShowModal();
221 if ( ret
!= wxID_CANCEL
)
223 *wxThePrintSetupData
= genericPrintSetupDialog
->GetPrintData();
224 m_printDialogData
= genericPrintSetupDialog
->GetPrintData();
227 genericPrintSetupDialog
->Close(TRUE
);
230 bool wxGenericPrintDialog
::TransferDataToWindow()
234 if(m_printDialogData
.GetFromPage() != 0)
236 if (m_printDialogData
.GetEnablePageNumbers())
238 m_fromText
->Enable(TRUE
);
239 m_toText
->Enable(TRUE
);
241 sprintf(buf
, "%d", m_printDialogData
.GetFromPage());
242 m_fromText
->SetValue(buf
);
243 sprintf(buf
, "%d", m_printDialogData
.GetToPage());
244 m_toText
->SetValue(buf
);
246 if (m_printDialogData
.GetAllPages())
247 m_rangeRadioBox
->SetSelection(0);
249 m_rangeRadioBox
->SetSelection(1);
253 m_fromText
->Enable(FALSE
);
254 m_toText
->Enable(FALSE
);
255 m_rangeRadioBox
->SetSelection(0);
256 m_rangeRadioBox
->wxRadioBox
::Enable(1, FALSE
);
259 sprintf(buf
, "%d", m_printDialogData
.GetNoCopies());
260 m_noCopiesText
->SetValue(buf
);
262 m_printToFileCheckBox
->SetValue(m_printDialogData
.GetPrintToFile());
263 m_printToFileCheckBox
->Enable(m_printDialogData
.GetEnablePrintToFile());
267 bool wxGenericPrintDialog
::TransferDataFromWindow()
269 if(m_printDialogData
.GetFromPage() != -1)
271 if (m_printDialogData
.GetEnablePageNumbers())
273 m_printDialogData
.SetFromPage(atoi(m_fromText
->GetValue()));
274 m_printDialogData
.SetToPage(atoi(m_toText
->GetValue()));
276 if (m_rangeRadioBox
->GetSelection() == 0)
277 m_printDialogData
.SetAllPages(TRUE
);
279 m_printDialogData
.SetAllPages(FALSE
);
282 { // continuous printing
283 m_printDialogData
.SetFromPage(1);
284 m_printDialogData
.SetToPage(32000);
286 m_printDialogData
.SetNoCopies(atoi(m_noCopiesText
->GetValue()));
287 m_printDialogData
.SetPrintToFile(m_printToFileCheckBox
->GetValue());
293 TODO: collate and noCopies should be duplicated across dialog data and print data objects
294 (slightly different semantics on Windows but let's ignore this for a bit).
297 wxDC
*wxGenericPrintDialog
::GetPrintDC()
299 return new wxPostScriptDC(wxThePrintSetupData
->GetPrinterFile(), FALSE
, (wxWindow
*) NULL
);
303 * Generic print setup dialog
306 wxGenericPrintSetupDialog
::wxGenericPrintSetupDialog(wxWindow
*parent
, wxPrintData
* data
):
307 wxDialog(parent
, -1, _("Print Setup"), wxPoint(0, 0), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE
|wxDIALOG_MODAL
|wxTAB_TRAVERSAL
)
312 // Convert wxPrintSetupData to standard wxPrintData object
313 wxGenericPrintSetupDialog
::wxGenericPrintSetupDialog(wxWindow
*parent
, wxPrintSetupData
* data
):
314 wxDialog(parent
, -1, _("Print Setup"), wxPoint(0, 0), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE
|wxDIALOG_MODAL
|wxTAB_TRAVERSAL
)
316 wxPrintData printData
;
320 printData
= * wxThePrintSetupData
;
325 void wxGenericPrintSetupDialog
::Init(wxPrintData
* data
)
330 int staticBoxWidth
= 300;
332 (void) new wxStaticBox(this, wxPRINTID_STATIC
, _("Paper size"), wxPoint(10, 10), wxSize(staticBoxWidth
, 60) );
336 m_paperTypeChoice
= CreatePaperTypeChoice(&xPos
, &yPos
);
338 wxString
*choices
= new wxString
[2];
339 choices
[0] = _("Portrait");
340 choices
[1] = _("Landscape");
342 m_orientationRadioBox
= new wxRadioBox(this, wxPRINTID_ORIENTATION
, _("Orientation"),
343 wxPoint(10, 80), wxSize(-1, -1), 2, choices
, 1, wxRA_VERTICAL
);
344 m_orientationRadioBox
->SetSelection(0);
346 (void) new wxStaticBox(this, wxPRINTID_STATIC
, _("Options"), wxPoint(10, 130), wxSize(staticBoxWidth
, 50) );
348 int colourYPos
= 145;
354 m_colourCheckBox
= new wxCheckBox(this, wxPRINTID_PRINTCOLOUR
, _("Print in colour"), wxPoint(15, colourYPos
));
356 (void) new wxStaticBox(this, wxPRINTID_STATIC
, _("Print spooling"), wxPoint(330, 10), wxSize(200,170) );
358 (void) new wxStaticText(this, wxPRINTID_STATIC
, _("Printer command:"), wxPoint(340, 30));
360 m_printerCommandText
= new wxTextCtrl(this, wxPRINTID_COMMAND
, "", wxPoint(360, 55), wxSize(150, -1));
362 (void) new wxStaticText(this, wxPRINTID_STATIC
, _("Printer options:"), wxPoint(340, 110));
364 m_printerOptionsText
= new wxTextCtrl(this, wxPRINTID_OPTIONS
, "", wxPoint(360, 135), wxSize(150, -1));
366 wxButton
*okButton
= new wxButton(this, wxID_OK
, _("OK"), wxPoint(130, 200), wxSize(100, -1));
367 (void) new wxButton(this, wxID_CANCEL
, _("Cancel"), wxPoint(320, 200), wxSize(100, -1));
369 okButton
->SetDefault();
370 okButton
->SetFocus();
379 wxGenericPrintSetupDialog
::~wxGenericPrintSetupDialog()
383 bool wxGenericPrintSetupDialog
::TransferDataToWindow()
385 if (m_printerCommandText
&& m_printData
.GetPrinterCommand())
386 m_printerCommandText
->SetValue(m_printData
.GetPrinterCommand());
387 if (m_printerOptionsText
&& m_printData
.GetPrinterOptions())
388 m_printerOptionsText
->SetValue(m_printData
.GetPrinterOptions());
389 if (m_colourCheckBox
)
390 m_colourCheckBox
->SetValue(m_printData
.GetColour());
392 if (m_orientationRadioBox
)
394 if (m_printData
.GetOrientation() == wxPORTRAIT
)
395 m_orientationRadioBox
->SetSelection(0);
397 m_orientationRadioBox
->SetSelection(1);
402 bool wxGenericPrintSetupDialog
::TransferDataFromWindow()
404 if (m_printerCommandText
)
405 m_printData
.SetPrinterCommand(m_printerCommandText
->GetValue());
406 if (m_printerOptionsText
)
407 m_printData
.SetPrinterOptions(m_printerOptionsText
->GetValue());
408 if (m_colourCheckBox
)
409 m_printData
.SetColour(m_colourCheckBox
->GetValue());
410 if (m_orientationRadioBox
)
412 int sel
= m_orientationRadioBox
->GetSelection();
414 m_printData
.SetOrientation(wxPORTRAIT
);
416 m_printData
.SetOrientation(wxLANDSCAPE
);
418 if (m_paperTypeChoice
)
420 wxString
val(m_paperTypeChoice
->GetStringSelection());
421 if (!val
.IsNull() && val
!= "")
422 m_printData
.SetPaperId(wxThePrintPaperDatabase
->ConvertNameToId(val
));
425 // This is for backward compatibility only
426 *wxThePrintSetupData
= GetPrintData();
430 wxChoice
*wxGenericPrintSetupDialog
::CreatePaperTypeChoice(int *x
, int *y
)
432 /* Should not be necessary
433 if (!wxThePrintPaperDatabase)
435 wxThePrintPaperDatabase = new wxPrintPaperDatabase;
436 wxThePrintPaperDatabase->CreateDatabase();
439 int n
= wxThePrintPaperDatabase
->Number();
440 wxString
*choices
= new wxString
[n
];
443 for (i
= 0; i
< n
; i
++)
445 wxPrintPaperType
*paper
= (wxPrintPaperType
*)wxThePrintPaperDatabase
->Nth(i
)->Data();
446 choices
[i
] = paper
->GetName();
447 if (m_printData
.GetPaperId() == paper
->GetId())
453 wxChoice
*choice
= new wxChoice(this, wxPRINTID_PAPERSIZE
, wxPoint(*x
, *y
), wxSize(width
, -1), n
,
456 // SetFont(thisFont);
460 choice
->SetSelection(sel
);
467 * Generic page setup dialog
470 void wxGenericPageSetupDialog
::OnPrinter(wxCommandEvent
& WXUNUSED(event
))
472 // We no longer query GetPrintMode, so we can eliminate the need
473 // to call SetPrintMode.
474 // This has the limitation that we can't explicitly call the PostScript
475 // print setup dialog from the generic Page Setup dialog under Windows,
476 // but since this choice would only happen when trying to do PostScript
477 // printing under Windows (and only in 16-bit Windows which
478 // doesn't have a Windows-specific page setup dialog) it's worth it.
480 // First save the current settings, so the wxPrintData object is up to date.
481 TransferDataFromWindow();
483 // Transfer the current print settings from this dialog to the page setup dialog.
484 wxPrintDialogData data
;
485 data
= GetPageSetupData().GetPrintData();
486 data
.SetSetupDialog(TRUE
);
487 wxPrintDialog
*printDialog
= new wxPrintDialog(this, & data
);
488 printDialog
->ShowModal();
490 // Transfer the page setup print settings from the page dialog to this dialog again, in case
491 // the page setup dialog changed something.
492 GetPageSetupData().GetPrintData() = printDialog
->GetPrintDialogData().GetPrintData();
493 GetPageSetupData().CalculatePaperSizeFromId(); // Make sure page size reflects the id in wxPrintData
495 printDialog
->Destroy();
497 // Now update the dialog in case the page setup dialog changed some of our settings.
498 TransferDataToWindow();
501 wxGenericPageSetupDialog
::wxGenericPageSetupDialog(wxWindow
*parent
, wxPageSetupData
* data
):
502 wxDialog(parent
, -1, _("Page Setup"), wxPoint(0, 0), wxSize(600, 600), wxDIALOG_MODAL
|wxDEFAULT_DIALOG_STYLE
|wxTAB_TRAVERSAL
)
507 int buttonWidth
= 75;
508 int buttonHeight
= 25;
517 wxButton
*okButton
= new wxButton(this, wxID_OK
, _("OK"), wxPoint(5, yPos
), wxSize(buttonWidth
, buttonHeight
));
518 (void) new wxButton(this, wxID_CANCEL
, _("Cancel"), wxPoint(buttonWidth
+ 5 + spacing
, yPos
), wxSize(buttonWidth
, buttonHeight
));
520 m_printerButton
= new wxButton(this, wxPRINTID_SETUP
, _("Printer..."), wxPoint(buttonWidth
*2 + 5 + 2*spacing
, yPos
), wxSize(buttonWidth
, buttonHeight
));
522 if ( !m_pageData
.GetEnablePrinter() )
523 m_printerButton
->Enable(FALSE
);
525 // if (m_printData.GetEnableHelp())
526 // wxButton *helpButton = new wxButton(this, (wxFunction)wxGenericPageSetupHelpProc, _("Help"), -1, -1, buttonWidth, buttonHeight);
528 okButton
->SetDefault();
529 okButton
->SetFocus();
538 m_paperTypeChoice
= CreatePaperTypeChoice(&xPos
, &yPos
);
542 wxString
*choices
= new wxString
[2];
543 choices
[0] = _("Portrait");
544 choices
[1] = _("Landscape");
545 m_orientationRadioBox
= new wxRadioBox(this, wxPRINTID_ORIENTATION
, _("Orientation"),
546 wxPoint(xPos
, yPos
), wxSize(-1, -1), 2, choices
, 2);
547 m_orientationRadioBox
->SetSelection(0);
552 int staticWidth
= 110;
560 (void) new wxStaticText(this, wxPRINTID_STATIC
, _("Left margin (mm):"), wxPoint(xPos
, yPos
));
563 m_marginLeftText
= new wxTextCtrl(this, wxPRINTID_LEFTMARGIN
, "", wxPoint(xPos
, yPos
), wxSize(textWidth
, -1));
564 xPos
+= textWidth
+ spacing
;
566 (void) new wxStaticText(this, wxPRINTID_STATIC
, _("Right margin (mm):"), wxPoint(xPos
, yPos
));
569 m_marginRightText
= new wxTextCtrl(this, wxPRINTID_RIGHTMARGIN
, "", wxPoint(xPos
, yPos
), wxSize(textWidth
, -1));
570 xPos
+= textWidth
+ spacing
;
575 (void) new wxStaticText(this, wxPRINTID_STATIC
, _("Top margin (mm):"), wxPoint(xPos
, yPos
));
578 m_marginTopText
= new wxTextCtrl(this, wxPRINTID_TOPMARGIN
, "", wxPoint(xPos
, yPos
), wxSize(textWidth
, -1));
579 xPos
+= textWidth
+ spacing
;
581 (void) new wxStaticText(this, wxPRINTID_STATIC
, _("Bottom margin (mm):"), wxPoint(xPos
, yPos
));
584 m_marginBottomText
= new wxTextCtrl(this, wxPRINTID_BOTTOMMARGIN
, "", wxPoint(xPos
, yPos
), wxSize(textWidth
, -1));
593 wxGenericPageSetupDialog
::~wxGenericPageSetupDialog()
597 bool wxGenericPageSetupDialog
::TransferDataToWindow()
599 if (m_marginLeftText
)
600 m_marginLeftText
->SetValue(IntToString((int) m_pageData
.GetMarginTopLeft().x
));
602 m_marginTopText
->SetValue(IntToString((int) m_pageData
.GetMarginTopLeft().y
));
603 if (m_marginRightText
)
604 m_marginRightText
->SetValue(IntToString((int) m_pageData
.GetMarginBottomRight().x
));
605 if (m_marginBottomText
)
606 m_marginBottomText
->SetValue(IntToString((int) m_pageData
.GetMarginBottomRight().y
));
608 if (m_orientationRadioBox
)
610 if (m_pageData
.GetPrintData().GetOrientation() == wxPORTRAIT
)
611 m_orientationRadioBox
->SetSelection(0);
613 m_orientationRadioBox
->SetSelection(1);
616 // Find the paper type from either the current paper size in the wxPageSetupDialogData, or
617 // failing that, the id in the wxPrintData object.
619 wxPrintPaperType
* type
= wxThePrintPaperDatabase
->FindPaperType(
620 wxSize(m_pageData
.GetPaperSize().x
* 10, m_pageData
.GetPaperSize().y
* 10));
622 if (!type
&& m_pageData
.GetPrintData().GetPaperId() != wxPAPER_NONE
)
623 type
= wxThePrintPaperDatabase
->FindPaperType(m_pageData
.GetPrintData().GetPaperId());
627 m_paperTypeChoice
->SetStringSelection(type
->GetName());
633 bool wxGenericPageSetupDialog
::TransferDataFromWindow()
635 if (m_marginLeftText
&& m_marginTopText
)
636 m_pageData
.SetMarginTopLeft(wxPoint(atoi((const char *)m_marginLeftText
->GetValue()),atoi((const char *)m_marginTopText
->GetValue())));
637 if (m_marginRightText
&& m_marginBottomText
)
638 m_pageData
.SetMarginBottomRight(wxPoint(atoi((const char *)m_marginRightText
->GetValue()),atoi((const char *)m_marginBottomText
->GetValue())));
640 if (m_orientationRadioBox
)
642 int sel
= m_orientationRadioBox
->GetSelection();
646 wxThePrintSetupData
->SetPrinterOrientation(wxPORTRAIT
);
648 m_pageData
.GetPrintData().SetOrientation(wxPORTRAIT
);
653 wxThePrintSetupData
->SetPrinterOrientation(wxLANDSCAPE
);
655 m_pageData
.GetPrintData().SetOrientation(wxLANDSCAPE
);
658 if (m_paperTypeChoice
)
660 wxString
val(m_paperTypeChoice
->GetStringSelection());
661 if (!val
.IsNull() && val
!= "")
663 wxPrintPaperType
* paper
= wxThePrintPaperDatabase
->FindPaperType(val
);
666 m_pageData
.SetPaperSize(wxSize(paper
->GetWidth()/10, paper
->GetHeight()/10));
667 m_pageData
.GetPrintData().SetPaperId(paper
->GetId());
675 wxChoice
*wxGenericPageSetupDialog
::CreatePaperTypeChoice(int *x
, int *y
)
678 if (!wxThePrintPaperDatabase)
680 wxThePrintPaperDatabase = new wxPrintPaperDatabase;
681 wxThePrintPaperDatabase->CreateDatabase();
685 int n
= wxThePrintPaperDatabase
->Number();
686 wxString
*choices
= new wxString
[n
];
688 for (i
= 0; i
< n
; i
++)
690 wxPrintPaperType
*paper
= (wxPrintPaperType
*)wxThePrintPaperDatabase
->Nth(i
)->Data();
691 choices
[i
] = paper
->GetName();
694 (void) new wxStaticText(this, wxPRINTID_STATIC
, _("Paper size"), wxPoint(*x
, *y
));
697 wxChoice
*choice
= new wxChoice(this, wxPRINTID_PAPERSIZE
, wxPoint(*x
, *y
), wxSize(300, -1), n
,
702 // choice->SetSelection(sel);