3#include "wx/printdlg.h"
5#include "../../common/Options.h"
31 if (!dc)
return false;
67 m_edit->SetMarginWidth(0, 0);
68 m_edit->SetMarginWidth(1, 0);
72 return wxPrintout::OnBeginDocument(startPage, endPage);
114 GetPPIScreen (&ppiScr.x, &ppiScr.y);
116 page.x =
static_cast<int> (page.x * ppiScr.x / 25.4);
117 page.y =
static_cast<int> (page.y * ppiScr.y / 25.4);
130 top =
static_cast<int> (top * ppiScr.y / 25.4);
131 bottom =
static_cast<int> (bottom * ppiScr.y / 25.4);
132 left =
static_cast<int> (left * ppiScr.x / 25.4);
133 right =
static_cast<int> (right * ppiScr.x / 25.4);
136 page.x - (left + right),
137 page.y - (top + bottom));
139 int length =
m_edit->GetLength();
150 if (*maxPage > 0) *minPage = 1;
151 *selPageFrom = *minPage;
152 *selPageTo = *maxPage;
168 return (page > 0) && (page-1 < int(
m_pages.GetCount()));
184 if (!dc)
return false;
188 GetPPIScreen (&ppiScr.x, &ppiScr.y);
194 GetPPIPrinter (&ppiPrt.x, &ppiPrt.y);
199 wxSize dcSize = dc->GetSize();
201 GetPageSizePixels (&pageSize.x, &pageSize.y);
204 float scale_x = (float)(ppiPrt.x * dcSize.x) /
205 (float)(ppiScr.x * pageSize.x);
206 float scale_y = (float)(ppiPrt.y * dcSize.y) /
207 (float)(ppiScr.y * pageSize.y);
208 dc->SetUserScale (scale_x, scale_y);
216 m_edit->SetMarginWidth(0, 40);
217 m_edit->SetMarginWidth(1, 16);
219 wxPrintout::OnEndDocument();
wxPageSetupData * g_pageSetupData
wxPrintData * g_printData
global print data, to remember settings during the session
The class of the editor window.
bool OnPrintPage(int page)
event handlers
bool OnBeginDocument(int startPage, int endPage)
void GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo)
bool PrintScaling(wxDC *dc)
NumeRePrintout(NumeReEditor *edit, Options *options, const wxString &title="")
constructor
bool HasPage(int page)
print functions
This class implements an interface of the internal Settings object adapted to be usable from the GUI.
bool GetLineNumberPrinting() const