summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2022-05-31 17:23:16 +0200
committerMatthias Melcher <github@matthiasm.com>2022-06-11 11:57:15 +0200
commitbcbdf5546f53afdc0e3a4bb7458eb863783e76fd (patch)
tree770412c9e1fc6c5646d171ac10eb5f83e3870a7a
parent23d0a631cfaffc5a45328d46ddeed0f034710a3d (diff)
Some docs for printing asynchronously.
-rw-r--r--src/Fl_Paged_Device.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Fl_Paged_Device.cxx b/src/Fl_Paged_Device.cxx
index 3eb250aab..aed108022 100644
--- a/src/Fl_Paged_Device.cxx
+++ b/src/Fl_Paged_Device.cxx
@@ -41,6 +41,14 @@ int Fl_Paged_Device::begin_job(int pagecount, int *frompage, int *topage, char *
The page coordinates are initially in points, i.e., 1/72 inch,
and with origin at the top left of the printable page area.
This function also makes this surface the current drawing surface with Fl_Surface_Device::push_current().
+
+ \note begin_page() calls Fl_Surface_Device::push_current() and leaves this
+ device as the active surface. If any calls between begin_page() and end_page()
+ open dialog boxes or will otherwise draw into FLTK windows, those calls must
+ be put between a call to Fl_Surface_Device::pop_current()
+ and a call to Fl_Surface_Device::push_current(), or the content of the dialog
+ box will be rendered to the printer instead of the screen.
+
\return 0 if OK, non-zero if any error
*/
int Fl_Paged_Device::begin_page (void) {return 1;}
@@ -85,6 +93,12 @@ void Fl_Paged_Device::rotate(float angle) {}
\brief To be called at the end of each page.
This function also stops this surface from being the current drawing surface with Fl_Surface_Device::pop_current().
+ \note end_page() calls Fl_Surface_Device::pop_current().
+ If any calls between begin_page() and end_page()
+ open dialog boxes or will otherwise draw into FLTK windows, those calls must
+ be put between a call to Fl_Surface_Device::pop_current()
+ and a call to Fl_Surface_Device::push_current().
+
\return 0 if OK, non-zero if any error.
*/
int Fl_Paged_Device::end_page (void) {return 1;}