App-Devel-MAT-Explorer-GTK

 view release on metacpan or  search on metacpan

bin/pmat-explore-gtk  view on Meta::CPAN


            my $addr = do {
               no warnings 'portable';
               hex $data->[2];
            };
            my $sv = $df->sv_at( $addr );
            history_nav( $sv );
         });
         return vscrollable( $outrefs );
      },
      expand => TRUE,
   );

   Devel::MAT::UI->provides_sv_detail(
      order => 1E6 + 1,
      type => "widget",
      title => "Inrefs",
      render => sub {
         my ( $sv ) = @_;
         my $inrefs = Gtk2::SimpleList->new(
            " "    => "pixbuf",

bin/pmat-explore-gtk  view on Meta::CPAN

         $inrefs->signal_connect( row_activated => sub {
            my( $self, $path, $column ) = @_;
            my $data = $self->get_row_data_from_path( $path );

            my $addr = hex $data->[2];
            my $sv = $df->sv_at( $addr );
            history_nav( $sv ) if $sv;
         });
         return vscrollable( $inrefs );
      },
      expand => TRUE,
   );
}

### History management
{
   my @back_sv;
   my @forward_sv;
   my $current_sv;

   $backbtn->set_sensitive( FALSE );

lib/App/Devel/MAT/Explorer/GTK/SVDetail.pm  view on Meta::CPAN


use Devel::MAT 0.23; # ->ifileno, ->ofileno on IO SVs

use App::Devel::MAT::Explorer::GTK::Resources qw( get_icon );
use App::Devel::MAT::Explorer::GTK::Widgets qw( label textarea );
use App::Devel::MAT::Explorer::GTK::Utils qw( bytes2size );

use Struct::Dumb qw( -named_constructors );
use List::UtilsBy qw( nsort_by );

struct SVDetail => [qw( order type title render expand )];

my @MORE_DETAILS;

sub table_add
{
   my ( $table, $label, $widget, $yoptions, $right ) = @_;

   my $xoptions = [ "expand", "fill" ];
   $yoptions  //= [ "fill" ];
   $right     //= 3;

   my ( $next_row ) = $table->get_size;

   $table->attach( label( $label ), 0, 1,      $next_row, $next_row + 1, $xoptions, $yoptions, 0, 3 );
   $table->attach( $widget,         1, $right, $next_row, $next_row + 1, $xoptions, $yoptions, 0, 3 );
}

sub display_sv_in_table

lib/App/Devel/MAT/Explorer/GTK/SVDetail.pm  view on Meta::CPAN

      defined $data or next;

      my $widget;
      given( $extra->type ) {
         when( "widget" ) { $widget = $data }
         when( "text" )   { $widget = textarea( $data ) }
         when( "icon" )   { $widget = Gtk2::Image->new_from_pixbuf( get_icon( $data ) ) }
         default          { die "Unable to handle SV detail type " . $extra->type }
      }

      table_add( $table, $extra->title => $widget, $extra->expand ? [ "expand", "fill" ] : undef )
   }
}

my $next_sv_detail_order = 0;
sub Devel::MAT::UI::provides_sv_detail
{
   shift;
   my %args = @_;

   push @MORE_DETAILS, SVDetail(
      order  => $args{order} // $next_sv_detail_order++,
      type   => $args{type},
      title  => $args{title},
      render => $args{render},
      expand => $args{expand},
   );
}

0x55AA;

lib/App/Devel/MAT/Explorer/GTK/Widgets.pm  view on Meta::CPAN

sub Devel::MAT::UI::make_table
{
   shift;

   my $table = Gtk2::Table->new( 1, 2 );

   foreach ( pairs @_ ) {
      my ( $label, $widget ) = @$_;
      my ( $next_row ) = $table->get_size;

      $table->attach( label( $label ), 0, 1, $next_row, $next_row + 1, [ "expand", "fill" ], [ "fill" ], 0, 3 );
      $table->attach( $widget,         1, 2, $next_row, $next_row + 1, [ "expand", "fill" ], [ "fill" ], 0, 3 );
   }

   return $table;
}

sub Devel::MAT::UI::make_widget_text
{
   shift;
   my ( $text ) = @_;
   return textarea( $text );



( run in 1.596 second using v1.01-cache-2.11-cpan-5b529ec07f3 )