On Dec 3, 1:25 pm, "Ville M. Vainio" <[EMAIL PROTECTED]> wrote:
> Perhaps syntax highlighting in qt ui could be used via QSyntaxHighlighter: Rev 1292 of the trunk begins the process of stitching in an adapter class (leoQtColorizer) that creates a subclass of QSyntaxHighlighter, leoQtSyntaxHighlighter. This adapter class stands between Leo's core, the qtGui plugin, and leoQtSyntaxHighlighter. There is a problem, however. Qt calls leoQtSyntaxHighlighter.highlightBlock for each *line* of body text. Alas, the code in the threading colorizer works with ranges of characters. The calls to highlightBlock probably happen in the background in a separate thread; ignoring these calls could negate the benefits that Qt is trying to provide automatically. The problem is to use take advantage of the piecemeal characters of the calls to highlightBlock while still being to use the pattern matchers in the threading_colorizer plugin. In essence we must hack a resolution of the difference between scanning lines and tokens. There are examples of this kind of hacking at http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qsyntaxhighlighter.html#details The actual hacks will be quite different, however, because a state- oriented approach won't work. Considerable repackaging will also be needed. For example, the pattern matching methods must run in the thread containing the highlightBlock method. Many other details will have to be handled as well. Still, I think the work will be worth it: we should get hugely greater performance as a result. Edward --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~----------~----~----~----~------~----~------~--~---
