diff options
| author | Manolo Gouy <Manolo> | 2016-03-18 18:20:11 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-03-18 18:20:11 +0000 |
| commit | fa9a33eaeeddb85a6afedc2d02d0d67f290b0822 (patch) | |
| tree | b881473f229f5edccf5fef79c335de8b4faf33d4 /src/drivers/PostScript/Fl_PostScript.cxx | |
| parent | 3e0e68bb59058eb86af143ed2946197aa7cfca1c (diff) | |
Beginning of Albrecht's plan for Fl_Window and Fl_Window_Driver classes.
Still unclear whether the implementation of the flush() functions follows the plan.
The Fl_Printer class is fully rewritten under the driver model.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11364 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/PostScript/Fl_PostScript.cxx')
| -rw-r--r-- | src/drivers/PostScript/Fl_PostScript.cxx | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/drivers/PostScript/Fl_PostScript.cxx b/src/drivers/PostScript/Fl_PostScript.cxx index 9528c6023..b3e7d214d 100644 --- a/src/drivers/PostScript/Fl_PostScript.cxx +++ b/src/drivers/PostScript/Fl_PostScript.cxx @@ -17,7 +17,7 @@ // #include <FL/Fl_Printer.H> -#include <config.h> +#include <src/config_lib.h> #include <FL/Fl.H> #include <FL/fl_ask.H> #include <FL/fl_draw.H> @@ -1557,15 +1557,21 @@ void Fl_PostScript_File_Device::end_job (void) #endif // FL_DOXYGEN -#if defined(__APPLE__) // PORTME: Fl_Surface_Driver ? - platform PostScript -#elif defined(WIN32) -#elif defined(FL_PORTING) -# pragma message "FL_PORTING: implement postscript printing" -#else // X11 +#if defined(FL_CFG_PRN_PS) + +/** Support for printing on the Unix/Linux platform */ +class Fl_Posix_Printer_Driver : public Fl_PostScript_File_Device { + virtual int start_job(int pagecount, int *frompage = NULL, int *topage = NULL); +}; + +Fl_Paged_Device* Fl_Paged_Device::newPrinterDriver(void) +{ + return new Fl_Posix_Printer_Driver(); +} /** Starts a print job. */ -int Fl_Printer::Helper::start_job(int pages, int *firstpage, int *lastpage) { +int Fl_Posix_Printer_Driver::start_job(int pages, int *firstpage, int *lastpage) { enum Fl_Paged_Device::Page_Format format; enum Fl_Paged_Device::Page_Layout layout; @@ -1661,7 +1667,7 @@ int Fl_Printer::Helper::start_job(int pages, int *firstpage, int *lastpage) { return ps->start_postscript(pages, format, layout); // start printing } -#endif // ! (defined(__APPLE__) || defined(WIN32) ) // PORTME: Fl_Surface_Driver - platform PostScript +#endif // defined(FL_CFG_PRN_PS) // |
