Glib-Object-Introspection
view release on metacpan or search on metacpan
bin/perli11ndoc view on Meta::CPAN
154515461547154815491550155115521553155415551556155715581559156015611562156315641565
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
161616171618161916201621162216231624162516261627162816291630163116321633163416351636
$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
17081709171017111712171317141715171617171718171917201721172217231724172517261727sub
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.
bin/perli11ndoc view on Meta::CPAN
179317941795179617971798179918001801180218031804180518061807180818091810181118121813
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 )