sdgtk: write a custom list widget #1

Closed
opened 2020-10-11 00:17:39 +02:00 by p · 1 comment
Owner

Nothing in GTK+ appears to be suited for what are virtually infinite lists. Our workaround with GtkLabel and GtkScrolledWindow is heavily suboptimal and needs to be replaced.

Use Pango directly to handle our relatively simple needs. Replicate the behaviour of sdtui when in doubt.

gdk_pango_layout_get_clip_region() can be used to retrieve clip regions for text selection. Other functions exist to retrieve what position corresponds to display coordinates. pango_cairo_layout_path() can be used to override the foreground colour (Pango markup may specify colours of its own, even if it's not currently supported; besides, I believe pango_cairo_show_layout() will employ some optimisations).

It is more than possible to just import colours from sdtui configuration.

Nothing in GTK+ appears to be suited for what are virtually infinite lists. Our workaround with GtkLabel and GtkScrolledWindow is heavily suboptimal and needs to be replaced. Use Pango directly to handle our relatively simple needs. Replicate the behaviour of sdtui when in doubt. `gdk_pango_layout_get_clip_region()` can be used to retrieve clip regions for text selection. Other functions exist to retrieve what position corresponds to display coordinates. `pango_cairo_layout_path()` can be used to override the foreground colour (Pango markup may specify colours of its own, even if it's not currently supported; besides, I believe `pango_cairo_show_layout()` will employ some optimisations). It is more than possible to just import colours from sdtui configuration.
p self-assigned this 2020-10-11 00:17:39 +02:00
p added the
WIP
label 2021-07-09 20:30:33 +02:00
Author
Owner

Partially resolved in 9d7bc2a.

Partially resolved in 9d7bc2a.
p closed this issue 2021-10-15 12:18:05 +02:00
Sign in to join this conversation.
No Label
WIP
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: p/tdv#1
No description provided.