egui icon indicating copy to clipboard operation
egui copied to clipboard

List / table clippers?

Open jgarvin opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. ImGui has ImGuiListClipper that greatly speeds up rendering large tables and lists. It helps you track which list items are actually visible and only do the calls to create those. This is especially helpful when the overhead to prep data is high, e.g. if constructing the string name for a button involves a lot of concatenation. I searched the egui docs for "clipper" and couldn't find anything. When I search for "clip" there are lots of results but they seem to be for rectangles and I think are mostly used internally? Not sure.

Describe the solution you'd like Something like the ImGui API or better :)

Describe alternatives you've considered Mostly that maybe I am grepping for the wrong keyword ;) Seriously though, a custom scrollbar widget, or maybe a nested window that already has clipping for what is it is visible could work, but you also get a different UI with this approach, and it's less straightforward to retrofit if you already have a bunch of code making long vertical lists of widgets.

jgarvin avatar Dec 08 '22 19:12 jgarvin

search for 'show_rows'.

is that what you are looking for?

markusdd avatar Dec 09 '22 01:12 markusdd

Yup - ScrollArea and Table both support this

emilk avatar Feb 08 '23 10:02 emilk