Glib-Object-Introspection

 view release on metacpan or  search on metacpan

bin/perli11ndoc  view on Meta::CPAN

1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
    my ($result_view, $event) = @_;
    return $handle_button->($event, sub {
      $self->go_to_path ($_[0]->{__target});
    });
  });
 
  $self->{result_buffer} = $result_buffer;
  $self->{result_view} = $result_view;
}
 
sub update_gir_view {
  my ($self) = @_;
 
  $self->{suppress_gir_view_selection_changes} = TRUE;
 
  $self->{gir_model}->clear;
  $self->{search_entry}->set_text ('');
  $self->{path_bar}->clear;
 
  my $inserter = sub {
    my ($iter, $text, $path, $is_cat, $is_vis) = @_;

bin/perli11ndoc  view on Meta::CPAN

1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
    $self->go_to_path ($path);
  }
}
 
sub go_to_path {
  my ($self, $path) = @_;
  my $name = $self->{parser}->format_node_name_by_path ($path);
  $self->{path_bar}->append ($name, $path); # indirectly calls update_results
}
 
sub update_results {
  my ($self, $path) = @_;
  $self->display_results ($self->{parser}->format_node_by_path ($path));
 
  # Show and select the correponding tree entry.
  $self->{gir_model}->foreach (sub {
    my ($model, $tree_path, $iter) = @_;
    my $this_path = $model->get ($iter, GIR_VIEW_COL_PATH);
    if (defined $this_path && $this_path eq $path) {
      $self->{gir_view}->expand_to_path ($tree_path);
      $self->{gir_view}->scroll_to_cell ($tree_path, undef, FALSE, 0.0, 0.0);

bin/perli11ndoc  view on Meta::CPAN

1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
sub append {
  my ($self, $name, $path) = @_;
  $self->{path_label}->append ($name, $path);
}
 
sub set_update_func {
  my ($self, $func) = @_;
  $self->{update_func} = $func;
}
 
sub update_buttons {
  my ($self) = @_;
  $self->{back_button}->set_sensitive ($self->{path_label}->can_go_back);
  $self->{forward_button}->set_sensitive ($self->{path_label}->can_go_forward);
}
 
package PathLabel;
 
# The BEGIN { eval } dance is to support not loading Gtk3 in text mode.
BEGIN { eval {use Glib::Object::Subclass qw/Gtk3::Label/;} }

bin/perli11ndoc  view on Meta::CPAN

1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
  return unless $self->{current_child} < $#{$self->{children}};
  $self->{current_child}++;
  $self->update;
}
 
sub set_update_func {
  my ($self, $func) = @_;
  $self->{update_func} = $func;
}
 
sub update {
  my ($self) = @_;
  $self->set_markup ($self->_format_children);
  if (defined $self->{current_child} && defined $self->{update_func}) {
    my $child = $self->{children}->[$self->{current_child}];
    $self->{update_func}->($child->{name}, $child->{path});
  }
}
 
sub GET_PREFERRED_WIDTH {
  #say 'GET_PREFERRED_WIDTH';



( run in 0.234 second using v1.01-cache-2.11-cpan-87723dcf8b7 )