XY_ZOOM_SELECT_PAD
Active element that both includes an XY_PARAM_PAD to control two parameters at the same time, and a 2 dimensional zooming capability by selecting an area on the screen. The widget can be connected to two coordinates parameters, and four additional zooming parameters (zoom and offset for each dimension).
Attributes brief detailed show all inherited
See XY_PARAM_PAD as a similar simpler widget without "drag selection" capabilities.
Example
* Note that you can set "opacity" to 0 to hide the selection rectangle.
- <!-- demo params -->
- <PARAM id="x" min="0" max="500" default="0" />
- <PARAM id="y" min="0" max="200" default="0" />
- <PARAM id="x_zoom" min="0" max="100" default="1" />
- <PARAM id="y_zoom" min="0" max="100" default="1" />
- <PARAM id="x_offset" min="0" max="1" default="0.5" />
- <PARAM id="y_offset" min="0" max="1" default="0.5" />
- <!-- widget to make a background and overlay layers -->
- <WIDGET background_color="#d9f0ff" layout_type="layer_stack">
- <!-- xy_zoom_select_pad -->
- <XY_ZOOM_SELECT_PAD id="xy_pad" width="500" height="200" x_param_id="x" y_param_id="y" y_reverse="true" x_fine_ratio="10" x_zoom_param_id="x_zoom" x_offset_param_id="x_offset" y_zoom_param_id="y_zoom" y_offset_param_id="y_offset" color="#555555" />
- <!-- info line -->
- <COLUMN spacing="5">
- <ROW spacing="10">
- <PARAM_TEXT_CONTROL param_id="x" content="x: {value}" />
- <PARAM_TEXT_CONTROL param_id="y" content="y: {value}" />
- <PARAM_TEXT param_id="xy_pad.mouse_down" value_format=".0" content="mouse_down: {value}" />
- <PARAM_TEXT param_id="xy_pad.mouse_over" value_format=".0" content="mouse_over: {value}" />
- <PARAM_TEXT param_id="xy_pad.focus" value_format=".0" content="focus: {value}" />
- </ROW>
- <ROW spacing="10">
- <PARAM_TEXT_CONTROL param_id="x_zoom" content="x_zoom: {value}" />
- <PARAM_TEXT_CONTROL param_id="x_offset" content="x_offset: {value}" />
- <TEXT value=" | " />
- <PARAM_TEXT_CONTROL param_id="y_zoom" content="y_zoom: {value}" />
- <PARAM_TEXT_CONTROL param_id="y_offset" content="y_offset: {value}" />
- </ROW>
- </COLUMN>
- </WIDGET>
For more powerful widgets see XYZ_PARAM_SCRATCH_PAD / XYZ_PARAM_CLICK_PAD.