class Gtk::PaperSize

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

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(pointer : Pointer(Void), transfer : GICrystal::Transfer) #

[View source]
def self.new(name : String | Nil) : self #

[View source]
def self.new_custom(name : String, display_name : String, width : Float64, height : Float64, unit : Gtk::Unit) : self #

[View source]
def self.new_from_gvariant(variant : _) : self #

[View source]
def self.new_from_ipp(ipp_name : String, width : Float64, height : Float64) : self #

[View source]
def self.new_from_key_file(key_file : GLib::KeyFile, group_name : String | Nil) : self #

[View source]
def self.new_from_ppd(ppd_name : String, ppd_display_name : String, width : Float64, height : Float64) : self #

[View source]

Class Method Detail

def self.default : String #

[View source]
def self.g_type : UInt64 #

Returns the type id (GType) registered in GLib type system.


[View source]
def self.paper_sizes(include_custom : Bool) : GLib::List #

[View source]

Instance Method Detail

def copy : Gtk::PaperSize #

[View source]
def default_bottom_margin(unit : Gtk::Unit) : Float64 #

[View source]
def default_left_margin(unit : Gtk::Unit) : Float64 #

[View source]
def default_right_margin(unit : Gtk::Unit) : Float64 #

[View source]
def default_top_margin(unit : Gtk::Unit) : Float64 #

[View source]
def display_name : String #

[View source]
def finalize #

[View source]
def free : Nil #

[View source]
def height(unit : Gtk::Unit) : Float64 #

[View source]
def is_custom : Bool #

[View source]
def is_equal(size2 : Gtk::PaperSize) : Bool #

[View source]
def is_ipp : Bool #

[View source]
def name : String #

[View source]
def ppd_name : String #

[View source]
def set_size(width : Float64, height : Float64, unit : Gtk::Unit) : Nil #

[View source]
def to_gvariant : GLib::Variant #

[View source]
def to_key_file(key_file : GLib::KeyFile, group_name : String) : Nil #

[View source]
def to_unsafe : Pointer(Void) #

[View source]
def width(unit : Gtk::Unit) : Float64 #

[View source]