@@ -188,7 +188,7 @@ bool MyApp::OnInit(void)
188
188
g_pageSetupData->SetMarginBottomRight (wxPoint (15 , 15 ));
189
189
190
190
// Create the main frame window
191
- frame = new MyFrame ((wxFrame *) NULL , _T ( " wxWidgets Printing Demo" ) ,
191
+ frame = new MyFrame ((wxFrame *) NULL , " wxWidgets Printing Demo" ,
192
192
wxPoint (0 , 0 ), wxSize (400 , 400 ));
193
193
194
194
#if wxUSE_STATUSBAR
@@ -202,14 +202,14 @@ bool MyApp::OnInit(void)
202
202
// Make a menubar
203
203
wxMenu *file_menu = new wxMenu;
204
204
205
- file_menu->Append (WXPRINT_PRINT, _T ( " &Print..." ) , _T ( " Print" ) );
206
- file_menu->Append (WXPRINT_PDF, _T ( " PDF..." ) , _T ( " PDF" ) );
207
- file_menu->Append (WXPRINT_PDF_TPL, _T ( " PDF Template..." ), _T ( " PDF Template" ) );
208
- file_menu->Append (WXPRINT_PAGE_SETUP, _T ( " Page Set&up..." ) , _T ( " Page setup" ) );
205
+ file_menu->Append (WXPRINT_PRINT, " &Print..." , " Print" );
206
+ file_menu->Append (WXPRINT_PDF, " PDF..." , " PDF" );
207
+ file_menu->Append (WXPRINT_PDF_TPL, " PDF Template..." , " PDF Template" );
208
+ file_menu->Append (WXPRINT_PAGE_SETUP, " Page Set&up..." , " Page setup" );
209
209
#ifdef __WXMAC__
210
- file_menu->Append (WXPRINT_PAGE_MARGINS, _T ( " Page Margins..." ), _T ( " Page margins" ) );
210
+ file_menu->Append (WXPRINT_PAGE_MARGINS, " Page Margins..." , " Page margins" );
211
211
#endif
212
- file_menu->Append (WXPRINT_PREVIEW, _T ( " Print Pre&view" ) , _T ( " Preview" ) );
212
+ file_menu->Append (WXPRINT_PREVIEW, " Print Pre&view" , " Preview" );
213
213
214
214
#if wxUSE_ACCEL
215
215
// Accelerators
@@ -221,39 +221,39 @@ bool MyApp::OnInit(void)
221
221
222
222
#if defined(__WXMSW__) && wxTEST_POSTSCRIPT_IN_MSW
223
223
file_menu->AppendSeparator ();
224
- file_menu->Append (WXPRINT_PRINT_PS, _T ( " Print PostScript..." ) , _T ( " Print (PostScript)" ) );
225
- file_menu->Append (WXPRINT_PAGE_SETUP_PS, _T ( " Page Setup PostScript..." ), _T ( " Page setup (PostScript)" ) );
226
- file_menu->Append (WXPRINT_PREVIEW_PS, _T ( " Print Preview PostScript" ), _T ( " Preview (PostScript)" ) );
224
+ file_menu->Append (WXPRINT_PRINT_PS, " Print PostScript..." , " Print (PostScript)" );
225
+ file_menu->Append (WXPRINT_PAGE_SETUP_PS, " Page Setup PostScript..." , " Page setup (PostScript)" );
226
+ file_menu->Append (WXPRINT_PREVIEW_PS, " Print Preview PostScript" , " Preview (PostScript)" );
227
227
#endif
228
228
229
229
file_menu->AppendSeparator ();
230
- file_menu->Append (WXPRINT_ANGLEUP, _T ( " Angle up\t Alt-U" ) , _T ( " Raise rotated text angle" ) );
231
- file_menu->Append (WXPRINT_ANGLEDOWN, _T ( " Angle down\t Alt-D" ), _T ( " Lower rotated text angle" ) );
230
+ file_menu->Append (WXPRINT_ANGLEUP, " Angle up\t Alt-U" , " Raise rotated text angle" );
231
+ file_menu->Append (WXPRINT_ANGLEDOWN, " Angle down\t Alt-D" , " Lower rotated text angle" );
232
232
file_menu->AppendSeparator ();
233
- file_menu->Append (WXPRINT_QUIT, _T ( " E&xit" ) , _T ( " Exit program" ) );
233
+ file_menu->Append (WXPRINT_QUIT, " E&xit" , " Exit program" );
234
234
235
235
wxMenu *printing_menu = new wxMenu;
236
- printing_menu->Append (WXPDFPRINT_PAGE_SETUP_ALL, _T ( " PDF Page Setup All..." ), _T ( " PDF Page Setup (All)" ) );
237
- printing_menu->Append (WXPDFPRINT_PAGE_SETUP_MINIMAL, _T ( " PDF Page Setup Minimal..." ), _T ( " PDF Page Setup (Minimal)" ) );
238
- printing_menu->Append (WXPDFPRINT_PRINT_DIALOG_ALL, _T ( " PDF Print Dialog All..." ), _T ( " PDF Print Dialog (All)" ) );
239
- printing_menu->Append (WXPDFPRINT_PRINT_DIALOG_MINIMAL, _T ( " PDF Print Dialog Minimal..." ), _T ( " PDF Print Dialog (Minimal)" ) );
236
+ printing_menu->Append (WXPDFPRINT_PAGE_SETUP_ALL, " PDF Page Setup All..." , " PDF Page Setup (All)" );
237
+ printing_menu->Append (WXPDFPRINT_PAGE_SETUP_MINIMAL, " PDF Page Setup Minimal..." , " PDF Page Setup (Minimal)" );
238
+ printing_menu->Append (WXPDFPRINT_PRINT_DIALOG_ALL, " PDF Print Dialog All..." , " PDF Print Dialog (All)" );
239
+ printing_menu->Append (WXPDFPRINT_PRINT_DIALOG_MINIMAL, " PDF Print Dialog Minimal..." , " PDF Print Dialog (Minimal)" );
240
240
#if wxUSE_RICHTEXT
241
- printing_menu->Append (WXPDFPRINT_RICHTEXT_PRINT, _T ( " PDF RichText Print..." ), _T ( " PDF RichText (Print)" ) );
242
- printing_menu->Append (WXPDFPRINT_RICHTEXT_PREVIEW, _T ( " PDF RichText Preview..." ), _T ( " PDF RichText (Preview)" ) );
241
+ printing_menu->Append (WXPDFPRINT_RICHTEXT_PRINT, " PDF RichText Print..." , " PDF RichText (Print)" );
242
+ printing_menu->Append (WXPDFPRINT_RICHTEXT_PREVIEW, " PDF RichText Preview..." , " PDF RichText (Preview)" );
243
243
#endif
244
244
#if wxUSE_HTML
245
- printing_menu->Append (WXPDFPRINT_HTML_PRINT, _T ( " PDF Html Print..." ), _T ( " PDF Html (Print)" ) );
246
- printing_menu->Append (WXPDFPRINT_HTML_PREVIEW, _T ( " PDF Html Preview..." ), _T ( " PDF Html (Preview)" ) );
245
+ printing_menu->Append (WXPDFPRINT_HTML_PRINT, " PDF Html Print..." , " PDF Html (Print)" );
246
+ printing_menu->Append (WXPDFPRINT_HTML_PREVIEW, " PDF Html Preview..." , " PDF Html (Preview)" );
247
247
#endif
248
248
249
249
wxMenu *help_menu = new wxMenu;
250
- help_menu->Append (WXPRINT_ABOUT, _T ( " &About" ), _T ( " About this demo" ) );
250
+ help_menu->Append (WXPRINT_ABOUT, " &About" , " About this demo" );
251
251
252
252
wxMenuBar *menu_bar = new wxMenuBar;
253
253
254
- menu_bar->Append (file_menu, _T ( " &File" ) );
255
- menu_bar->Append (printing_menu, _T ( " wxPdf&Printing" ) );
256
- menu_bar->Append (help_menu, _T ( " &Help" ) );
254
+ menu_bar->Append (file_menu, " &File" );
255
+ menu_bar->Append (printing_menu, " wxPdf&Printing" );
256
+ menu_bar->Append (help_menu, " &Help" );
257
257
258
258
// Associate the menu bar with the frame
259
259
frame->SetMenuBar (menu_bar);
@@ -273,7 +273,7 @@ bool MyApp::OnInit(void)
273
273
frame->Show ();
274
274
275
275
#if wxUSE_STATUSBAR
276
- frame->SetStatusText (_T ( " Printing demo" ) );
276
+ frame->SetStatusText (" Printing demo" );
277
277
#endif // wxUSE_STATUSBAR
278
278
279
279
SetTopWindow (frame);
@@ -367,13 +367,13 @@ void MyFrame::OnPrint(wxCommandEvent& WXUNUSED(event))
367
367
wxPrintDialogData printDialogData (* g_printData);
368
368
369
369
wxPrinter printer (& printDialogData);
370
- MyPrintout printout (_T (" My printout" ));
370
+ MyPrintout printout (wxS (" My printout" ));
371
371
if (!printer.Print (this , &printout, true /* prompt*/ ))
372
372
{
373
373
if (wxPrinter::GetLastError () == wxPRINTER_ERROR)
374
- wxMessageBox (_T ( " There was a problem printing.\n Perhaps your current printer is not set correctly?" ), _T ( " Printing" ) , wxOK);
374
+ wxMessageBox (" There was a problem printing.\n Perhaps your current printer is not set correctly?" , " Printing" , wxOK);
375
375
else
376
- wxMessageBox (_T ( " You canceled printing" ), _T ( " Printing" ) , wxOK);
376
+ wxMessageBox (" You canceled printing" , " Printing" , wxOK);
377
377
}
378
378
else
379
379
{
@@ -470,11 +470,11 @@ void MyFrame::OnPrintPreview(wxCommandEvent& WXUNUSED(event))
470
470
if (!preview->Ok ())
471
471
{
472
472
delete preview;
473
- wxMessageBox (_T ( " There was a problem previewing.\n Perhaps your current printer is not set correctly?" ), _T ( " Previewing" ) , wxOK);
473
+ wxMessageBox (" There was a problem previewing.\n Perhaps your current printer is not set correctly?" , " Previewing" , wxOK);
474
474
return ;
475
475
}
476
476
477
- wxPreviewFrame *frame = new wxPreviewFrame (preview, this , _T ( " Demo Print Preview" ) , wxPoint (100 , 100 ), wxSize (600 , 650 ));
477
+ wxPreviewFrame *frame = new wxPreviewFrame (preview, this , " Demo Print Preview" , wxPoint (100 , 100 ), wxSize (600 , 650 ));
478
478
frame->Centre (wxBOTH);
479
479
frame->Initialize ();
480
480
frame->Show ();
@@ -495,7 +495,7 @@ void MyFrame::OnPageSetup(wxCommandEvent& WXUNUSED(event))
495
495
void MyFrame::OnPrintPS (wxCommandEvent& WXUNUSED (event))
496
496
{
497
497
wxPostScriptPrinter printer (g_printData);
498
- MyPrintout printout (_T ( " My printout" ) );
498
+ MyPrintout printout (" My printout" );
499
499
printer.Print (this , &printout, true /* prompt*/ );
500
500
501
501
(*g_printData) = printer.GetPrintData ();
@@ -506,7 +506,7 @@ void MyFrame::OnPrintPreviewPS(wxCommandEvent& WXUNUSED(event))
506
506
// Pass two printout objects: for preview, and possible printing.
507
507
wxPrintDialogData printDialogData (* g_printData);
508
508
wxPrintPreview *preview = new wxPrintPreview (new MyPrintout, new MyPrintout, & printDialogData);
509
- wxPreviewFrame *frame = new wxPreviewFrame (preview, this , _T ( " Demo Print Preview" ) , wxPoint (100 , 100 ), wxSize (600 , 650 ));
509
+ wxPreviewFrame *frame = new wxPreviewFrame (preview, this , " Demo Print Preview" , wxPoint (100 , 100 ), wxSize (600 , 650 ));
510
510
frame->Centre (wxBOTH);
511
511
frame->Initialize ();
512
512
frame->Show ();
@@ -541,8 +541,8 @@ void MyFrame::OnPageMargins(wxCommandEvent& WXUNUSED(event))
541
541
542
542
void MyFrame::OnPrintAbout (wxCommandEvent& WXUNUSED (event))
543
543
{
544
- (void )wxMessageBox (_T ( " wxWidgets printing demo\n Author: Julian Smart" ) ,
545
- _T ( " About wxWidgets printing demo" ) , wxOK|wxCENTRE);
544
+ (void )wxMessageBox (" wxWidgets printing demo\n Author: Julian Smart" ,
545
+ " About wxWidgets printing demo" , wxOK|wxCENTRE);
546
546
}
547
547
548
548
void MyFrame::OnAngleUp (wxCommandEvent& WXUNUSED (event))
@@ -726,7 +726,7 @@ void MyFrame::OnPdfPageSetupMinimal(wxCommandEvent& WXUNUSED(event) )
726
726
dialogData->EnablePaper (true );
727
727
dialogData->EnableOrientation (false );
728
728
729
- wxPdfPageSetupDialog* dialog = new wxPdfPageSetupDialog (this , dialogData, _T ( " Minimal PDF Page Setup" ) );
729
+ wxPdfPageSetupDialog* dialog = new wxPdfPageSetupDialog (this , dialogData, " Minimal PDF Page Setup" );
730
730
if ( dialog->ShowModal () == wxID_OK )
731
731
{
732
732
// dialogData now has user choices
@@ -1476,7 +1476,7 @@ void MyPrintout::DrawPageTwo()
1476
1476
dc->SetBrush (*wxTRANSPARENT_BRUSH);
1477
1477
1478
1478
{ // GetTextExtent demo:
1479
- wxString words[7 ] = {_T ( " This " ), _T ( " is " ), _T ( " GetTextExtent " ), _T ( " testing " ), _T ( " string. " ), _T ( " Enjoy " ), _T ( " it!" ) };
1479
+ wxString words[7 ] = {" This " , " is " , " GetTextExtent " , " testing " , " string. " , " Enjoy " , " it!" };
1480
1480
wxCoord w, h;
1481
1481
wxCoord x = 200 , y= 250 ;
1482
1482
wxFont fnt (15 , wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
@@ -1498,7 +1498,7 @@ void MyPrintout::DrawPageTwo()
1498
1498
1499
1499
dc->SetFont (wxGetApp ().m_testFont );
1500
1500
1501
- dc->DrawText (_T ( " Some test text" ) , 200 , 300 );
1501
+ dc->DrawText (" Some test text" , 200 , 300 );
1502
1502
1503
1503
// TESTING
1504
1504
@@ -1521,7 +1521,7 @@ void MyPrintout::DrawPageTwo()
1521
1521
dc->DrawLine ( (long )leftMarginLogical, (long )bottomMarginLogical,
1522
1522
(long )rightMarginLogical, (long )bottomMarginLogical);
1523
1523
1524
- WritePageHeader (this , dc, _T (" A header" ), logUnitsFactor);
1524
+ WritePageHeader (this , dc, wxS (" A header" ), logUnitsFactor);
1525
1525
}
1526
1526
1527
1527
// Writes a header on a page. Margin units are in millimetres.
0 commit comments