I'm getting very enthusiastic about this notion because I can see how it 
could work - from  user interface, architectural, and implementation points 
of view.  Of course, the devil is in the details and I'm only looking at an 
overall picture.  It seems to me that a small change in Leo's design would 
open up all kinds of possibilities.  My thinking is guided by a number of 
features that already exist, especially 1) the tabbed Log pane; 2) the 
machinery behind the display of @pyplot nodes, and 3) the viewrendered and 
viewrendered3 plugins.

Let's start with the Log pane.  Whoever came up with it had a brilliant 
idea. Most users are probably familiar with the Find and Nav tabs, and 
possibly the Completion and Spell tabs.  You click on a tab and get a 
completely different view.  What you may not realize is that a tab is just 
the display device for an entire mini-application, in the form of scripts 
and a set of one or more "widgets".  To hook it into the log pane with its 
own tab is remarkably simple, programming-wise - this is the brilliant 
part.  You just give the top-level widget and a tab name to the log pane 
and the pane sets up all the tab and switching machinery for you.  So a tab 
could contain almost anything - a web browser, a dictionary, you name it.  
If it has a single top-level display widget and code behind that, it can 
get its own tab in the log pane.  The scripts for the tab have access to 
all of Leo's code and data, so they can do just about whatever they like.  
Tabs can be installed by plugins, bit also by non-plugin scripts.

So this is a model for making use of graphical capability.  Make what is 
now the body into a tabbed frame.  You can probably adopt the log pane code 
with little change.  The standard body display becomes one of the tabs, one 
that is always there.  Nodes would pick up an additional piece:  Currently 
nodes have headline data (p.h) and text data (p.b).  They can be enhanced 
to contain, say, p.canvas, which would be data or drawing instructions for 
a canvas.  There might end up being a use for several types of p.canvas, 
say p.canvas_x.  So we'd eventually need some machinery to accommodate that.

I'll pick this up in my next post, since this one is already getting too 
long.
On Monday, March 21, 2022 at 10:45:01 AM UTC-4 gates...@gmail.com wrote:

> While I anticipate pushback on this idea, I am wholeheartedly for it.  I 
> have long wanted such a feature, but couldn't figure out just how to word 
> it.
>
> On Mon, Mar 21, 2022 at 10:42 AM tbp1...@gmail.com <tbp1...@gmail.com> 
> wrote:
>
>> Leo's nodes are basically text-only nodes.  The text is available from 
>> the node's body, typically p.b, or the headline, p.h.  I wonder if there 
>> could be another part of a node, a drawing canvas.  Perhaps p.cnvs?  If we 
>> could figure out how to converse with the canvas of a node, then we could 
>> visualize anything we like. 
>>
>> Alternatively, perhaps there could be a new node type, one that has only 
>> a canvas, with no text body - that would be more like the Jupyter approach.
>>
>> Having a canvas as a built-in part of a node could fill a conspicuous 
>> lack, the inability to display graphical information.  There are 
>> workarounds.  The @pyplot node type is one, and writing graphics as SVG to 
>> a node and showing that node with VR3 is another.  Writing RsT or Markdown 
>> referencing an image to a node and displaying it in VR3 is a third. This 
>> gives you mixed text and graphics.  But these methods are all limited and 
>> clumsy.
>>
>> A graphics node should include the ability to have links that point back 
>> into Leo outlines, or at least its own outline.  This capability would make 
>> Leo stand out in comparison to say Jupyter, which otherwise has so many 
>> good features.
>>
>> -- 
>> 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+...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/leo-editor/bf345490-57fc-4dc6-981a-2c2b9f796826n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/leo-editor/bf345490-57fc-4dc6-981a-2c2b9f796826n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/48aa298f-a1de-4b97-9ccc-a9b974d4b044n%40googlegroups.com.

Reply via email to