App-Chart
view release on metacpan or search on metacpan
lib/App/Chart/Gtk2/Diagnostics.pm view on Meta::CPAN
my $value_width = max (map {length} values %mung);
return join ('', map { sprintf (" %-*s %*s\n",
$field_width, $_,
$value_width, $mung{$_})
} sort keys %mung);
}
1;
__END__
=head1 NAME
App::Chart::Gtk2::Diagnostics -- diagnostics dialog module
=head1 SYNOPSIS
use App::Chart::Gtk2::Diagnostics;
App::Chart::Gtk2::Diagnostics->popup();
=head1 WIDGET HIERARCHY
C<App::Chart::Gtk2::Diagnostics> is a subclass of C<Gtk2::Dialog>.
Gtk2::Widget
Gtk2::Container
Gtk2::Bin
Gtk2::Window
Gtk2::Dialog
App::Chart::Gtk2::Diagnostics
=head1 DESCRIPTION
A C<App::Chart::Gtk2::Diagnostics> dialog shows various bits of diagnostic
information like memory use, database size, etc.
=head1 FUNCTIONS
=over 4
=item C<< App::Chart::Gtk2::Diagnostics->popup() >>
Present a C<Diagnostics> dialog to the user. C<popup()> creates and then
re-uses a single dialog, re-presenting it (C<< $widget->present() >>) and
refreshing its contents each time. A single diagnostics dialog like this
will be enough for most uses.
=item C<< $dialog = App::Chart::Gtk2::Diagnostics->new() >>
Create and return a new Diagnostics dialog widget. Initially it's empty and
C<refresh()> must be called to put some diagnostic information in it.
=item C<< $diagnostics->refresh() >>
Refresh the information displayed in C<$diagnostics>. The "Refresh" button
in the dialog calls this.
=item C<< $str = App::Chart::Gtk2::Diagnostics->str() >>
Return the diagnostics in string form, as would be shown in a dialog. This
just makes a string, no dialog is opened, created or updated.
=back
=head1 SEE ALSO
L<App::Chart>, L<Gtk2::Dialog>
=head1 HOME PAGE
L<http://user42.tuxfamily.org/chart/index.html>
=head1 LICENCE
Copyright 2007, 2008, 2009, 2010, 2011, 2016 Kevin Ryde
Chart is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 3, or (at your option) any later version.
Chart is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
Chart; see the file F<COPYING>. Failing that, see
L<http://www.gnu.org/licenses/>.
=cut
# Local variables:
# compile-command: "perl -MApp::Chart::Gtk2::Diagnostics -e 'print App::Chart::Gtk2::Diagnostics->str'"
# End:
( run in 1.947 second using v1.01-cache-2.11-cpan-483215c6ad5 )