Bug 31157 - Python TUI window should automatically handle scrolling and clipping
Summary: Python TUI window should automatically handle scrolling and clipping
Status: NEW
Alias: None
Product: gdb
Classification: Unclassified
Component: python (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-13 03:58 UTC by Tom Tromey
Modified: 2023-12-13 15:03 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Tromey 2023-12-13 03:58:24 UTC
I tried writing a TUI stack window in Python.
This wasn't too bad overall, but it would be a lot simpler
if the Python TUI code could automatically handle clipping
text (as opposed to letting it wrap, which happens now),
and also scrolling.

This could be an option on TuiWindow so that window
implementations could request this behavior.
Comment 1 Hannes Domani 2023-12-13 15:03:41 UTC
The TextWindow class of my locals TUI window [1] took care of this kind of stuff, I just have to give it a list of lines, I use this as base for all my TUI windows.
But if the TuiWindow itself did all this, it would be nice too I guess.

[1] https://sourceware.org/pipermail/gdb-patches/2021-June/179539.html