Re: GtkEntry And AtkText
- From: Owen Taylor <otaylor redhat com>
- To: gnome-accessibility-list gnome org
- Subject: Re: GtkEntry And AtkText
- Date: 27 Apr 2001 11:45:31 -0400
Bill Haneman <bill haneman ireland sun com> writes:
> Padraig O'Briain wrote:
> >
> > Marc,
> >
> > The current position in a GtkEntry is obtainable as the property
> > "text_position". This is the current position of the insertion point.
> >
> > We could probably implement interfaces when AtkTextBoundary is
> > ATK_TEXT_BOUNDARY_CHAR or ATK_TEXT_BOUNDARY_CURSOR_POS but it is likely to be
> > more challenging for the other text boundary values.
>
> Yep, though I think GtkEntry is a single-line entry field, so it
> should be easy to do ATK_TEXT_BOUNDARY_LINE...
>
> My vote is that for a widget like this we just return the line if the
> "sentence" is asked for,
> and use "whitespace" for word delimiters; it's incorrect but I think
> we could live with that and file a bug against GtkEntry asking it to
> use pango in future... so someday it would work as expected.
GtkEntry _does_ use Pango internally. Currently, it doesn't
use pango_get_log_attrs() for navigation, but that is just
a bug (#50202 in fact.)
So, you can certainly just call pango_get_log_attrs() and use
that to compute your boundaries.
But it also seems that you'll want character/screen location mapping -
and while that's certainly possible to do using entry->scroll_offset
and sufficient quantities of cut-and-paste, that's pretty ugly
and fragile. So it seems that get_layout() get_layout_offsets()
are needed as in GtkLabel. Again, filing a bug about that would
be good.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]