PropertiesSectionDefinition
A section a plugin adds to Properties. See PluginContext.addPropertiesSection.
Properties
Section titled “Properties”id:
string
Identifies the section within its plugin: letters, digits, dots, dashes or underscores. Panels, dialogs and Properties sections share ids, so each needs its own.
title:
string
The section’s heading.
Methods
Section titled “Methods”draw()
Section titled “draw()”draw(
ui,container):void
Draws the section for container, the one selected group or component instance that
holds the plugin’s data. Like a panel’s draw, it only reads, except right after the user
changed a widget: then it may edit the model, for example rebuild container. Rebuilding
on every change of a slider drag is fine: the drag’s operations make one undo step; see
Model.operation.
Parameters
Section titled “Parameters”container
Section titled “container”Returns
Section titled “Returns”void
when()?
Section titled “when()?”
optionalwhen(container):boolean
Whether the section shows for container, for plugins whose data describes more than one
kind of object, such as cabinets and worktops. Without it, the section shows for every
container that holds the plugin’s data. It only reads, even when the draw that follows may
edit: changing the model, the selection or the tool from it, or from the promise callbacks
and awaits it starts, even once code that may edit settles their promises, throws
ModelError. It must return true to show the section. Needs the
"propertiesWhen" feature.
Parameters
Section titled “Parameters”container
Section titled “container”Returns
Section titled “Returns”boolean