diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-03-31 16:55:49 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-04-30 10:22:47 +0200 |
| commit | 9472ff546cc0b4150d4dec89b48b3e4814b421f6 (patch) | |
| tree | bd4bd14b59b13a41decf50a207c7e1770bcabd6e /src/Fl_Device.cxx | |
| parent | b402b6a8397f9fc13157813d39d505ea9ead00f0 (diff) | |
Implement and document new class Fl_PDF_File_Surface
Diffstat (limited to 'src/Fl_Device.cxx')
| -rw-r--r-- | src/Fl_Device.cxx | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/src/Fl_Device.cxx b/src/Fl_Device.cxx index b6c3f4da0..16a9045bd 100644 --- a/src/Fl_Device.cxx +++ b/src/Fl_Device.cxx @@ -1,7 +1,7 @@ // // implementation of classes Fl_Surface_Device and Fl_Display_Device for the Fast Light Tool Kit (FLTK). // -// Copyright 2010-2023 by Bill Spitzak and others. +// Copyright 2010-2024 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -46,6 +46,11 @@ | +- Fl_Posix_Printer_Driver: Fl_Printer uses that under Posix platforms +- Fl_GTK_Printer_Driver: Fl_Printer uses that under Posix+GTK platforms + +- Fl_PDF_File_Surface: draw into a PDF file + +- Fl_PDF_GDI_File_Surface: Windows-specific helper class interfacing FLTK with PDF operations + +- Fl_PDF_Pango_File_Surface: Linux/Unix-specific helper class interfacing FLTK with PDF operations + +- Fl_PDF_Cocoa_File_Surface: macOS-specific helper class interfacing FLTK with PDF operations + +- Fl_Graphics_Driver -> directed to an Fl_Surface_Device object | @@ -154,3 +159,28 @@ Fl_Device_Plugin *Fl_Device_Plugin::opengl_plugin() { } return pi; } + +#if !defined(FL_NO_PRINT_SUPPORT) + +#include <FL/Fl_PDF_File_Surface.H> + +Fl_PDF_File_Surface::Fl_PDF_File_Surface() { + platform_surface_ = new_platform_pdf_surface_(&out_filename_); + driver(platform_surface_->driver()); +} + + +Fl_PDF_File_Surface::~Fl_PDF_File_Surface() { + delete platform_surface_; +} + +#endif // !defined(FL_NO_PRINT_SUPPORT) + +/** Localizable text of the "PDF document settings" dialog */ +const char * Fl_PDF_File_Surface::format_dialog_title = "PDF document settings"; +/** Localizable text of the "PDF document settings" dialog */ +const char * Fl_PDF_File_Surface::format_dialog_page_size = "Page Size:"; +/** Localizable text of the "PDF document settings" dialog */ +const char * Fl_PDF_File_Surface::format_dialog_default = "Set as default"; +/** Localizable text of the "PDF document settings" dialog */ +const char * Fl_PDF_File_Surface::format_dialog_orientation = "Orientation:"; |
