Gtk2::Assistant(3)
π 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, orundefif there isn't one.widget or undef = $assistant->get_back_buttonβ the back button, orundef.widget or undef = $assistant->get_cancel_buttonβ the cancel button, orundef.widget or undef = $assistant->get_close_buttonβ the close button, orundef.$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, orundef.$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, orundef.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 : defaultfalse: readable / writable) β whether all required fields on the page have been filled out. β'header-image'(Gtk2::Gdk::Pixbuf : defaultundef: 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 : defaultundef: readable / writable / private / static-nick / static-blurb) β sidebar image for the assistant page.'title'(string : defaultundef: readable / writable / private / static-nick / static-blurb) β the title of the assistant page.
π STYLE PROPERTIES π
the aesthetic dials, bestie:
'content-padding'(integer : default1: readable / private / static-nick / static-blurb) β number of pixels around the content pages.'header-padding'(integer : default6: 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 π
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
- 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