FLTK 1.5.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
101class FL_EXPORT Fl_Printer : public Fl_Paged_Device {
102private:
103 Fl_Paged_Device *printer;
105 static Fl_Paged_Device* newPrinterDriver(void);
106public:
108 Fl_Printer(void);
109 int begin_job(int pagecount = 0, int *frompage = NULL, int *topage = NULL, char **perr_message = NULL) FL_OVERRIDE;
110 int begin_page(void) FL_OVERRIDE;
111 int printable_rect(int *w, int *h) FL_OVERRIDE;
112 void margins(int *left, int *top, int *right, int *bottom) FL_OVERRIDE;
113 void origin(int *x, int *y) FL_OVERRIDE;
114 void origin(int x, int y) FL_OVERRIDE;
115 void scale(float scale_x, float scale_y = 0.) FL_OVERRIDE;
116 void rotate(float angle) FL_OVERRIDE;
117 void translate(int x, int y) FL_OVERRIDE;
118 void untranslate(void) FL_OVERRIDE;
119 int end_page (void) FL_OVERRIDE;
120 void end_job (void) FL_OVERRIDE;
121 void set_current(void) FL_OVERRIDE;
122 bool is_current() FL_OVERRIDE;
123
127 static const char *dialog_title;
128 static const char *dialog_printer;
129 static const char *dialog_range;
130 static const char *dialog_copies;
131 static const char *dialog_all;
132 static const char *dialog_pages;
133 static const char *dialog_from;
134 static const char *dialog_to;
135 static const char *dialog_properties;
136 static const char *dialog_copyNo;
137 static const char *dialog_print_button;
138 static const char *dialog_cancel_button;
139 static const char *dialog_print_to_file;
140 static const char *property_title;
141 static const char *property_pagesize;
142 static const char *property_mode;
143 static const char *property_use;
144 static const char *property_save;
145 static const char *property_cancel;
148 ~Fl_Printer(void);
149};
150
151#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:101
static const char * property_title
[this text may be customized at run-time]
Definition Fl_Printer.H:140
static const char * dialog_to
[this text may be customized at run-time]
Definition Fl_Printer.H:134
static const char * dialog_copyNo
[this text may be customized at run-time]
Definition Fl_Printer.H:136
static const char * dialog_all
[this text may be customized at run-time]
Definition Fl_Printer.H:131
static const char * dialog_range
[this text may be customized at run-time]
Definition Fl_Printer.H:129
static const char * dialog_print_to_file
[this text may be customized at run-time]
Definition Fl_Printer.H:139
static const char * dialog_cancel_button
[this text may be customized at run-time]
Definition Fl_Printer.H:138
static const char * property_mode
[this text may be customized at run-time]
Definition Fl_Printer.H:142
static const char * dialog_from
[this text may be customized at run-time]
Definition Fl_Printer.H:133
static const char * dialog_properties
[this text may be customized at run-time]
Definition Fl_Printer.H:135
static const char * property_save
[this text may be customized at run-time]
Definition Fl_Printer.H:144
static const char * property_pagesize
[this text may be customized at run-time]
Definition Fl_Printer.H:141
static const char * dialog_title
[this text may be customized at run-time]
Definition Fl_Printer.H:127
static const char * dialog_pages
[this text may be customized at run-time]
Definition Fl_Printer.H:132
static const char * dialog_printer
[this text may be customized at run-time]
Definition Fl_Printer.H:128
static const char * dialog_copies
[this text may be customized at run-time]
Definition Fl_Printer.H:130
static const char * dialog_print_button
[this text may be customized at run-time]
Definition Fl_Printer.H:137
static const char * property_cancel
[this text may be customized at run-time]
Definition Fl_Printer.H:145
static const char * property_use
[this text may be customized at run-time]
Definition Fl_Printer.H:143
virtual bool is_current()
Is this surface the current drawing surface?
Definition Fl_Device.cxx:103
virtual void set_current(void)
Make this surface the current drawing surface.
Definition Fl_Device.cxx:91
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:38