FLTK logo

[fltk.coredev] RFC: using Fl_Printer in longer operations

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.coredev  ]
 
Previous Message ]New Message | Reply ]Next Message ]

RFC: using Fl_Printer in longer operations "'melcher.... Jun 12, 2022  
  I added a comment yesterday: https://github.com/fltk/fltk/commit/bcbdf5546f53afdc0e3a4bb7458eb863783e76fd

and it's probably not the best solution.

When a print operation takes longer for whatever reason, and some other FL graphics may be rendered between a begin_page() and end_page() - a progress dialog, for example - the progress dialog rendering is sent to the printer not the screen.

I know that this is a very uncommon case, so I would like to ask the core devs how to solve this:
 a: ignore, probably nobody (besides me) will ever have this issue
 b: keep the doc changes to first pop the printer context, then push the context
 c: change docs to first push the screen context, then render on screen, then pop back to the printer context
 d: add a suspend() and resume() method that does b: or c: (which one)

Example:
  myPrinter->begin_page();
  while (!done) {
    draw_part_of_page(); // slow operation
    Fl::wait(0); // keep the app responsive, also flushes drawing requests
  }
  myPrinter->end_page();

So d: would add myPrinter->suspend() before , and myPrinter->resume() after the Fl::wait(0) statement.

--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/9e743202-bfcd-403b-9aa0-5c172a6eb309n%40googlegroups.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.