emacs-devel
[Top][All Lists]
Advanced

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

Re: Changes in frame/window code


From: martin rudalics
Subject: Re: Changes in frame/window code
Date: Mon, 28 Jul 2014 15:57:15 +0200

> If you include the space on the left, then the width of an R2L display
> line is always exactly equal to the window width.  This is how the
> display engine computes the width of the stretch glyph that represents
> "the space on the left".

But if that R2L line starts on the right of the right window edge it's
larger, I presume.

> If you want the line width without the stretch, then you calculate it
> exactly like with L2R lines: columns and line widths are computed in
> the logical order.

Hmmm...  That would mean my calculations in

      whole = move_it_to (&it, -1, INT_MAX, window_box_height (w), -1,
                          MOVE_TO_X | MOVE_TO_Y);

of set_horizontal_scroll_bar have a flaw.

>> IIUC this means that the slider width must be calculated paragraph-wise
>> and position and size of the slider are meaningful only with respect to
>> the paragraph point is currently in.
>
> Yes.  But that is true for strictly L2R text as well, no?  I mean, the
> size of the scroll-bar thumb should depend on the width of the line at
> point, right?

No.  The slider size repesents the width of the window with respect to
the longest line shown in the window.  Try moving point through the
first column within a window - the slider size should not change.

> It doesn't work when you drag the slider.  When you drag the slider,
> the text is scrolled in the wrong direction.  The underlying problem
> is that the slider starts in a wrong position -- it should be all the
> way to the right, not to the left.  AFAIU, this can only be fixed on
> the C level.

Is the size of the slider correct in the sense described above?  Then
fixing the position should not be that difficult.

> (Btw, shouldn't GTK scroll bars already support bidirectional text out
> of the box?  Perhaps you need to set some flag(s) to get that.)

No idea.  In any case I would have to tell GTK whether the "current
text" (whatever that is) is L2R or R2L I suppose.

martin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]