Re: GtkTextView documentation needs to be reviewed



On Sun, Jul 5, 2009 at 11:56 PM, Owen Taylor<otaylor redhat com> wrote:
> Why don't you think this problem is fixed?
>
> - Owen

In my opinion it's not fixed because of 2 things:
1) the doc explains the absence of an API to detect scrolling events,
and then cites bug number 64518 (which is marked fixed), but there's
still no scrolling API (except the GtkAdjustment workaround which is
the signals "changed" and "value-changed", to handle scrolling and
window resizes - the doc forgets to say that also when you resize you
have to move the child).
2) the GtkAdjustment workaround does not give correct results
(properties upper and value) whenever the scrolling bar appears [1]

There's currently no way to put a child in the border of a window and
keep aligned (for instance) on the bottom, except to use another
horrible workaround that I just discovered, which is to place the
child in GTK_TEXT_WINDOW_WIDGET (so it floadt over scrolling areas),
then add the window border, and move the child over the window border.
now since scrolling does not effect the child, this specific problem
is workarounded.
But if you are in another scenario in which the child should scroll
with the scrolling area (for instance if you want to keep an icon in
the right border aligned with the last line of text), if you use the
GtkAdjustment properties you will see that they return wrong values,
and if you base upon those results ypos in
gtk_text_view_move_child_in_window you won't get your child positioned
where you need.

If you need a code example I can give it.

[1] http://bugzilla.gnome.org/show_bug.cgi?id=586998


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