summaryrefslogtreecommitdiff
path: root/src/Fl_Printer.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2020-04-22 15:59:22 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2020-04-22 16:01:33 +0200
commit2878fa95ab4e30046472a8c1f7576aa6a39f8ba5 (patch)
treeb37fec88aee27a8e1095b649f10017d44ef69d60 /src/Fl_Printer.cxx
parentb38317b8a5c5aa6b37d4eb559b094da4e31d9a44 (diff)
Add optional argument to Fl_Printer::begin_job() to inform caller when an error occurs.
This solves an issue raised in fltk.general : Fl_Printer errors - how can I interpret them? https://www.fltk.org/newsgroups.php?s38419+gfltk.general+v38427
Diffstat (limited to 'src/Fl_Printer.cxx')
-rw-r--r--src/Fl_Printer.cxx16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/Fl_Printer.cxx b/src/Fl_Printer.cxx
index 390f1e6e1..3f8e50355 100644
--- a/src/Fl_Printer.cxx
+++ b/src/Fl_Printer.cxx
@@ -132,21 +132,9 @@ Fl_Printer::Fl_Printer(void) {
driver(printer->driver());
}
-/**
- Begins a print job.
- Opens a platform-specific dialog window allowing the user to set several options including
- the desired printer and the page orientation. Optionally, the user can also select a range of pages to be
- printed. This range is returned to the caller that is in charge of sending only these pages
- for printing.
-
- \param[in] pagecount the total number of pages of the job (or 0 if you don't know the number of pages)
- \param[out] frompage if non-null, *frompage is set to the first page the user wants printed
- \param[out] topage if non-null, *topage is set to the last page the user wants printed
- \return 0 if OK, non-zero if any error occurred or if the user cancelled the print request.
- */
-int Fl_Printer::begin_job(int pagecount, int *frompage, int *topage)
+int Fl_Printer::begin_job(int pagecount, int *frompage, int *topage, char **perr_message)
{
- return printer->begin_job(pagecount, frompage, topage);
+ return printer->begin_job(pagecount, frompage, topage, perr_message);
}
int Fl_Printer::begin_page(void)