FLTK 1.4.0
Loading...
Searching...
No Matches
Fl_Printer.H
Go to the documentation of this file.
1//
2// Printing support for the Fast Light Tool Kit (FLTK).
3//
4// Copyright 2010-2016 by Bill Spitzak and others.
5//
6// This library is free software. Distribution and use rights are outlined in
7// the file "COPYING" which should have been included with this file. If this
8// file is missing or damaged, see the license at:
9//
10// https://www.fltk.org/COPYING.php
11//
12// Please see the following page on how to report bugs and issues:
13//
14// https://www.fltk.org/bugs.php
15//
16
21#ifndef Fl_Printer_H
22#define Fl_Printer_H
23
24#include <FL/Fl_Paged_Device.H>
25
104class FL_EXPORT Fl_Printer : public Fl_Paged_Device {
105private:
106 Fl_Paged_Device *printer;
108 static Fl_Paged_Device* newPrinterDriver(void);
109public:
111 Fl_Printer(void);
112 int begin_job(int pagecount = 0, int *frompage = NULL, int *topage = NULL, char **perr_message = NULL) FL_OVERRIDE;
113 int begin_page(void) FL_OVERRIDE;
114 int printable_rect(int *w, int *h) FL_OVERRIDE;
115 void margins(int *left, int *top, int *right, int *bottom) FL_OVERRIDE;
116 void origin(int *x, int *y) FL_OVERRIDE;
117 void origin(int x, int y) FL_OVERRIDE;
118 void scale(float scale_x, float scale_y = 0.) FL_OVERRIDE;
119 void rotate(float angle) FL_OVERRIDE;
120 void translate(int x, int y) FL_OVERRIDE;
121 void untranslate(void) FL_OVERRIDE;
122 int end_page (void) FL_OVERRIDE;
123 void end_job (void) FL_OVERRIDE;
124 void set_current(void) FL_OVERRIDE;
125 bool is_current() FL_OVERRIDE;
126
130 static const char *dialog_title;
131 static const char *dialog_printer;
132 static const char *dialog_range;
133 static const char *dialog_copies;
134 static const char *dialog_all;
135 static const char *dialog_pages;
136 static const char *dialog_from;
137 static const char *dialog_to;
138 static const char *dialog_properties;
139 static const char *dialog_copyNo;
140 static const char *dialog_print_button;
141 static const char *dialog_cancel_button;
142 static const char *dialog_print_to_file;
143 static const char *property_title;
144 static const char *property_pagesize;
145 static const char *property_mode;
146 static const char *property_use;
147 static const char *property_save;
148 static const char *property_cancel;
151 ~Fl_Printer(void);
152};
153
154#endif // Fl_Printer_H
declaration of class Fl_Paged_Device.
Represents page-structured drawing surfaces.
Definition Fl_Paged_Device.H:36
virtual int begin_page(void)
Begins a new printed page.
Definition Fl_Paged_Device.cxx:54
virtual void scale(float scale_x, float scale_y=0.)
Changes the scaling of page coordinates.
Definition Fl_Paged_Device.cxx:81
virtual void margins(int *left, int *top, int *right, int *bottom)
Computes the dimensions of margins that lie between the printable page area and the full page.
Definition Fl_Paged_Device.cxx:67
virtual int end_page(void)
To be called at the end of each page.
Definition Fl_Paged_Device.cxx:104
virtual int begin_job(int pagecount=0, int *frompage=NULL, int *topage=NULL, char **perr_message=NULL)
Begins a print job.
Definition Fl_Paged_Device.cxx:36
virtual void end_job(void)
To be called at the end of a print job.
Definition Fl_Paged_Device.cxx:109
virtual void rotate(float angle)
Rotates the graphics operations relatively to paper.
Definition Fl_Paged_Device.cxx:90
OS-independent print support.
Definition Fl_Printer.H:104
static const char * property_title
[this text may be customized at run-time]
Definition Fl_Printer.H:143
static const char * dialog_to
[this text may be customized at run-time]
Definition Fl_Printer.H:137
static const char * dialog_copyNo
[this text may be customized at run-time]
Definition Fl_Printer.H:139
static const char * dialog_all
[this text may be customized at run-time]
Definition Fl_Printer.H:134
static const char * dialog_range
[this text may be customized at run-time]
Definition Fl_Printer.H:132
static const char * dialog_print_to_file
[this text may be customized at run-time]
Definition Fl_Printer.H:142
static const char * dialog_cancel_button
[this text may be customized at run-time]
Definition Fl_Printer.H:141
static const char * property_mode
[this text may be customized at run-time]
Definition Fl_Printer.H:145
static const char * dialog_from
[this text may be customized at run-time]
Definition Fl_Printer.H:136
static const char * dialog_properties
[this text may be customized at run-time]
Definition Fl_Printer.H:138
static const char * property_save
[this text may be customized at run-time]
Definition Fl_Printer.H:147
static const char * property_pagesize
[this text may be customized at run-time]
Definition Fl_Printer.H:144
static const char * dialog_title
[this text may be customized at run-time]
Definition Fl_Printer.H:130
static const char * dialog_pages
[this text may be customized at run-time]
Definition Fl_Printer.H:135
static const char * dialog_printer
[this text may be customized at run-time]
Definition Fl_Printer.H:131
static const char * dialog_copies
[this text may be customized at run-time]
Definition Fl_Printer.H:133
static const char * dialog_print_button
[this text may be customized at run-time]
Definition Fl_Printer.H:140
static const char * property_cancel
[this text may be customized at run-time]
Definition Fl_Printer.H:148
static const char * property_use
[this text may be customized at run-time]
Definition Fl_Printer.H:146
virtual bool is_current()
Is this surface the current drawing surface?
Definition Fl_Device.cxx:92
virtual void set_current(void)
Make this surface the current drawing surface.
Definition Fl_Device.cxx:80
virtual int printable_rect(int *w, int *h)
Computes the width and height of the drawable area of the drawing surface.
Definition Fl_Widget_Surface.cxx:190
virtual void origin(int x, int y)
Sets the position of the origin of graphics in the drawable part of the drawing surface.
Definition Fl_Widget_Surface.cxx:145
virtual void untranslate()
Undoes the effect of a previous translate() call.
Definition Fl_Widget_Surface.cxx:121
virtual void translate(int x, int y)
Translates the current graphics origin accounting for the current rotation.
Definition Fl_Widget_Surface.cxx:114
#define FL_OVERRIDE
This macro makes it safe to use the C++11 keyword override with older compilers.
Definition fl_attr.h:46