# 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

  • button
  • checkBox
  • hasProperties
  • menuButton
  • numberField
  • popUpButton
  • section
  • simple
  • slider
  • staticText
  • textField
  • xy

# API Documentation

# Functions

# button

Signature cp.apple.finalcutpro.inspector.InspectorProperty.button(labelKey[, index]) -> cp.prop <cp.ui.PropertyRow; read-only>
Type Function
Description Creates a new cp.prop that contains a PropertyRow matching the labelKey.
Parameters
  • labelKey - The I18N key that the row lable matches.
  • index - The instance number of that label (defaults to 1).
Returns
  • The cp.prop that returns the PropertyRow.
Notes
  • It has one additional property:
  • ** button - A cp.ui.Button.
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/InspectorProperty.lua line 441

# checkBox

Signature cp.apple.finalcutpro.inspector.InspectorProperty.checkBox(labelKey[, index]) -> cp.prop <cp.ui.PropertyRow; read-only>
Type Function
Description Creates a new cp.prop that contains a PropertyRow matching the labelKey.
Parameters
  • labelKey - The I18N key that the row lable matches.
  • index - The instance number of that label (defaults to 1).
Returns
  • The cp.prop that returns the PropertyRow.
Notes
  • It has one additional property:
  • ** value - A cp.ui.CheckBox which contains the boolean value for the row.
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/InspectorProperty.lua line 490

# hasProperties

Signature cp.apple.finalcutpro.inspector.InspectorProperty.hasProperties(parent, uiFinder) -> boolean
Type Function
Description This will prepare the parent to handle containing PropertyRow children, and returns a function which can pass in a table of properties to bind to the parent.
Parameters
  • parent - The parent table.
  • uiFinder - The function or cp.prop which will be called to find the parent UI element. Functions will be passed the parent when being executed.
Returns
  • boolean
Notes
  • For example:
  • lua</li><li>local o = {</li><li> propertiesUI = ...,</li><li>}</li><li>InspectorProperty.hasProperties(o, o.propertiesUI) {</li><li> propOne = InspectorProperty.textField "FFPropOne",</li><li> sectionOne = InspectorProperty.section "FFSectionOne" {</li><li> sliderOne = InspectorProperty.slider "FFSliderOne",</li><li> },</li><li>}</li><li>
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/InspectorProperty.lua line 38

# menuButton

Signature cp.apple.finalcutpro.inspector.InspectorProperty.menuButton(labelKey[, index]) -> cp.prop <cp.ui.PropertyRow; read-only>
Type Function
Description Creates a new cp.prop that contains a PropertyRow matching the labelKey.
Parameters
  • labelKey - The I18N key that the row lable matches.
  • index - The instance number of that label (defaults to 1).
Returns
  • The cp.prop that returns the PropertyRow.
Notes
  • It has one additional property:
  • ** value - A cp.ui.MenuButton which contains the text value.
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/InspectorProperty.lua line 421

# numberField

Signature cp.apple.finalcutpro.inspector.InspectorProperty.numberField(labelKey[, index]) -> cp.prop <cp.ui.PropertyRow; read-only>
Type Function
Description Creates a new cp.prop that contains a PropertyRow matching the labelKey.
Parameters
  • labelKey - The I18N key that the row lable matches.
  • index - The instance number of that label (defaults to 1).
Returns
  • The cp.prop that returns the PropertyRow.
Notes
  • It has one additional property:
  • ** value - A cp.ui.TextField which contains the number value.
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/InspectorProperty.lua line 339

# popUpButton

Signature cp.apple.finalcutpro.inspector.InspectorProperty.popUpButton(labelKey[, index]) -> cp.prop <cp.ui.PropertyRow; read-only>
Type Function
Description Creates a new cp.prop that contains a PropertyRow matching the labelKey.
Parameters
  • labelKey - The I18N key that the row lable matches.
  • index - The instance number of that label (defaults to 1).
