1GTK(3)                User Contributed Perl Documentation               GTK(3)
2
3
4

NAME

6       Data::TreeDumper::Renderer::GTK - Gtk2::TreeView renderer for
7       Data::TreeDumper
8

SYNOPSIS

10         my $treedumper = Data::TreeDumper::Renderer::GTK->new
11                               (
12                               data => \%data,
13                               title => 'Test Data',
14                               dumper_setup => {DISPLAY_PERL_SIZE => 1}
15                               );
16
17         $treedumper->modify_font(Gtk2::Pango::FontDescription->from_string ('monospace'));
18         $treedumper->expand_all;
19
20         # some boilerplate to get the widget onto the screen...
21         my $window = Gtk2::Window->new;
22
23         my $scroller = Gtk2::ScrolledWindow->new;
24         $scroller->add ($treedumper);
25
26         $window->add ($scroller);
27         $window->show_all;
28

HIERARCHY

30         Glib::Object
31         +----Gtk2::Object
32               +----Gtk2::Widget
33                     +----Gtk2::Container
34                           +----Gtk2::TreeView
35                                 +----Data::TreeDumper::Renderer::GTK
36

DESCRIPTION

38       GTK-perl renderer for Data::TreeDumper.
39
40       This widget is the gui equivalent of Data::TreeDumper; it will display
41       a perl data structure in a TreeView, allowing you to fold and unfold
42       child data structures and get a quick feel for what's where.  Right-
43       clicking anywhere in the view brings up a context menu, from which the
44       user can choose to expand or collapse all items.
45

EXAMPLE

47       gtk_test.pl
48

METHODS

50       widget = Data::TreeDumper::Renderer::GTK::TreeDumper->new (...)
51           Create a new TreeDumper.  The optional arguments are expect to be
52           key/val pairs.
53
54           - dumper_setup => hash reference
55               All data is passed to Data::TreeDumper
56
57           - data => scalar
58               Equivalent to calling "$treedumper->set_data ($scalar)".
59
60           - title => string or undef
61               Equivalent to calling "$treedumper->set_title ($string)".
62
63       $treedumper->set_data ($newdata)
64           ·   $newdata (scalar)
65
66           Fill the tree with $newdata, which may be any scalar.  The tree
67           does not reference $newdata -- necessary data is copied.
68
69       $treedumper->set_title ($title=undef)
70           ·   $title (string or undef) a new title
71
72           Set the string displayed as the column title.  The view is created
73           with one column, and the header is visible only if there is a title
74           set.
75

EXPORT

77       None
78

AUTHORS

80       Khemir Nadim ibn Hamouda. <nadim@khemir.net> Muppet <scott at asofyet
81       dot org>
82
83         Copyright (c) 2005 Nadim Ibn Hamouda el Khemir and
84         Muppet. All rights reserved.
85
86         This program is free software; you can redistribute
87         it and/or modify it under the same terms as Perlitself.
88
89       If you find any value in this module, mail me!  All hints, tips, flames
90       and wishes are welcome at <nadim@khemir.net>.
91

SEE ALSO

93       Data::TreeDumper for advanced usage of the dumper engine.
94
95
96
97perl v5.12.0                      2008-08-30                            GTK(3)
Impressum