Re: get_text_at_offset, get_text_after_offset, get_text_before_offset



lucy brophy wrote:
> 
> I am currently implementing the gail function get_text_before_offset.
> 
> The implementation of get_text_at_offset returns an entire word,
> sentence or line depending on the boundary condition passed into it.
> The start pointer is moved so that what is returned in the buffer is
> beginning with a complete word.
> 
> The implementation of get_text_after_offset returns a buffer from the
> point of the offset to the boundary condition.  This means that partial
> words can be returned at the start of the return buffer.
> 
> If get_text_before_offset is written to correspond with
> get_text_after_offset it will return a buffer from the boundary
> condition to the offset, again possibly returning a partial word.
> 
> Is there any use/point to returning a partial word?  What use is a
> partial word to a screen reader? Should I change both the after_offset
> and before_offset functions to return entire words at the start and end
> respectively?

I answered Lucy already but did not remember to reply to all... my
opinion is that partial word behavior is correct, it's consistent with
the line/sentence behavior (which is certainly useful) and there are
lots of use cases other than the screenreader case.  Braille displays
might make use of partial words, etc.

As for the description of sentence_at, word_at, etc. Lucy's
explanation sounds right to me, I believe that these methods should
return whole words/lines/sentences.

-Bill
> Would it not be more useful to return the line, sentence, or word before
> or after the point indicated to by the offset?  (Thus at_offset would
> return the line, sentence, or word at the offset)
> 
> Any thoughts on this would be great,
> Thanks,
> Lucy
> --
> 
> Nothing contributes so much to tranquilizing the mind as a steady
> purpose - a point on which the soul may fix its intellectual eye.
>         -- Mary Wollstonecraft Shelley
> 
> =====================================================================
> Lucy Brophy
> Sun Microsystems Ireland Ltd
> East Point Business Park
> Dublin 3
> Ireland
> 
> Tel:    +353 1 8199072
> eMail:  lucy brophy ireland sun com
> 
> _______________________________________________
> gnome-accessibility-list mailing list
> gnome-accessibility-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-accessibility-list

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




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