This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// only handles coplexity on top level, if you have a node with 1M children, you are out of luck | |
// changes in clipped parts are not detected, so if somebody deleted nodes in clipped, scrollbar is not updated until user actually scrolls | |
// scrolling and changes refresh the clipper == that part is as slow as no clipping at all | |
// only single list in BeginChild/EndChild is tested | |
struct TreeViewClipper { | |
// persist | |
float cursor_end = 0; | |
float cursor_visible_start = 0; | |
uint first_visible_index = 0; | |
float last_scroll = 0; |