diff options
| author | Manolo Gouy <Manolo> | 2011-01-06 06:06:57 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2011-01-06 06:06:57 +0000 |
| commit | 9f61a96b85402f05387d317df130166290ed0e2f (patch) | |
| tree | 9dee6d782dd54c87f9b4f42987d8ca21eb7a200f | |
| parent | 128636292a57c58d31a6b872b3f6bf6b3b0ff101 (diff) | |
Declared protected the constructors of classes Fl_System_Printer and Fl_Postscript_Printer,
so end users only employ the system-independent Fl_Printer class.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8196 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | FL/Fl_Printer.H | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/FL/Fl_Printer.H b/FL/Fl_Printer.H index ebb02095b..d9a51e3f8 100644 --- a/FL/Fl_Printer.H +++ b/FL/Fl_Printer.H @@ -44,14 +44,16 @@ #include <commdlg.h> #endif -#if defined(__APPLE__) || defined(WIN32) -/* - Print support under MSWindows and Mac OS X. +#if defined(__APPLE__) || defined(WIN32) || defined(FL_DOXYGEN) +/** + Print support under MSWindows and Mac OS. - Class Fl_System_Printer is implemented only on the MSWindows and Mac OS X platforms. + Class Fl_System_Printer is implemented only on the MSWindows and Mac OS platforms. + It has no public constructor. Use Fl_Printer instead that is cross-platform and has the same API. */ class Fl_System_Printer : public Fl_Paged_Device { + friend class Fl_Printer; private: /** \brief the printer's graphics context, if there's one, NULL otherwise */ void *gc; @@ -72,9 +74,11 @@ private: int top_margin; void absolute_printable_rect(int *x, int *y, int *w, int *h); #endif +protected: + /** \brief The constructor */ + Fl_System_Printer(void); public: static const char *class_id; - Fl_System_Printer(void); int start_job(int pagecount, int *frompage = NULL, int *topage = NULL); int start_page (void); int printable_rect(int *w, int *h); @@ -86,20 +90,25 @@ public: void untranslate(void); int end_page (void); void end_job (void); - + /** \brief The destructor */ ~Fl_System_Printer(void); }; // class Fl_System_Printer #endif -#if !(defined(__APPLE__) || defined(WIN32) || defined(FL_DOXYGEN)) -/* +#if !(defined(__APPLE__) || defined(WIN32) ) +/** Print support under Unix/Linux. Class Fl_PostScript_Printer is implemented only on the Unix/Linux platform. + It has no public constructor. Use Fl_Printer instead that is cross-platform and has the same API. */ class Fl_PostScript_Printer : public Fl_PostScript_File_Device { + friend class Fl_Printer; +protected: + /** \brief The constructor */ + Fl_PostScript_Printer(void) {}; public: static const char *class_id; int start_job(int pages, int *firstpage = NULL, int *lastpage = NULL); |
