[ruby-gnome2-doc-cvs] [Ruby-GNOME2 Project Website] create - Gtk::PaperSize

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2006年 7月 10日 (月) 00:17:55 JST


-------------------------
REMOTE_ADDR = 138.243.201.10
REMOTE_HOST = 
REMOTE_USER = ruby-gnome2-hiki
        URL = /hiki.cgi?Gtk%3A%3APaperSize
-------------------------
TITLE       = Gtk::PaperSize
KEYWORD     = 
= class Gtk::PaperSize

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). 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.

== Object Hierarchy
* Object
  * GLib::Boxed
    * Gtk::PaperSize

== Class Methods
--- Gtk::PaperSize.default
     Returns the name of the default paper size, which
     depends on the current locale.

     * Returns: the name of the default paper size.

--- Gtk::PaperSize.new(name=nil)
     Creates a new Gtk::PaperSize object by parsing a PWG
     5101.1-2002 PWG paper name.

     If ((|name|)) is nil, the default paper size is returned,
     see Gtk::PaperSize.default.

     * name: a paper size name, or nil
     * Returns: a new Gtk::PaperSize

--- Gtk::PaperSize.new(ppd_name, ppd_display_name, width, height)
     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.

     * ppd_name: a PPD paper name
     * ppd_display_name: the corresponding human-readable name
     * width: the paper width, in points
     * height: the paper height in points
     * Returns: a new Gtk::PaperSize

--- Gtk::PaperSize.new(name, display_name, width, height, unit)
     Creates a new Gtk::PaperSize object with the given parameters.

     * name: the paper name
     * display_name: the human-readable name
     * width: the paper width, in units of ((|unit|))
     * height: the paper height, in units of ((|unit|))
     * unit: the unit for ((|width|)) and ((|height|))
     * Returns: a new Gtk::PaperSize object


== Instance Methods
--- ==(other)
     Compares two Gtk::PaperSize objects.

     * other: another Gtk::PaperSize.
     * Returns: true, if ((|self|)) and ((|other|))
       represent the same paper size

--- custom?
     Returns true if ((|self|)) is not a standard paper size.

     * Returns: whether ((|self|)) is a custom paper size.

--- default_top_margin(unit)
     Gets the default top margin for the Gtk::PaperSize.

     * unit: the unit for the return value as Gtk::Unit
     * Returns: the default top margin
--- default_bottom_margin(unit)
     Gets the default bottom margin for the Gtk::PaperSize.

     * unit: the unit for the return value as Gtk::Unit
     * Returns: the default bottom margin
--- default_left_margin(unit)
     Gets the default left margin for the Gtk::PaperSize.

     * unit: the unit for the return value as Gtk::Unit
     * Returns: the default left margin
--- default_margin_margin(unit)
     Gets the default margin margin for the Gtk::PaperSize.

     * unit: the unit for the return value as Gtk::Unit
     * Returns: the default margin margin

--- name
     Gets the name of the Gtk::PaperSize.

     * Returns: the name of ((|self|))
--- display_name
     Gets the human-readable name of the Gtk::PaperSize.

     * Returns: the human-readable name of ((|self|))
--- ppd_name
     Gets the PPD name of the Gtk::PaperSize, which may be nil.

     * Returns: the PPD name of ((|self|))

--- width(unit)
     Gets the paper width of the Gtk::PaperSize, in units of ((|unit|)).

     * unit: the unit for the return value
     * Returns: the paper width
--- height(unit)
     Gets the paper height of the Gtk::PaperSize, in units of ((|unit|)).

     * unit: the unit for the return value
     * Returns: the paper height

--- set_size(size, width, height, unit)
     Changes the dimensions of a ((|size|)) to ((|width|)) x ((|height|)).

     * size: a custom Gtk::PaperSize object
     * width: the new width in units of ((|unit|))
     * height: the new height in units of ((|unit|))
     * unit: the unit for ((|width|)) and ((|height|))
     * Returns: self

== Constants
--- A3
--- A4
--- A5
--- B5
--- EXECUTIVE
--- LEGAL
--- LETTER

== See Also

== ChangeLog

* 2006-07-09: updated for 2.10. - ((<kou>))

- ((<kou>))






ruby-gnome2-cvs メーリングリストの案内
Back to archive index