We are really on the same page here!

On Thursday, April 25, 2024 at 12:39:33 PM UTC-4 Edward K. Ream wrote:

On Thursday, April 25, 2024 at 6:57:17 AM UTC-5 Thomas wrote:

Hmm, instead of rendering those nodes in a separate frame as VR/VR3 does, 
we could overlay the rendering frame over the editing frame. We could 
switch in and out of rendering mode to allow editing.  I bet that wouldn't 
be too hard.

Thomas, you may have solved a problem that has bedeviled me for ages! Here 
are my first thoughts:

I've never liked the VR pane. It seems like a significant waste of real 
estate.

I completely agree about the real estate.  Almost always, I display VR3 
renderings in a tab in the log pane just for this reason even though the 
view is smaller.  I have a button to toggle the VR3 tab on and off.  When 
off, the delay after each few keystrokes for rendering is not incurred, so 
the button gets used a lot.  BTW, whether in a separate frame or in a tab 
in the log frame, the VR3 display will update as you type.  The same is 
true in freewin if you toggle to the rendered view (you don't type into the 
freewin window, you type into the parent node in the main Leo window).

Edit modes are confusing, but *visual modes* will work! Here are some 
preliminary thoughts:

*Rendering modes*

Both headlines and body text will specify a *default rendering mode* for 
*each *node:

I have been thinking exactly this.  We have to make sure that the defaults 
do the right thing almost all the time so that people who don't care, and 
legacy outlines, work right without needing to change.

- Headlines like @movie and @html (and all the others that VR and VR3 
support) would set the default rending mode to some graphics mode.

- Otherwise, @language directives will specify the preferred rendering 
mode, usually *text mode*. However, @language rst would specify *rst mode*.

Exactly; remember that VR3 can handle multiple (software) languages in a 
node (only one rendering language per node, though, i.e., RsT, Md, etc.).  
 It would be nice not to lose that ability.  VR3 can also execute the code 
in a node that has intermixed code and non-code sections.

- A possibility: *@rst-tree* in the headline would specify that the 
rendered contents would consist of the node's body and the bodies of all 
descendant nodes.

Tricky - a long subtree can incur too long a rendering time, or too much 
scrolling, especially when graphics are involved.  That's why VR3 has a 
menu item to render a subtree or only the current node.  I bet we could 
come up with a nearly painless way to do the same, but I have found that I 
want to sometimes see the node and sometimes the tree - so I don't think 
that *@rst-tree* is a good way to go.

*Switching modes*

The *toggle-rendering-mode* command will toggle between the *default *and 
*alternate *rendering modes. Text mode will always be one of those modes.

Users are unlikely to become confused about which mode is in effect because 
graphics look very different from text. If confusion does arise, *graphics 
icons* could mark graphics-capable nodes.

Agree. Again, most of the code we need is already working in VR3 and/or 
freewin.  Mainly we need to work out how to provide the overlay frame, and 
how to provide good user controls for switching between text and rendered 
views.

I assume that this capability will be built into the core, since it will 
involve multiple widgets where now there is only an editing widget. We 
should eventually make sure that there is an extension mechanism (via 
plugins) so that people can add new graphic renderings without needing to 
touch core Leo code.

>From an architectural point of view, the current Leo editor widget could 
get replaced by a widget with several child widgets (a tabbed widget is one 
possibility), of which one is the current editor widget, and most keyboard 
and mouse input will go to it no matter whether the text or rendering 
widget is visible.  This plan would require minimal changes to the rest of 
Leo's code.

*Summary*

Rendering body text as either text or graphics seems like a natural idea. 
Why didn't I ever think of this before? And how did we ever live without it?

The *toggle-rendering-mode* command will toggle between graphics and text 
views.
Users are unlikely to become confused about what body panes contain. 

Rendering either text or graphics in the body pane:
- Significantly increases Leo's effective real estate.
- Promises to give Leo the visual capabilities of the most sophisticated 
outliners.

Today is a milestone in Leo's history. And there is further room for 
invention!

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/6d6d44d2-b1ab-489b-8b47-9aa51d6cc012n%40googlegroups.com.

Reply via email to