|
class gtk.PaperSize(gobject.GBoxed): |
Functionsdef gtk.paper_size_new_from_ppd(
ppd_name
,ppd_display_name
,width
,height
)def gtk.paper_size_new_cutom(
name
,display_name
,width
,height
,unit
)def gtk.paper_size_get_default(
)
This class is available in PyGTK 2.10 and above.
A gtk.PaperSize
handles paper sizes. It uses the standard called "PWG 5101.1-2002 PWG:
Standard for Media Standardized Names" to name the paper sizes (and to
get the data for the page sizes). The common standard paper sizes are
named by the GTK Papaer Name Constants. In addition to
standard paper sizes, gtk.PaperSize
allows to construct custom paper sizes with arbitrary dimensions.
The gtk.PaperSize
object stores not only the dimensions (width and height) of a paper size
and its name, it also provides default print margins.
gtk.PaperSize(name
=None)
| a paper size name, or None |
Returns : | a new gtk.PaperSize . |
This constructor is available in PyGTK 2.10 and above.
Creates a new gtk.PaperSize
object by parsing a PWG 5101.1-2002 PWG paper name.
If name
is None
, the
default paper size is returned, see
paper_size_get_default
().
def copy()
Returns : | a copy of other |
This method is available in PyGTK 2.10 and above.
The copy
() method copies an existing gtk.PaperSize
.
def is_equal(size2
)
| another gtk.PaperSize
object |
Returns : | True , if this paper size and
size2 represent the same paper
size |
This method is available in PyGTK 2.10 and above.
The is_equal
() method returns the
result of comparing this paper size to the gtk.PaperSize
specified by size2
.
def get_name()
Returns : | the name of the paper size |
This method is available in PyGTK 2.10 and above.
The get_name
() method returns the name
of the paper size.
def get_display_name()
Returns : | the human-readable name of the paper size. |
This method is available in PyGTK 2.10 and above.
The get_display_name
() method returns
the human-readable name of the paper size.
def get_ppd_name()
Returns : | the PPD name of the paper
size or None |
This method is available in PyGTK 2.10 and above.
The get_ppd_name
() method returns the
PPD name of the paper size, which may be
None
.
def get_width(unit
)
| the unit for the return value - one of the GTK Unit Constants. |
Returns : | the paper width |
This method is available in PyGTK 2.10 and above.
The get_width
() method returns the
paper width of the paper size, in units of
unit
.
def get_height(unit
)
| the unit for the return value - one of the GTK Unit Constants. |
Returns : | the paper height |
This method is available in PyGTK 2.10 and above.
The get_height
() method returns the
paper height of the paper size, in units of
unit
.
def is_custom()
Returns : | True if the paper size is a
custom paper size. |
The is_custom
() method returns
True
if paper size is not a standard paper
size.
def set_size(width
, height
, unit
)
| the new width in units of
unit |
| the new height in units of
unit |
| the unit for width and
height - one of the GTK Unit Constants. |
This method is available in PyGTK 2.10 and above.
The set_size
() method changes the
dimensions of the paper size to width
x
height
in the units specified by
unit
.
def get_default_top_margin(unit
)
| the unit for the return value - one of the GTK Unit Constants. |
Returns : | the default top margin |
This method is available in PyGTK 2.10 and above.
The get_default_top_margin
() method
returns the default top margin for the gtk.PaperSize
.
def get_default_bottom_margin(unit
)
| the unit for the return value - one of the GTK Unit Constants. |
Returns : | the default bottom margin |
This method is available in PyGTK 2.10 and above.
The get_default_bottom_margin
() method
gets the default bottom margin for the paper size.
def get_default_left_margin(unit
)
| the unit for the return value - one of the GTK Unit Constants. |
Returns : | the default left margin |
This method is available in PyGTK 2.10 and above.
The get_default_left_margin
() method
gets the default left margin for the paper size.
def get_default_right_margin(unit
)
| the unit for the return value - one of the GTK Unit Constants. |
Returns : | the default right margin |
This method is available in PyGTK 2.10 and above.
The get_default_right_margin
() method
gets the default right margin for the paper size.
def gtk.paper_size_new_from_ppd(ppd_name
, ppd_display_name
, width
, height
)
| a PPD paper name |
| the corresponding human-readable name |
| the paper width, in points |
| the paper height in points |
Returns : | a new gtk.PaperSize |
This function is available in PyGTK 2.10 and above.
The paper_size new__from_ppd
() function
creates a new gtk.PaperSize
object by using PPD information. If ppd_name
is not a recognized PPD paper name,
ppd_display_name
, width
and height
are used to construct a custom gtk.PaperSize
object.
def gtk.paper_size_new_custom(name
, display_name
, width
, height
, unit
)
| the paper name |
| the corresponding human-readable name |
| the paper width, in units of
unit |
| the paper height in units of
unit |
| the units - one of the GTK Unit Constants. |
Returns : | a new gtk.PaperSize |
This function is available in PyGTK 2.10 and above.
The paper_size_new_custom
() function
creates a new gtk.PaperSize
object with the given parameters.
© manpagez.com 2000-2024 Individual documents may contain additional copyright information.