diff options
| author | Manolo Gouy <Manolo> | 2010-03-28 14:03:40 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2010-03-28 14:03:40 +0000 |
| commit | b77071a3de3593ea482aa7ea0a442c7fc888a2e2 (patch) | |
| tree | 5e2c56f2d7f722161228b90e5e7838c543dbaf63 /FL | |
| parent | 99f2e8b5be1c06c877f48850fd47ebc55fedba3a (diff) | |
Fl_Printer class on Xlib: allow dialog text customization at run-time
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7350 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/Fl_PSfile_Device.H | 34 | ||||
| -rw-r--r-- | FL/Fl_Printer.H | 61 |
2 files changed, 63 insertions, 32 deletions
diff --git a/FL/Fl_PSfile_Device.H b/FL/Fl_PSfile_Device.H index 70bff5460..5eb9fa5db 100644 --- a/FL/Fl_PSfile_Device.H +++ b/FL/Fl_PSfile_Device.H @@ -38,7 +38,7 @@ This class has the same API as class Fl_Printer except for start_job() member function. \see class Fl_Printer. */ -class FL_EXPORT Fl_PSfile_Device : public Fl_Abstract_Printer { +FL_EXPORT class Fl_PSfile_Device : public Fl_Abstract_Printer { public: /** \brief Possible page formats. @@ -251,42 +251,12 @@ class FL_EXPORT Fl_PSfile_Device : public Fl_Abstract_Printer { int end_page (void); void end_job(void); #endif // FL_DOXYGEN - - /** - @brief The constructor. - */ Fl_PSfile_Device(void); - - /** - @brief Begins the session where all graphics requests will go to a local PostScript file. - * - Opens a file dialog entitled with Fl_PSfile_Device::file_chooser_title to select an output PostScript file. - @param pagecount The total number of pages to be created. - @param format Desired page format. - @param layout Desired page layout. - @return 0 iff OK, 1 if user cancelled the file dialog, 2 if fopen failed on user-selected output file. - */ int start_job(int pagecount, enum Page_Format format = A4, enum Page_Layout layout = PORTRAIT); - - /** - @brief Begins the session where all graphics requests will go to FILE pointer. - * - @param ps_output A writable FILE pointer that will receive PostScript output and that will be closed - when end_job() will be called. - @param pagecount The total number of pages to be created. - @param format Desired page format. - @param layout Desired page layout. - @return always 0. - */ int start_job(FILE *ps_output, int pagecount, enum Page_Format format = A4, enum Page_Layout layout = PORTRAIT); - - /** - @brief The destructor. - */ virtual ~Fl_PSfile_Device(); - // how to have the const value appear in Doxygen as occurs with Fl_File_Chooser ? - /** \brief "Select a .ps file" [this text may be customized at run-time] */ + /** [this text may be customized at run-time] */ static const char *file_chooser_title; }; diff --git a/FL/Fl_Printer.H b/FL/Fl_Printer.H index 6636d2138..e3a90c806 100644 --- a/FL/Fl_Printer.H +++ b/FL/Fl_Printer.H @@ -94,6 +94,48 @@ public: #endif int end_page (void); void end_job (void); +#ifdef FL_DOXYGEN + /** \name These attributes apply to the Xlib platform only. + \{ + */ + /** [this text may be customized at run-time] */ + static const char *dialog_title; + /** [this text may be customized at run-time] */ + static const char *dialog_printer; + /** [this text may be customized at run-time] */ + static const char *dialog_range; + /** [this text may be customized at run-time] */ + static const char *dialog_copies; + /** [this text may be customized at run-time] */ + static const char *dialog_all; + /** [this text may be customized at run-time] */ + static const char *dialog_pages; + /** [this text may be customized at run-time] */ + static const char *dialog_from; + /** [this text may be customized at run-time] */ + static const char *dialog_to; + /** "Properties..." [this text may be customized at run-time] */ + static const char *dialog_properties; + /** [this text may be customized at run-time] */ + static const char *dialog_copyNo; + /** [this text may be customized at run-time] */ + static const char *dialog_print_button; + /** [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 *property_title; + /** [this text may be customized at run-time] */ + static const char *property_pagesize; + /** [this text may be customized at run-time] */ + static const char *property_mode; + /** [this text may be customized at run-time] */ + static const char *property_use; + /** [this text may be customized at run-time] */ + static const char *property_save; + /** [this text may be customized at run-time] */ + static const char *property_cancel; + /** \} */ +#endif }; #else @@ -102,6 +144,25 @@ public: class Fl_Printer : public Fl_PSfile_Device { public: + static const char *dialog_title; + static const char *dialog_printer; + static const char *dialog_range; + static const char *dialog_copies; + static const char *dialog_all; + static const char *dialog_pages; + static const char *dialog_from; + static const char *dialog_to; + static const char *dialog_properties; + static const char *dialog_copyNo; + static const char *dialog_print_button; + static const char *dialog_cancel_button; + static const char *property_title; + static const char *property_pagesize; + static const char *property_mode; + static const char *property_use; + static const char *property_save; + static const char *property_cancel; + Fl_Printer(void) {}; ~Fl_Printer(void) {}; int start_job(int pages, int *firstpage = NULL, int *lastpage = NULL); |
