GTK(3)
π NAME π
Data::TreeDumper::Renderer::GTK β a Gtk3::TreeView renderer for Data::TreeDumper π
okay so this is the GTK(3) page, and bestie, it's giving "your perl data structure but make it β¨visualβ¨". Let's get into it π¦
πΈ SYNOPSIS πΈ
my $treedumper = Data::TreeDumper::Renderer::GTK->new
(
data => \%data,
title => 'Test Data',
dumper_setup => {DISPLAY_PERL_SIZE => 1}
);
$treedumper->modify_font(Gtk3::Pango::FontDescription->from_string ('monospace'));
$treedumper->expand_all;
# some boilerplate to get the widget onto the screen...
my $window = Gtk3::Window->new;
my $scroller = Gtk3::ScrolledWindow->new;
$scroller->add ($treedumper);
$window->add ($scroller);
$window->show_all;
β¨ DESCRIPTION β¨
So, Data::TreeDumper has a GTK-perl renderer now, and that's literally what this is. π
This widget is the gui equivalent of Data::TreeDumper. It will display a perl data structure in a TreeView, which means you can fold and unfold child data structures like a little gremlin exploring a treasure chest, and get a quick feel for what's where. π«Ά
And right-clicking anywhere in the view brings up a context menu, from which the user can choose to expand or collapse all items. Iconic behavior, no notes. π
π§ EXAMPLE π§
gtk_test.pl β go look at it, it's right there π
π METHODS π
π widget = Data::TreeDumper::Renderer::GTK::TreeDumper->new (...)
Create a new TreeDumper. The optional arguments are expect to be key/val pairs. π
dumper_setup=> hash reference β All data is passed toData::TreeDumper. All of it. Every crumb. πͺdata=> scalar β Equivalent to calling"$treedumper->set_data ($scalar)". π«title=> string or undef β Equivalent to calling"$treedumper->set_title ($string)". π
π $treedumper->set_data ($newdata)
$newdata(scalar) π¦
Fill the tree with $newdata, which may be any scalar. And listen: the tree does not reference $newdata β necessary data is copied. So don't be out here thinking you're passing a live reference, bestie. π
π $treedumper->set_title ($title=undef)
$title(string or undef) a new title π·οΈ
Set the string displayed as the column title. The view is created with one column, and the header is visible only if there is a title set. No title, no header. That's the vibe check. β
π EXPORT π
None
Like... nothing. Zero. Nada. It's not giving exports today. π
π«Ά AUTHORS π«Ά
Khemir Nadim ibn Hamouda. <nadim@khemir.net> Muppet <scott at asofyet dot org>
Copyright (c) 2005 Nadim Ibn Hamouda el Khemir and
Muppet. All rights reserved.
This program is free software; you can redistribute
it and/or modify it under the same terms as Perlitself.
If you find any value in this module, mail me! All hints, tips, flames and wishes are welcome at <nadim@khemir.net>. π
fr fr they said flames are welcome. go off, respectfully. π₯
π SEE ALSO π
Data::TreeDumperfor advanced usage of the dumper engine. iykyk π
okay that's the whole page bestie, you ate that reading, periodt π β¨ This little drop of knowledge came to you from perl v5.42.0, dated 2025-07-25, straight off the GTK(3) page. mwah ππ¦π
π¦ where this page comes from
- fedora 43: perl-Data-TreeDumper-Renderer-GTK 0.03-6.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms