LabKit MATLAB Workbench

reference

FrameworkApp SDK API

labkit.app.interaction.regionSelection

Declare a transient click-or-drag region gesture.

Syntax

spec = labkit.app.interaction.regionSelection(id,onSelected,Name=Value)

Description

Creates the semantic declaration for a transient click-or-drag selection whose result is delivered without exposing native interaction objects.

Inputs

id
Unique MATLAB identifier.
onSelected
Callback state = callback(state,position,context).

Options

Axis
Axis ID. Default: "main".
Style
Scalar visual-option struct. Default: struct().
Instruction
Scalar guidance text. Default: "".
ViewportPolicy
"preserve" or "fit". Default: "preserve".
OnBackgroundPressed
Optional point callback. Default: [].

Outputs

spec
Immutable interaction declaration.

Errors

Throws labkit:app:contract:* for invalid values.

Typical Call

spec = labkit.app.interaction.regionSelection( ...
"temperatureRegion",@measureRegion, ...
OnBackgroundPressed=@measurePoint);

Source

This page is generated from the MATLAB help text in +labkit/+app/+interaction/regionSelection.m.