Re: [PATCH 20/24] Allow TUI windows in Python

Tom Tromey
2020-02-22T19:57:56Z

>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:

>> +terminal escape styling sequences; @value{GDBN} will convert translate
>> +these as appropriate for the terminal. ^^^^^^^^^^^^^^^^^

Eli> One of these two words should be removed.

Fixed.

>> +@defun Window.hscroll (@var{num})
>> +This is a request to scroll the window horizontally. @var{num} is the
>> +amount by which to scroll, with negative numbers meaning to scroll
>> +right.
>> +@end defun
>> +
>> +@defun Window.vscroll (@var{num})
>> +This is a request to scroll the window vertically. @var{num} is the
>> +amount by which to scroll, with negative numbers meaning to scroll
>> +backward.

Eli> There's a well-known source of confusion with describing scrolling
Eli> direction: does it refer to scrolling of the text in the window
Eli> (i.e. the window is considered to be fixed and the text to be
Eli> scrolled) or the other way around? The confusion stems from the fact
Eli> that we say "scroll the window", but what is actually scrolled is the
Eli> text. Can we please make it crystal clear here what will move right
Eli> and backward here?

I did this, like so:

@defun Window.hscroll (@var{num})
This is a request to scroll the window horizontally. @var{num} is the
amount by which to scroll, with negative numbers meaning to scroll
right. In the TUI model, it is the viewport that moves, not the
contents. A positive argument should cause the viewport to move
right, and so the content should appear to move to the left.
@end defun

@defun Window.vscroll (@var{num})
This is a request to scroll the window vertically. @var{num} is the
amount by which to scroll, with negative numbers meaning to scroll
backward. In the TUI model, it is the viewport that moves, not the
contents. A positive argument should cause the viewport to move down,
and so the content should appear to move up.
@end defun

Tom