The Gnome Chemistry Utils
0.14.0
Main Page
Namespaces
Classes
Files
File List
File Members
libs
gcugtk
printable.h
Go to the documentation of this file.
1
/*
2
* Gnome Chemistry Utils
3
* printable.h
4
*
5
* Copyright (C) 2008-2012 Jean Bréfort <jean.brefort@normalesup.org>
6
*
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License as
9
* published by the Free Software Foundation; either version 3 of the
10
* License, or (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
20
* USA
21
*/
22
23
#ifndef GCU_PRINTABLE_H
24
#define GCU_PRINTABLE_H
25
26
#include <
gcu/dialog-owner.h
>
27
#include <
gcu/macros.h
>
28
#include <gtk/gtk.h>
29
32
namespace
gcugtk {
33
37
typedef
enum
{
41
GCU_PRINT_SCALE_NONE
,
45
GCU_PRINT_SCALE_FIXED
,
49
GCU_PRINT_SCALE_AUTO
,
50
}
PrintScaleType
;
51
55
class
Printable
:
virtual
public
gcu::DialogOwner
56
{
57
public
:
61
Printable
();
65
virtual
~Printable
();
66
76
virtual
void
DoPrint
(GtkPrintOperation *print, GtkPrintContext *context,
int
page)
const
= 0;
82
virtual
bool
SupportsHeaders
() {
return
false
;}
88
virtual
bool
SupportMultiplePages
() {
return
false
;}
93
virtual
GtkWindow *
GetGtkWindow
() = 0;
98
virtual
int
GetPagesNumber
() {
return
1;}
99
105
void
Print
(
bool
preview);
113
void
SetPageSetup
(GtkPageSetup *PageSetup);
114
118
GCU_RO_PROP
(GtkPrintSettings *, PrintSettings)
122
GCU_RO_PROP
(GtkPageSetup *, PageSetup)
134
GCU_PROP
(GtkUnit, Unit)
146
GCU_PROP
(
double
, HeaderHeight)
158
GCU_PROP
(
double
, FooterHeight)
169
GCU_PROP
(
bool
, HorizCentered)
180
GCU_PROP
(
bool
, VertCentered)
192
GCU_PROP
(
PrintScaleType
, ScaleType)
204
GCU_PROP
(
double
, Scale)
215
GCU_PROP
(
bool
, HorizFit)
225
GCU_PROP
(
bool
, VertFit)
238
GCU_PROP
(
int
, HPages)
251
GCU_PROP
(
int
, VPages)
264
GCU_PROP
(
bool
, HasBackground)
276
GCU_PROP
(
bool
, PrintBackground)
277
};
278
283
GtkUnit
gtk_unit_from_string
(
char
const *name);
288
char
const *
gtk_unit_to_string
(GtkUnit unit);
289
290
}
// namespace gcu
291
292
#endif // GCU_PRINTABLE_H
Generated on Tue Jan 1 2013 22:29:23 for The Gnome Chemistry Utils by
1.8.1.2