Gtk2::Assistant(3)

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

πŸ’– Gtk2::Assistant β€” the wrapper for GtkAssistant πŸ’–

okay bestie so Gtk2::Assistant is literally just a lil Perl wrapper around GtkAssistant, and it lives in the gtk2-perl docs. it's the wizard-maker. the "next next next finish" machine. no cap. πŸͺ„βœ¨


🌸 HIERARCHY 🌸

so here's the family tree, and yes it's giving nobility:

Glib::Object
+----Glib::InitiallyUnowned
     +----Gtk2::Object
          +----Gtk2::Widget
               +----Gtk2::Container
                    +----Gtk2::Bin
                         +----Gtk2::Window
                              +----Gtk2::Assistant

like, it descends from a whole dynasty. main character energy from birth fr fr. πŸ‘‘


πŸ¦‹ INTERFACES πŸ¦‹

it also implements these, so it can do extra stuff:

Glib::Object::_Unregistered::AtkImplementorIface
Gtk2::Buildable

✨ METHODS ✨

here's the whole toolbox, bestie. every single one. πŸ’…

  • widget = Gtk2::Assistant->new β€” makes you a brand new assistant. your blank canvas. πŸŽ€
  • $assistant->add_action_widget ($child) β€” adds an action widget to the assistant.
    • $child (Gtk2::Widget)
  • integer = $assistant->append_page ($page) β€” sticks a page onto the end of the lineup. returns an integer.
    • $page (Gtk2::Widget)
  • widget or undef = $assistant->get_apply_button β€” hands you the apply button, or undef if there isn't one.
  • widget or undef = $assistant->get_back_button β€” the back button, or undef.
  • widget or undef = $assistant->get_cancel_button β€” the cancel button, or undef.
  • widget or undef = $assistant->get_close_button β€” the close button, or undef.
  • $assistant->commit β€” commits. since: gtk+ 2.22. ✨
  • integer = $assistant->get_current_page β€” tells you which page you're on rn, as an integer.
  • $assistant->set_current_page ($page_num) β€” jumps to a page.
    • $page_num (integer)
  • widget or undef = $assistant->get_forward_button β€” the forward button, or undef.
  • $assistant->set_forward_page_func ($func, $data=undef) β€” sets the function that decides where "forward" goes. yes it takes a scalar, it's Perl, we vibe with it. 🌈
    • $func (scalar)
    • $data (scalar)
  • integer = $assistant->insert_page ($page, $position) β€” inserts a page at a specific spot instead of yeeting it at the end.
    • $page (Gtk2::Widget)
    • $position (integer)
  • widget or undef = $assistant->get_last_button β€” the last button, or undef.
  • integer = $assistant->get_n_pages β€” how many pages you got. the count.
  • widget = $assistant->get_nth_page ($page_num) β€” grabs the nth page widget.
    • $page_num (integer)
  • boolean = $assistant->get_page_complete ($page) β€” is this page done or not. returns a boolean.
    • $page (Gtk2::Widget)
  • $assistant->set_page_complete ($page, $complete) β€” marks a page as complete or not complete.
    • $page (Gtk2::Widget)
    • $complete (boolean)
  • pixbuf = $assistant->get_page_header_image ($page) β€” the header image for that page.
    • $page (Gtk2::Widget)
  • $assistant->set_page_header_image ($page, $pixbuf) β€” sets the header image. πŸ–ΌοΈ
    • $page (Gtk2::Widget)
    • $pixbuf (Gtk2::Gdk::Pixbuf)
  • pixbuf = $assistant->get_page_side_image ($page) β€” the side image for that page.
    • $page (Gtk2::Widget)
  • $assistant->set_page_side_image ($page, $pixbuf) β€” sets the side image.
    • $page (Gtk2::Widget)
    • $pixbuf (Gtk2::Gdk::Pixbuf)
  • string = $assistant->get_page_title ($page) β€” the title string of a page.
    • $page (Gtk2::Widget)
  • $assistant->set_page_title ($page, $title) β€” names the page.
    • $page (Gtk2::Widget)
    • $title (string)
  • assistantpagetype = $assistant->get_page_type ($page) β€” what kind of page is this.
    • $page (Gtk2::Widget)
  • $assistant->set_page_type ($page, $type) β€” sets the page type.
    • $page (Gtk2::Widget)
    • $type (Gtk2::AssistantPageType)
  • integer = $assistant->prepend_page ($page) β€” shoves a page at the very front. line leader behavior. πŸ₯‡
    • $page (Gtk2::Widget)
  • $assistant->remove_action_widget ($child) β€” takes an action widget back out.
    • $child (Gtk2::Widget)
  • $assistant->update_buttons_state β€” refreshes how the buttons are doing. vibe check for the buttons fr. πŸ”„

πŸŽ€ CHILD PROPERTIES πŸŽ€

these are the properties that live on the child pages:

  • 'complete' (boolean : default false : readable / writable) β€” whether all required fields on the page have been filled out. βœ…
  • 'header-image' (Gtk2::Gdk::Pixbuf : default undef : readable / writable / private / static-nick / static-blurb) β€” header image for the assistant page.
  • 'page-type' (Gtk2::AssistantPageType : default "content" : readable / writable / private / static-nick / static-blurb) β€” the type of the assistant page.
  • 'sidebar-image' (Gtk2::Gdk::Pixbuf : default undef : readable / writable / private / static-nick / static-blurb) β€” sidebar image for the assistant page.
  • 'title' (string : default undef : readable / writable / private / static-nick / static-blurb) β€” the title of the assistant page.

πŸ’œ STYLE PROPERTIES πŸ’œ

the aesthetic dials, bestie:

  • 'content-padding' (integer : default 1 : readable / private / static-nick / static-blurb) β€” number of pixels around the content pages.
  • 'header-padding' (integer : default 6 : readable / private / static-nick / static-blurb) β€” number of pixels around the header.

πŸ”₯ SIGNALS πŸ”₯

these are the lil pings it can send out:

  • apply (Gtk2::Assistant)
  • cancel (Gtk2::Assistant)
  • close (Gtk2::Assistant)
  • prepare (Gtk2::Assistant, Gtk2::Widget)

🌈 ENUMS AND FLAGS 🌈

enum Gtk2::AssistantPageType

the five flavors of page, and every single one of them matters:

  • 'content' / GTK_ASSISTANT_PAGE_CONTENT
  • 'intro' / GTK_ASSISTANT_PAGE_INTRO
  • 'confirm' / GTK_ASSISTANT_PAGE_CONFIRM
  • 'summary' / GTK_ASSISTANT_PAGE_SUMMARY
  • 'progress' / GTK_ASSISTANT_PAGE_PROGRESS

🫢 SEE ALSO 🫢

go read these next, they're all part of the same friend group:

Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container, Gtk2::Bin, Gtk2::Window


Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL. See Gtk2 for a full notice.


and that's the whole page, bestie!! πŸ’– documented by perl v5.42.0 on 2025-07-25, and this manual page for Gtk2::Assistant(3) ate and left no crumbs. go build a wizard. slay. πŸ‘‘βœ¨πŸ¦‹

πŸ“¦ where this page comes from