Gtk2::PageSetup(3)

πŸ“¦
version 1.24993 Β· 2 versions
, in fedora 43

✨ 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::Error in $@ 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::Error in $@ 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::Error in $@ 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::Error in $@ 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::Error in $@ 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

  • Gtk2
  • Glib::Object

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