constImVec4clip_rect(frame_bb.Min.x,frame_bb.Min.y,frame_bb.Min.x+size.x,frame_bb.Min.y+size.y);// Not using frame_bb.Max because we have adjusted size
// - Handle scrolling, highlight selection, display cursor (those all requires some form of 1d->2d cursor position calculation)
// - Measure text height (for scrollbar)
// We are attempting to do most of that in **one main pass** to minimize the computation cost (non-negligible for large amount of text) + 2nd pass for selection rendering (we could merge them by an extra refactoring effort)
// FIXME: This should occur on buf_display but we'd need to maintain cursor/select_start/select_end for UTF-8.