On Monday 07 April 2008 12:34 am, Tony Balinski wrote:
> Quoting Randy Kramer <[EMAIL PROTECTED]>:
> > /* The format of the class string s is:
> >           low[-high]{,low[-high]}:color{;low-high{,low[-high]}:color}
> >       eg
> >           32-255:#f0f0f0;1-31,127:red;128-159:orange;9-13:#e5e5e5
> >    where low and high represent a character range between ordinal
> >    ASCII values. Using strtol() allows automatic octal, dec and hex
> >    reading of low and high. The example format sets backgrounds as 
follows:
> >           char   1 - 8    colored red     (control characters)
> >           char   9 - 13   colored #e5e5e5 (isspace() control characters)
> >           char  14 - 31   colored red     (control characters)
> >           char  32 - 126  colored #f0f0f0
> >           char 127        colored red     (delete character)
> >           char 128 - 159  colored orange  ("shifted" control characters)
> >           char 160 - 255  colored #f0f0f0
> >    Notice that some of the later ranges overwrite the class values defined
> >    for earlier ones (eg the first clause, 32-255:#f0f0f0 sets the DEL
> >    character background color to #f0f0f0; it is then set to red by the
> >    clause 1-31,127:red). */
> 
> That's for determining the backloghting color. The values are the character
> values themselves. If you have an "a" (ASICII 65), you look up the color in
> the map for that number by finding it in the backlight color table: here the
> fourth, #f0f0f0. Its backlight value is then 4 (since 0 is for "no
> backlighting").

Tony,

Thanks!  I may be confused, but I was trying to relate this s to the s in the 
32 bit style mask--quoting from an earlier email (attribution not correct):

> > /* If you use both 32-Bit Style mask layout:
> >    Bits
> > +----------------+----------------+----------------+----------------+
> > |1F1E1D1C1B1A1918|1716151413121110| F E D C B A 9 8| 7 6 5 4 3 2 1 0|
> > |3130292827262524|2322212019181716|151413121110 9 8| 7 6 5 4 3 2 1 0|
> > +----------------+----------------+----------------+----------------+
> > |             r r| r r r r b b b b| b b b b H 1 2 F| s s s s s s s s|
> > +----------------+----------------+----------------+----------------+
>
> The text display widget would then be modified so that if text was marked
> as "hidden for folding", it would not be displayed.

> No: the style buffer doesn't give this whole style value. It's built on the 
fly (see styleOfPos()) from the style buffer entry of a position, along with 
other rendering factors: whether this is the end of line (F for "fill to the 
right"), primary/secondary selection (1, 2), bracket-matching highlighting 
(H), character-value-based backlighting (b) and rangeset index. All this is 
broken down again (in drawString()) how best to draw the next segment of 
text.

I thought the 8 bits marked s in your diagram above, which come from "the 
style buffer entry of a position" would be related somehow to the  class 
string s mentioned at the top part of this email?

Randy Kramer





--
NEdit Develop mailing list - [email protected]
http://www.nedit.org/mailman/listinfo/develop

Reply via email to