On Thu, 23 Mar 2017 11:45:25 -0500
Kent Tenney <kten...@gmail.com> wrote:

> I'm looking at a copy of leo_edit_pane branch: what is required
> to see the new code in action?

Here's the relevant paste from an earlier email:


To open a LEP you need to tell free_layout about them.  I still want to
replace free_layout with Qt's docks, but for now free_layout is how you
add panes of any kind.  To do that you need to run this script once (I
have it on a @script node):

from leo.core.editpane import editpane
if g.isPython3:
    from importlib import reload

class MinimalDemoProvider:
    def ns_provides(self):
        return [("Demo editor", "__demo_provider_minimal_slider")]
    def ns_provide(self, id_):
        if id_ == "__demo_provider_minimal_slider":
            reload(editpane)  
            g.es("reloaded")          
            w = editpane.LeoEditPane(c=c, mode='split')
            return w
        return None
    def ns_provider_id(self):
        return "__demo_provider_minimal"
        
c.free_layout.get_top_splitter().register_provider(MinimalDemoProvider())

Then you can either use the free_layout menus to open a LEP, or more
easily run this code from a button:

s = c.free_layout.get_top_splitter()
s.open_window("__demo_provider_minimal_slider")

This opens the LEP in a separate window, it works the same as a pane in
the main window.

You should get at least Plain Text Edit, Plain Text Edit B, Plain Text
View, and Plain Text View B.  These are what they sound like, with the B
versions having a different background color to show they're alternate
widgets.  Depending on what you have installed, you may also get a
WebKit based HTML viewer, a WebEngine based HTML viewer, and a Markdown
viewer descending from one of the HTML viewers.  Possibly also a
markdown-html viewer which shows you the HTML for markdown, can't remember.



> Thanks,
> Kent
> 
> On Thu, Mar 23, 2017 at 11:26 AM, 'Terry Brown' via leo-editor <
> leo-editor@googlegroups.com> wrote:
> 
> > On Thu, 23 Mar 2017 11:07:25 -0500
> > "Edward K. Ream" <edream...@gmail.com> wrote:
> >
> > > On Thu, Mar 23, 2017 at 10:49 AM, Edward K. Ream
> > > <edream...@gmail.com> wrote:
> > >
> > > > On Thu, Mar 23, 2017 at 10:30 AM, 'Terry Brown' via leo-editor <
> > > > leo-editor@googlegroups.com> wrote:
> > > >
> > > >> The code is in the branch
> > > >> https://github.com/tbnorth/leo-dev-tbnorth/tree/leo_edit_pane
> > > >
> > > > ​Thanks.  I'll make no changes.
> > >
> > > ​I don't see the leo/core/editPane directory when I do a git
> > > clone.
> >
> > Speed wise you could fetch the repo. into you current repo, but I'm
> > guessing you want to clone into a completely separate repo.
> >
> > Just tried that, don't understand why, but git branch didn't show
> > the leo_edit_pane branch, but git checkout leo_edit_pane seemed to
> > work anyway.
> >
> > Cheers -Terry
> >
> > --
> > 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 post to this group, send email to leo-editor@googlegroups.com.
> > Visit this group at https://groups.google.com/group/leo-editor.
> > For more options, visit https://groups.google.com/d/optout.

-- 
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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to