class Gtk::PaperSize
- Gtk::PaperSize
- Reference
- Object
Overview
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.
Defined in:
lib/gi-crystal/src/auto/gtk-4.0/paper_size.crConstructors
- .new(pointer : Pointer(Void), transfer : GICrystal::Transfer)
- .new(name : String | Nil) : self
- .new_custom(name : String, display_name : String, width : Float64, height : Float64, unit : Gtk::Unit) : self
- .new_from_gvariant(variant : _) : self
- .new_from_ipp(ipp_name : String, width : Float64, height : Float64) : self
- .new_from_key_file(key_file : GLib::KeyFile, group_name : String | Nil) : self
- .new_from_ppd(ppd_name : String, ppd_display_name : String, width : Float64, height : Float64) : self
Class Method Summary
- .default : String
-
.g_type : UInt64
Returns the type id (GType) registered in GLib type system.
- .paper_sizes(include_custom : Bool) : GLib::List
Instance Method Summary
- #copy : Gtk::PaperSize
- #default_bottom_margin(unit : Gtk::Unit) : Float64
- #default_left_margin(unit : Gtk::Unit) : Float64
- #default_right_margin(unit : Gtk::Unit) : Float64
- #default_top_margin(unit : Gtk::Unit) : Float64
- #display_name : String
- #finalize
- #free : Nil
- #height(unit : Gtk::Unit) : Float64
- #is_custom : Bool
- #is_equal(size2 : Gtk::PaperSize) : Bool
- #is_ipp : Bool
- #name : String
- #ppd_name : String
- #set_size(width : Float64, height : Float64, unit : Gtk::Unit) : Nil
- #to_gvariant : GLib::Variant
- #to_key_file(key_file : GLib::KeyFile, group_name : String) : Nil
- #to_unsafe : Pointer(Void)
- #width(unit : Gtk::Unit) : Float64
Constructor Detail
def self.new_custom(name : String, display_name : String, width : Float64, height : Float64, unit : Gtk::Unit) : self
#
def self.new_from_ppd(ppd_name : String, ppd_display_name : String, width : Float64, height : Float64) : self
#
Class Method Detail
Returns the type id (GType) registered in GLib type system.