Add A0 and A1 formats to wxPaperSize enumeration.

Closes #11083.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-08-24 21:42:11 +00:00
parent 7b8dd3cc49
commit d55906de77
3 changed files with 10 additions and 1 deletions

View File

@@ -396,6 +396,7 @@ All (GUI):
- Added wxWindow::CanScroll() behaving like the old HasScrollbar() and made - Added wxWindow::CanScroll() behaving like the old HasScrollbar() and made
HasScrollbar() really check for the scrollbar existence. HasScrollbar() really check for the scrollbar existence.
- Added wxKeyEvent::IsKeyInCategory() (Jeff Tupper). - Added wxKeyEvent::IsKeyInCategory() (Jeff Tupper).
- Add A0 and A1 paper formats support (Martin Perktold).
GTK: GTK:

View File

@@ -2530,7 +2530,9 @@ typedef enum
wxPAPER_PENV_7_ROTATED, /* PRC Envelope #7 Rotated 230 x 160 mm */ wxPAPER_PENV_7_ROTATED, /* PRC Envelope #7 Rotated 230 x 160 mm */
wxPAPER_PENV_8_ROTATED, /* PRC Envelope #8 Rotated 309 x 120 mm */ wxPAPER_PENV_8_ROTATED, /* PRC Envelope #8 Rotated 309 x 120 mm */
wxPAPER_PENV_9_ROTATED, /* PRC Envelope #9 Rotated 324 x 229 mm */ wxPAPER_PENV_9_ROTATED, /* PRC Envelope #9 Rotated 324 x 229 mm */
wxPAPER_PENV_10_ROTATED /* PRC Envelope #10 Rotated 458 x 324 m */ wxPAPER_PENV_10_ROTATED, /* PRC Envelope #10 Rotated 458 x 324 m */
wxPAPER_A0, /* A0 Sheet 841 x 1189 mm */
wxPAPER_A1 /* A1 Sheet 594 x 841 mm */
} wxPaperSize; } wxPaperSize;
/* Printing orientation */ /* Printing orientation */

View File

@@ -212,6 +212,12 @@ void wxPrintPaperDatabase::CreateDatabase()
WXADDPAPER(wxPAPER_PENV_8_ROTATED, 116, wxTRANSLATE("PRC Envelope #8 Rotated 309 x 120 mm"), 3090, 1200); WXADDPAPER(wxPAPER_PENV_8_ROTATED, 116, wxTRANSLATE("PRC Envelope #8 Rotated 309 x 120 mm"), 3090, 1200);
WXADDPAPER(wxPAPER_PENV_9_ROTATED, 117, wxTRANSLATE("PRC Envelope #9 Rotated 324 x 229 mm"), 3240, 2290); WXADDPAPER(wxPAPER_PENV_9_ROTATED, 117, wxTRANSLATE("PRC Envelope #9 Rotated 324 x 229 mm"), 3240, 2290);
WXADDPAPER(wxPAPER_PENV_10_ROTATED, 118, wxTRANSLATE("PRC Envelope #10 Rotated 458 x 324 mm"), 4580, 3240); WXADDPAPER(wxPAPER_PENV_10_ROTATED, 118, wxTRANSLATE("PRC Envelope #10 Rotated 458 x 324 mm"), 4580, 3240);
// notice that the values 135 and 136 for Windows paper size ids of A0 and
// A1 formats are not documented anywhere but seem to work for at least
// some printers so we use them until we find a better way (see #11083)
WXADDPAPER(wxPAPER_A0, 136, wxTRANSLATE("A0 sheet, 841 x 1189 mm"), 8410, 11888);
WXADDPAPER(wxPAPER_A1, 135, wxTRANSLATE("A1 sheet, 594 x 841 mm"), 5940, 8410);
} }
void wxPrintPaperDatabase::ClearDatabase() void wxPrintPaperDatabase::ClearDatabase()