From 24c6e23e25f0dd42784dee65be70e4bec6f05722 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Mon, 29 Mar 2010 12:15:22 +0000 Subject: print_panel.cxx: allow customization of "Print To File" string git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7355 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Fl_Printer.H | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'FL') diff --git a/FL/Fl_Printer.H b/FL/Fl_Printer.H index e3a90c806..ccb2b6158 100644 --- a/FL/Fl_Printer.H +++ b/FL/Fl_Printer.H @@ -52,6 +52,16 @@ In both cases, begin by start_job(), start_page(), printable_rect() and origin() calls and finish by end_page() and end_job() calls. +

On Xlib-based platforms (e.g., Linux, Unix), the static public attributes of this class + can be used to set the print dialog to other languages than English. For example, the "Printer:" + dialog item Fl_Printer::dialog_printer can be set to French with: + \code + Fl_Printer::dialog_printer = "Imprimante:"; + Fl_Printer myprinter; + myprinter.start_job(); + \endcode + Use Fl_PSfile_Device::file_chooser_title to customize the title of the file chooser dialog that opens + when using the "Print To File" option of the print dialog. */ class Fl_Printer : public Fl_Abstract_Printer { private: @@ -123,6 +133,8 @@ public: /** [this text may be customized at run-time] */ static const char *dialog_cancel_button; /** [this text may be customized at run-time] */ + static const char *dialog_print_to_file; + /** [this text may be customized at run-time] */ static const char *property_title; /** [this text may be customized at run-time] */ static const char *property_pagesize; @@ -144,7 +156,7 @@ public: class Fl_Printer : public Fl_PSfile_Device { public: - static const char *dialog_title; + static const char *dialog_title; // all of this must be duplicated above for correct documentation static const char *dialog_printer; static const char *dialog_range; static const char *dialog_copies; @@ -156,6 +168,7 @@ public: static const char *dialog_copyNo; static const char *dialog_print_button; static const char *dialog_cancel_button; + static const char *dialog_print_to_file; static const char *property_title; static const char *property_pagesize; static const char *property_mode; -- cgit v1.2.3