Class Tree

Summary

#
  This class represents a tree object.  An {Event} of code 0 is generated when a click down
  occurs on a {Node};  of code 1 when the a click up occurs and of code 2 when a node is
  expanded/contracted by a click on the small +/- icons.

Superclasses:
ScrollArea

Package:
(main)
File:
_tree.icn
Methods:
compute_bmp_wh, draw, expand, flatten, flatten2, get_line_height, get_max_width, handle_press, set_default_bmps, set_root_node

Methods inherited from Component:
accepts_tab_focus, attrib, clear_accepts_tab_focus, clear_draw_border, clear_is_shaded, clear_no_updates, do_shading, error, final_setup, firstly, generate_all_components, generate_components, get_cbwin_reference, get_cwin_reference, get_h_reference, get_parent_Dialog, get_parent_buffer_win, get_parent_win, get_visible_reference, get_w_reference, get_x_reference, get_y_reference, got_focus, in_region, is_hidden, is_shaded, is_unhidden, is_unshaded, lost_focus, parse_pos, redisplay, set_abs_coords, set_abs_size, set_accepts_tab_focus, set_align, set_attribs, set_attribs_list, set_draw_border, set_is_shaded, set_no_updates, set_parent_Dialog, set_pos, set_size, set_tooltip, toggle_draw_border, toggle_is_shaded, unique_end, unique_start

Methods inherited from MetaComponent:
set_fields

Methods inherited from ScrollArea:
actual_line, clear_selections, compute_and_redisplay, display, end_state, finally, get_checked, get_contents, get_last_line, get_left_pos, get_line, get_page_size, get_prev_down, get_selections, get_which_down, goto_pos, handle_drag, handle_event, handle_key_down, handle_key_end, handle_key_home, handle_key_left, handle_key_page_down, handle_key_page_up, handle_key_right, handle_key_up, handle_notify, handle_release, handle_tab_texts, object_get_prev_down, object_get_selections, object_get_which_down, object_set_selections, refresh, resize, set_checked, set_contents, set_internal_fields, set_select_many, set_select_one, set_selections, text_area_to_buffer, tick

Methods inherited from Ticker:
is_ticking, retime_ticker, set_ticker, stop_ticker

Fields:
bmp_h, bmp_w, col_w, default_bmps, little_h, little_w, minus, plus, root_node

Source code.

Details
Constructor

Tree(argv)

Methods:

compute_bmp_wh()


draw(N, left_pos, yp, i)

This method overrides draw in class ScrollArea

expand()

#
  Expand all the nodes in the {Tree}.


flatten()

#
  This method returns a flat list of all the {Nodes} in the tree that are
  currently displayed.
  @return  A list of nodes.


flatten2(l, n, dl)


get_line_height()

This method overrides get_line_height in class ScrollArea

get_max_width()

This method overrides get_max_width in class ScrollArea

handle_press(e)

This method overrides handle_press in class ScrollArea

set_default_bmps(l)

#
  Set the default bitmaps for each {Node} in the {Tree}.  The parameter should be
  a list of three bitmaps;  see {Node} above for an explanation.
  @param l  The list of bitmaps.


set_root_node(r)

#
  Set the root node of the {Tree}.


Fields:
bmp_h

bmp_w

col_w

default_bmps

little_h

little_w

minus

plus

root_node


This page produced by UniDoc on 2021/04/15 @ 23:59:54.