Returns
  • The cp.prop that returns the PropertyRow.
Notes
  • It has one additional property:
  • ** value - A cp.ui.PopUpButton which contains the text value.
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/InspectorProperty.lua line 461

# section

| | | | --------------------------------------------|-------------------------------------------------------------------------------------| | 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 acp.propwith the following built-in additional properties:</li><li> **enabled - acp.ui.CheckBoxwhich reports if the section row is enabled.</li><li> **toggle - acp.ui.Buttonwhich will toggle the show/hide button (if present)</li><li> **reset - acp.ui.Buttonwhich will reset the sub-property values, if present in the UI.</li><li> **expanded - acp.prop` which reports if the section is currently expanded. | | Examples | None | | Source | src/extensions/cp/apple/finalcutpro/inspector/InspectorProperty.lua line 99 |


# simple

Signature cp.apple.finalcutpro.inspector.InspectorProperty.simple(labelKey[, prepareFn][, index]]) -> cp.prop <cp.ui.PropertyRow; read-only>
Type Function
Description Creates a new cp.prop that contains a PropertyRow matching the labelKey.
Parameters
  • labelKey - The I18N key that the row lable matches.
  • prepareFn - The function to call to perform additional preparations on the row.
  • index - The instance number of that label (defaults to 1).
Returns
  • The cp.prop that returns the PropertyRow.
Notes
  • It has no additional properties, but it does allow a prepareFn to be provided, which will be called after the PropertyRow is created, and passed the new PropertyRow as the first argument.
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/InspectorProperty.lua line 268

# slider

Signature cp.apple.finalcutpro.inspector.InspectorProperty.slider(labelKey[, index]) -> cp.prop <cp.ui.PropertyRow; read-only>
Type Function
Description Creates a new cp.prop that contains a PropertyRow matching the labelKey.
Parameters
  • labelKey - The I18N key that the row lable matches.
  • index - The instance number of that label (defaults to 1).
Returns
  • The cp.prop that returns the PropertyRow.
Notes
  • It has one additional property:
  • ** value - A cp.ui.TextField which contains the value of the slider.
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/InspectorProperty.lua line 401

# staticText

Signature cp.apple.finalcutpro.inspector.InspectorProperty.staticText(labelKey[, index]) -> cp.prop <cp.ui.PropertyRow; read-only>
Type Function
Description Creates a new cp.prop that contains a PropertyRow matching the labelKey.
Parameters
  • labelKey - The I18N key that the row lable matches.
  • index - The instance number of that label (defaults to 1).
Returns
  • The cp.prop that returns the PropertyRow.
Notes
  • It has one additional property:
  • ** value - A cp.ui.StaticText which contains the text value.
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/InspectorProperty.lua line 359

# textField

Signature cp.apple.finalcutpro.inspector.InspectorProperty.textField(labelKey[, index]) -> cp.prop <cp.ui.PropertyRow; read-only>
Type Function
Description Creates a new cp.prop that contains a PropertyRow matching the labelKey.
Parameters
  • labelKey - The I18N key that the row lable matches.
  • index - The instance number of that label (defaults to 1).
Returns
  • The cp.prop that returns the PropertyRow.
Notes
  • It has one additional property:
  • ** value - A cp.ui.TextField which contains the text value.
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/InspectorProperty.lua line 319

# xy

Signature cp.apple.finalcutpro.inspector.InspectorProperty.xy(labelKey[, index]) -> cp.prop <cp.ui.PropertyRow; read-only>
Type Function
Description Creates a new cp.prop that contains a PropertyRow matching the labelKey.
Parameters
  • labelKey - The I18N key that the row lable matches.
  • index - The instance number of that label (defaults to 1).
Returns
  • The cp.prop that returns the PropertyRow.
Notes
  • It has two additional properties:
  • ** x - A cp.ui.TextField containing the 'X' value.
  • ** y - A cp.ui.TextField containing the Y value.
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/InspectorProperty.lua line 379