Gtk2::PageSetup(3)
β¨ NAME β¨
okay so bestie, welcome to Gtk2::PageSetup(3) β this is the page from the User Contributed Perl Documentation, and it's literally just a wrapper for GtkPageSetup. that's it. that's the whole vibe. π
Gtk2::PageSetup β wrapper for GtkPageSetup
πΈ HIERARCHY πΈ
the family tree, and yes it's giving noble bloodline π
Glib::Object
+----Gtk2::PageSetup
π METHODS π
every single one, no skips, we don't gatekeep here π
pagesetup = Gtk2::PageSetup->newβ makes you a brand new page setup object, fresh out the box π«Άpagesetup = Gtk2::PageSetup->new_from_file ($file_name)β same energy, but it reads a file to build itself$file_name(localized file name)- May croak with a
Glib::Errorin$@on failure. π - Since: gtk+ 2.12
pagesetup = Gtk2::PageSetup->new_from_key_file ($key_file, $group_name)β build it from a key file instead, picky picky$key_file(Glib::KeyFile)$group_name(string or undef)- May croak with a
Glib::Errorin$@on failure. π - Since: gtk+ 2.12
double = $setup->get_bottom_margin ($unit)β hands you the bottom margin back as a double$unit(Gtk2::Unit)
$setup->set_bottom_margin ($margin, $unit)β set the bottom margin, your call$margin(double)$unit(Gtk2::Unit)
double = $setup->get_left_margin ($unit)β left margin, please and thank you$unit(Gtk2::Unit)
$setup->set_left_margin ($margin, $unit)β okay now set the left margin$margin(double)$unit(Gtk2::Unit)
$setup->load_file ($file_name)β load it all in from a file, main character move$file_name(string)- May croak with a
Glib::Errorin$@on failure. π - Since: gtk+ 2.14
$setup->load_key_file ($key_file, $group_name)β load from a key file, fancy$key_file(Glib::KeyFile)$group_name(string or undef)- May croak with a
Glib::Errorin$@on failure. π - Since: gtk+ 2.14
pageorientation = $setup->get_orientation/$setup->set_orientation ($orientation)β read the orientation, or set it, pick your fighter$orientation(Gtk2::PageOrientation)
double = $setup->get_page_height ($unit)β how tall is the page, in whatever unit you asked for$unit(Gtk2::Unit)
double = $setup->get_page_width ($unit)β how wide, same deal$unit(Gtk2::Unit)
double = $setup->get_paper_height ($unit)β paper height, yes it's different from page height, don't come for me$unit(Gtk2::Unit)
$setup->set_paper_size_and_default_margins ($size)β sets the paper size and the default margins in one go, efficiency queen π$size(Gtk2::PaperSize)
papersize = $setup->get_paper_size/$setup->set_paper_size ($size)β grab the paper size object, or swap it out$size(Gtk2::PaperSize)
double = $setup->get_paper_width ($unit)β paper width, back at it again$unit(Gtk2::Unit)
double = $setup->get_right_margin ($unit)β right margin reveal β¨$unit(Gtk2::Unit)
$setup->set_right_margin ($margin, $unit)β and now you set it$margin(double)$unit(Gtk2::Unit)
$setup->to_file ($file_name)β write all this setup out to a file, slay$file_name(localized file name)- May croak with a
Glib::Errorin$@on failure. π - Since: gtk+ 2.12
$setup->to_key_file ($key_file, $group_name)β dump it into a key file instead$key_file(Glib::KeyFile)$group_name(string or undef)- Since: gtk+ 2.12
double = $setup->get_top_margin ($unit)β top margin, we saved the best for last (not really, but ok)$unit(Gtk2::Unit)
$setup->set_top_margin ($margin, $unit)β set the top margin, and that's the whole method list bestie$margin(double)$unit(Gtk2::Unit)
π ENUMS AND FLAGS π
enum Gtk2::PageOrientation
the four orientations, all valid, all iconic π¦
'portrait'/'GTK_PAGE_ORIENTATION_PORTRAIT''landscape'/'GTK_PAGE_ORIENTATION_LANDSCAPE''reverse-portrait'/'GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT''reverse-landscape'/'GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE'
enum Gtk2::Unit
your four unit options, choose wisely π§
'pixel'/'GTK_UNIT_PIXEL''points'/'GTK_UNIT_POINTS''inch'/'GTK_UNIT_INCH''mm'/'GTK_UNIT_MM'
π SEE ALSO π
go read these next, iykyk
Gtk2Glib::Object
π COPYRIGHT π
Copyright (C) 2003-2011 by the gtk2-perl team.
This software is licensed under the LGPL. See Gtk2 for a full notice.
lowkey important: LGPL, bestie, read the full notice in Gtk2. don't skip the fine print π
and that's a wrap, fr fr π«Ά this page came to you courtesy of perl v5.42.0, dated 2025-07-25 β go forth and set some margins, periodt. π
β¨
π¦ where this page comes from
- fedora 43: perl-Gtk2 1.24993-23.fc43 Β· LicenseRef-Callaway-LGPLv2+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms