App-Devel-MAT-Explorer-GTK
view release on metacpan or search on metacpan
bin/pmat-explore-gtk view on Meta::CPAN
use Devel::MAT;
use List::Util qw( pairs );
use List::UtilsBy qw( sort_by );
use App::Devel::MAT::Explorer::GTK::Resources qw( get_icon );
use App::Devel::MAT::Explorer::GTK::Shell;
use App::Devel::MAT::Explorer::GTK::SVDetail;
use App::Devel::MAT::Explorer::GTK::Utils qw( bytes2size );
use App::Devel::MAT::Explorer::GTK::Widgets qw( framed vscrollable );
my $pmat;
my $df;
my $win = Gtk2::Window->new( "toplevel" );
$win->signal_connect( destroy => sub { Gtk2->main_quit } );
$win->resize( 1000, 600 );
my $winbox = Gtk2::VBox->new( 0, 0 );
$win->add( $winbox );
bin/pmat-explore-gtk view on Meta::CPAN
progress();
});
}
$winbox->add( my $vpane = Gtk2::VPaned->new );
$vpane->pack1( my $hpane = Gtk2::HPaned->new, TRUE, TRUE );
my $statusbar = Gtk2::Statusbar->new;
$winbox->pack_end( $statusbar, FALSE, TRUE, 0 );
$statusbar->pack_start( framed( my $perlver_label = Gtk2::Label->new( "" ) ), FALSE, FALSE, 0 );
$statusbar->pack_start( framed( my $svcount_label = Gtk2::Label->new( "" ) ), FALSE, FALSE, 0 );
$statusbar->pack_start( framed( my $bytetotal_label = Gtk2::Label->new( "" ) ), FALSE, FALSE, 0 );
$win->show_all;
{
my $id = $statusbar->get_context_id( "progress" );
sub progress
{
$statusbar->pop( $id );
$statusbar->push( $id, "Progress: $_[0]" ) if defined $_[0];
lib/App/Devel/MAT/Explorer/GTK/Widgets.pm view on Meta::CPAN
our $VERSION = '0.06';
use Glib qw( TRUE FALSE );
use Gtk2;
use List::Util qw( pairs );
use Exporter 'import';
our @EXPORT_OK = qw(
framed
label
textarea
vscrollable
);
our %EXPORT_TAGS = (
all => [ @EXPORT_OK ],
);
sub framed
{
my ( $widget ) = @_;
my $frame = Gtk2::Frame->new;
$frame->set_shadow_type( "in" );
$frame->add( $widget );
return $frame;
}
sub label
{
my ( $text ) = @_;
my $l = Gtk2::Label->new( $text );
$l->set_alignment( 0, 0 );
return $l;
}
( run in 1.125 second using v1.01-cache-2.11-cpan-e1769b4cff6 )