Re: Tree widget for Table of Contents view?

In-reply-to: Your message of Tue, 25 Jan 2000 16:39:04 -0500."
             <1.5.4.16.20000125143840.3e670e1a@mail.com> 
> Hi, Irene -
> 
> My main goal is interactive collapsing and expanding of each "branch" of the
> hierarchical "tree" of headings. The Table of Contents view currently shows
> an outline of the heading hierarchy, with all sub-headings always visible.
> 
> Selective hiding of sub-headings would allow the user to focus at different
> levels of detail; this is especially useful for navigating large documents.
> To accomplish this, I propose displaying the heading hierarchy in a tree
> widget, like those used in GUI file managers. 
> 
> Specifically, a small icon is displayed to the left of each heading: a "+"
> indicates the presence of one or more hidden sub-headings; or a "-"
> indicates that any children are already visible, or that no children exist.
> The user can toggle between the collapsed and expanded states for a heading
> by clicking on each icon, or via a keystroke.

The P language provides the material to hide or display a box in a view.
This is the P Visibility. The default Visibility level is 5. When the 
visibility
of a box is less than 5 it's not displayed, when it's more or equal to 5 it's 
displayed.
You can add a new hidden attribute "XX=displayed, undisplayed" which sets 
respectively the box Visibility to 5 or 4. Then you can write a callback 
function
attached to the activation of the displayed icon that changes the value of 
that
attribute in the sub-tree.

> Editing is a secondary issue: when sub-nodes are hidden, I'd like the
> ability to prune and graft the entire branch to another location, via
> cut-and-paste. Ideally, the tree widget itself should have hooks to support
> this capability. 

With Thot events, callbacks and the API you can implement any specific 
functionality.
See the example of the Make Book which moves a part of a document into another
and the developer documentation.

> Assuming that such a tree widget is currently unavailable for Thot, I
> propose to port an existing widget from an open-source library such as GTK.
> Then I would populate the widget with the headings which are currently
> displayed in Table of Contents view. Perhaps I should refer to the result as
> an Interactive Outline View.
> 
> Does this sound feasible?
> 
> 
> At 02:22 PM 1/25/2000 +0100, you wrote:
> >The Table of Contents view is already editable today.
> >So I don't understand what you plan to do exactly.
> >Irene.
> 
> 
> Thanks,
> Marc
> 

  Irene.

Received on Wednesday, 26 January 2000 04:21:02 UTC