For controls that support scrolls, we need to know the max ctrl width and max ctrl height for scrolls values to make sense, since they are percentages.
ctrlPosition _ctrl
returns
[x, y, w, h, maxW, maxH]
Alternatively, add a new command that does this, since I'm not sure if this will break backward compatibility.
New command syntax:
getCtrlViewPort _ctrl
returns the visible part of the control, based on scroll values:
[x1, y1, x2, y2] /* [x1, y1] ______________ | | |_____________| [x2, y2] */
The coordinate values are relative to the control itself. E.g. if scroll values are 0, the top [x1, y1] is [0, 0]
For controls that don't have sliders, it returns [0, 0, w, h]