… | |
… | |
1974 | my @path = DC::Pod::full_path_of $node; |
1974 | my @path = DC::Pod::full_path_of $node; |
1975 | pop @path; # drop current node |
1975 | pop @path; # drop current node |
1976 | |
1976 | |
1977 | for my $node (@path) { |
1977 | for my $node (@path) { |
1978 | $buttons->add (new DC::UI::Button |
1978 | $buttons->add (new DC::UI::Button |
1979 | text => $node->{kw}[0], |
1979 | text => $node->[DC::Pod::N_KW][0], |
1980 | tooltip => "go to <i>" . (DC::asxml DC::Pod::full_path $node) . "</i>", |
1980 | tooltip => "go to <i>" . (DC::asxml DC::Pod::full_path $node) . "</i>", |
1981 | on_activate => sub { |
1981 | on_activate => sub { |
1982 | push @history, [$curnode, $viewer->current_paragraph] if $curnode; @future = (); |
1982 | push @history, [$curnode, $viewer->current_paragraph] if $curnode; @future = (); |
1983 | $load_node->($node); |
1983 | $load_node->($node); |
1984 | }, |
1984 | }, |
1985 | ); |
1985 | ); |
1986 | $buttons->add (new DC::UI::Label text => "/"); |
1986 | $buttons->add (new DC::UI::Label text => "/"); |
1987 | } |
1987 | } |
1988 | |
1988 | |
1989 | $buttons->add (new DC::UI::Label text => $node->{kw}[0], padding_x => 4, padding_y => 4); |
1989 | $buttons->add (new DC::UI::Label text => $node->[DC::Pod::N_KW][0], padding_x => 4, padding_y => 4); |
1990 | |
1990 | |
1991 | $curnode = $node; |
1991 | $curnode = $node; |
1992 | |
1992 | |
1993 | $viewer->clear; |
1993 | $viewer->clear; |
1994 | $viewer->add_paragraph (DC::Pod::as_paragraphs DC::Pod::section_of $curnode); |
1994 | $viewer->add_paragraph (DC::Pod::as_paragraphs DC::Pod::section_of $curnode); |