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
This commit is contained in:
Manolo Gouy
2011-01-06 06:06:57 +00:00
parent 128636292a
commit 9f61a96b85
+17 -8
View File
@@ -44,14 +44,16 @@
#include <commdlg.h> #include <commdlg.h>
#endif #endif
#if defined(__APPLE__) || defined(WIN32) #if defined(__APPLE__) || defined(WIN32) || defined(FL_DOXYGEN)
/* /**
Print support under MSWindows and Mac OS X. 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. Use Fl_Printer instead that is cross-platform and has the same API.
*/ */
class Fl_System_Printer : public Fl_Paged_Device { class Fl_System_Printer : public Fl_Paged_Device {
friend class Fl_Printer;
private: private:
/** \brief the printer's graphics context, if there's one, NULL otherwise */ /** \brief the printer's graphics context, if there's one, NULL otherwise */
void *gc; void *gc;
@@ -72,9 +74,11 @@ private:
int top_margin; int top_margin;
void absolute_printable_rect(int *x, int *y, int *w, int *h); void absolute_printable_rect(int *x, int *y, int *w, int *h);
#endif #endif
protected:
/** \brief The constructor */
Fl_System_Printer(void);
public: public:
static const char *class_id; static const char *class_id;
Fl_System_Printer(void);
int start_job(int pagecount, int *frompage = NULL, int *topage = NULL); int start_job(int pagecount, int *frompage = NULL, int *topage = NULL);
int start_page (void); int start_page (void);
int printable_rect(int *w, int *h); int printable_rect(int *w, int *h);
@@ -86,20 +90,25 @@ public:
void untranslate(void); void untranslate(void);
int end_page (void); int end_page (void);
void end_job (void); void end_job (void);
/** \brief The destructor */
~Fl_System_Printer(void); ~Fl_System_Printer(void);
}; // class Fl_System_Printer }; // class Fl_System_Printer
#endif #endif
#if !(defined(__APPLE__) || defined(WIN32) || defined(FL_DOXYGEN)) #if !(defined(__APPLE__) || defined(WIN32) )
/* /**
Print support under Unix/Linux. Print support under Unix/Linux.
Class Fl_PostScript_Printer is implemented only on the Unix/Linux platform. 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. Use Fl_Printer instead that is cross-platform and has the same API.
*/ */
class Fl_PostScript_Printer : public Fl_PostScript_File_Device { class Fl_PostScript_Printer : public Fl_PostScript_File_Device {
friend class Fl_Printer;
protected:
/** \brief The constructor */
Fl_PostScript_Printer(void) {};
public: public:
static const char *class_id; static const char *class_id;
int start_job(int pages, int *firstpage = NULL, int *lastpage = NULL); int start_job(int pages, int *firstpage = NULL, int *lastpage = NULL);