http://www.yellowbrain.com/stc/textio.html
http://www.yellowbrain.com/stc/styling.html
There are usually 32 styling definitions available for most modes, but
some of the styles are reserved for the font coloring for each major
mode.
So, assuming that is only way to set the background (and I'm not sure
that it is), I see several issues:
1) I use the Editra styling system because that allows consistent
styling across major modes (i.e. comments appear in the same
color/font regardless if you're editing Python or C++ or Perl). The
problem is that Scintilla (the underlying editing component) isn't
consistent, so there is a bunch of index remapping to make sure
peppy's display is consistent. You'd have to chose index numbers so
that they wouldn't conflict.
2) The automatic styling that happens due to the call to SetLexer will
overwrite the custom styles whenever it thinks lines have changed, so
somehow we'd need to short-circuit that process or at least know when
it happens.
3) It seems like a good place to add this would be within the
incremental find action (i.e. the Edit -> Find menu option). Is that
something like what you were thinking?
Have you done much work with the wx.StyledTextCtrl? I think it might
be worth experimenting with some proof-of-concept things before trying
to integrate into peppy.
If you check out the latest svn, you can use the
peppy/find_replace/actions.py as a testbed. If you call that
directly, i.e.:
python peppy/find_replace/actions.py
it will pop up a window that has some sample text and the find bar.
Should be a good place to start.
Rob
> --
> You received this message because you are subscribed to the Google Groups "peppy-dev" group.
> To post to this group, send email to pepp...@googlegroups.com.
> To unsubscribe from this group, send email to peppy-dev+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/peppy-dev?hl=en.
>
>