Alien-GvaScript
view release on metacpan or search on metacpan
lib/Alien/GvaScript/TreeNavigator.pod view on Meta::CPAN
}
In addition, if you want another icon for illustrating
the node's content (like for example an open or closed
folder), you can proceed as follows:
=over
=item *
add an empty C<span> element within the
labels that should have the icon
<span class="TN_label"><span class="specialNode"></span>some label</span>
=item *
define CSS background images for selectors
C<.specialNode> and C<.TN_closed .specialNode>,
as in the example above
=back
=head1 Usage : navigation
Navigation in the tree is either with the mouse or with
the keyboard. At any point in time, at most one node is
I<selected> : this is the one that receives keyboard
events. Hence if the tree has no
selected node, no keyboard events are interpreted.
=head2 Mouse events
Mousing over a node label adds the class
C<TN_mouse> to that node; the default style for
that class is just to underline the label.
Clicking on a node label selects that node and
fires the C<Ping> event.
Clicking on the square +/- icon on the left of the
label toggles the open/closed status of the node.
=head2 Keyboard events
=over
=item C<keypad +>
open the node
=item C<keypad ->
close the node
=item C<keypad *>
open the node and all its subnodes
=item C<keypad />
close the node and all its subnodes
=item C<Ctrl-keypad *>
activate "show all" mode (the content of closed nodes is nevertheless
visible, which may be useful for printing)
=item C<Ctrl-keypad />
deactivate the "show all" mode
=item C<TAB>
if closed, open the node; if already opened, pass focus to the next
item (maybe the next node, or another tabindex-enabled HTML element,
such as a form control).
=item C<ARROW_UP>
move to previous displayed node
=item C<ARROW_DOWN>
move to next displayed node
=item C<ARROW_LEFT>
if open, close the node; if already closed, move to parent node
=item C<ARROW_RIGHT>
if closed, open the node; if already open, move to next subnode
=item C<HOME>
select the first node of the tree
=item C<END>
select the last visible subnode of the tree
=item C<Ctrl-PAGE_UP>
select the enclosing node (useful if not positioned on a node, but
within a long node content)
=item C<Ctrl-PAGE_DOWN>
select the displayed node after
the current enclosing node (useful if not positioned on a node, but
within a long node content)
=item C<Ctrl-R>
refresh the node's content (if that node has an URL for dynamic
content).
=item C<RETURN>
fire the C<Ping> event
=item C<Ctrl-1>..C<Ctrl-9>
close all nodes at level of the specified digit, and open all nodes
above
=item C<char(s)>
( run in 1.360 second using v1.01-cache-2.11-cpan-df04353d9ac )