#cp.apple.finalcutpro.inspector.InspectorProperty
InspectorProperty
contains helper functions for handling common property types that occur in various Inspectors
in FCP.
In addition to specific property row types like textField
, slider
, etc., there is also a section
, which is for rows which expand/collapse to reveal other properties.
#API Overview
Functions - API calls offered directly by the extension
#API Documentation
#Functions
| | | | --------------------------------------------|-------------------------------------------------------------------------------------| | Signature | cp.apple.finalcutpro.inspector.InspectorProperty.section(labelKey[, index]) -> function
| | Type | Function | | Description | Returns a 'section row' factory function that can be called to create a section row that contains other PropertyRow'
cp.props. | | **Parameters** | <ul><li>labelKey - The I18N lookup key to find the row with.</li><li>index - (optional) The occurrence of the key value in the parent. Sometimes multiple rows have the same title. Defaults to
1.</li></ul> | | **Returns** | <ul><li>A function which will create the section row when called.</li></ul> | | **Notes** | <ul><li>This does *not* return an actual
cp.prop. Rather, it returns a 'factory' function that will help configure the sub-properties of of the section. This can be used as follows:</li><li></li><li>```lua</li><li>local o = {}</li><li>prop.bind(o) {</li><li> sectionOne = InspectorProperty.section "FFHeaderOneKey" { -- has sub-properties inside the
</li><li> subRowOne = InspectorProperty.textField "FFSubRowOneKey",</li><li> subRowTwo = InspectorProperty.slider "FFSubRowTwoKey",</li><li> },</li><li> sectionTwo = InspectorProperty.section "FFHeaderTwoKey" {} -- no sub-properties, still needs
</li><li>}</li><li></li><li>-- access subRowOne</li><li>local value = o:sectionOne():subRowOne()</li><li>```</li><li></li><li>The
o.sectionOneproperty will be a
cp.propwith the following built-in additional properties:</li><li> **
enabled - a
cp.ui.CheckBoxwhich reports if the section row is enabled.</li><li> **
toggle - a
cp.ui.Buttonwhich will toggle the show/hide button (if present)</li><li> **
reset - a
cp.ui.Buttonwhich will reset the sub-property values, if present in the UI.</li><li> **
expanded - a
cp.prop` which reports if the section is currently expanded. | | Examples | None | | Source | src/extensions/cp/apple/finalcutpro/inspector/InspectorProperty.lua line 99 |