Fix pagination in stc sample
1. Fix setting page size if printing is done in the landscape mode. 2. Store ranges of printed characters for all pages (not only recent page) while doing pagination (in GetPageInfo) to allow printing pages (with OnPrintPage) in any order (not only sequentially). Closes #17107.
This commit is contained in:
@@ -165,16 +165,16 @@ public:
|
||||
EditPrint (Edit *edit, const wxChar *title = wxT(""));
|
||||
|
||||
//! event handlers
|
||||
bool OnPrintPage (int page);
|
||||
bool OnBeginDocument (int startPage, int endPage);
|
||||
bool OnPrintPage (int page) wxOVERRIDE;
|
||||
bool OnBeginDocument (int startPage, int endPage) wxOVERRIDE;
|
||||
|
||||
//! print functions
|
||||
bool HasPage (int page);
|
||||
void GetPageInfo (int *minPage, int *maxPage, int *selPageFrom, int *selPageTo);
|
||||
bool HasPage (int page) wxOVERRIDE;
|
||||
void GetPageInfo (int *minPage, int *maxPage, int *selPageFrom, int *selPageTo) wxOVERRIDE;
|
||||
|
||||
private:
|
||||
Edit *m_edit;
|
||||
int m_printed;
|
||||
wxArrayInt m_pageEnds;
|
||||
wxRect m_pageRect;
|
||||
wxRect m_printRect;
|
||||
|
||||
|
Reference in New Issue
Block a user