Not exactly sure what you mean by a hot rect! If you mean the bit that’s visible, then that’d be quite difficult to do, as components don’t really have a concept of that (they could be overlapped by all kinds of semi-transparent stuff, and there’s not much point in making them all store a representation of the visible area, because it’s never really needed)
By hot rect, I mean the current work area of the widget.
Most of the time it will be the whole widget, but when doing some rectangle selection in some widget, it allows the viewport to follow the mousedrag that is use the extend the selection.
Sure, I see. It’s not a good design strategy though, to try to optimise it like that. You’d be better off doing something like smart caching its content based on the last bits that needed to be drawn or moused-over. Or just using more subcomponents and let them take the strain.
Well I’m thinking about an equivalent
to scrollRectToVisible in java swing JComponent.
You don’t know if your parent is a kind of viewport
but if it is then it will what to do about it.