On Sun, Sep 7, 2014 at 8:39 PM, 'Terry Brown' via leo-editor <[email protected]> wrote:
> Wow, quite the revolution in the short time I was away :-) Welcome back :-) The code is cleaner, and some of the never-used calls in the api are gone, but the widget code still presents the same (inter) face to Leo's core. So in that sense, there hasn't been any real change. > I'm hopeful that QScintilla will be good for Leo. I am going to start a new thread to discuss this. > It seems like this would be a good time to get body editors to behave > in a way that allows better integration with free_layout and related > things like the stickynotes and tabula plugins. I agree. As I said above, nothing much fundamentally has changed. However, this does seem like a good time, while the widget code is in ferment. > The major drawback of > those is that they use plain plain text editors, and not Leo body > editors. free_layout should be able to completely replace the > perennially picky add-editor code, too. I would love it if that could be done. But it won't be easy, imo. The essence of the difficulty is this. Leo's Commands object c knows nothing about multiple body panes. As far as c knows, there is always and only *one* body pane, c.frame.body. Therefore, adding, deleting and selecting a new body editor requires some *very* tricky code that switches c.frame.body.wrapper (and other ivars) under c's nose. The horrible details are in tree LeoBody.entries, especially the node LeoBody.selectEditorHelper. This injects ivars into widgets and switches internal state. BTW, all injected ivars have the "leo_" prefix so there can be no possibility of stomping on an existing ivar. This convention also makes it easy to find injected ivars. Yes, the reorg will help: it is now always clear that c.frame.body.wrapper is a QTextEditWrapper or a QScintillaWrapper. Both wrappers have the same API. In particular, all text wrappers have a .widget ivar that is the corresponding "real" widget, a QTextEdit or a QsciScintilla object. In short, the new reorg help, but there is a lot of dashed tricky work involved in switching body panes. 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
