Re: AtkText attributes



>Yes, but many of the attributes overlap runs.  Therefore I'm not sure it is 
>reasonable to refer to a run as a "unique attribute run".  Perhaps it is more
>accurate to say that each run is a "unique set of attributes run".  

Right, we would define an "attribute run" as a character string over which the 
attributes are invariant, thus the run contains the same "set" of key-value 
pairs for each text character within it.

>
>   I call the function saying I am interested in the text from 18-21.  I am
>   returned perhaps an array of two structures which have the following info:
>   
>      struct[0]->attribute = font
>      struct[0]->value     = times
>      struct[0]->start     = 0
>      struct[0]->end       = 26
>      struct[1]->attribute = style
>      struct[1]->value     = italics
>      struct[1]->start     = 11
>      struct[1]->end       = 21


I think that we should return attribute sets for the character at a single 
offset.  By combining this with the "text run" API (for returning a run over 
which attributes are invariant) we can thus get the attribute set that applies 
(uniformly) to an entire text substring, without requiring that we process the 
whole buffer.  The (possibly degenerate?) case where attributes are the same 
over the whole (big) buffer can be handled, perhaps, by having some maximum 
returned substring size.  However doing the "substringing" based on attributes 
seems more "natural" to me than doing it the other way around (as suggested 
above).

-Bill
    


------
Bill Haneman x19279
Gnome Accessibility / Batik SVG Toolkit
Sun Microsystems Ireland 





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]