# cp.apple.finalcutpro.inspector.color.ColorPuck

Color ColorPuck Module.


# API Overview

Constants - Useful values which cannot be changed

  • DEFAULT_ANGLES
  • ELASTICITY
  • NATURAL_LENGTH
  • RANGE

Functions - API calls offered directly by the extension

  • matches

Constructors - API calls which return an object, typically one that offers API methods

  • ColorPuck

Fields - Variables which can only be accessed from an object returned by a constructor

  • angle
  • label
  • percent
  • row
  • skimming

Methods - API calls which can only be made on an object returned by a constructor

  • accumulate
  • cleanup
  • colorMarker
  • contentUI
  • doReset
  • doSelect
  • doShiftPercent
  • doShow
  • drawMarker
  • getArc
  • getBrightness
  • hasAngle
  • index
  • loop
  • reset
  • select
  • shiftAngle
  • shiftPercent
  • show
  • start
  • stop

# API Documentation

# Constants

# DEFAULT_ANGLES

Signature cp.apple.finalcutpro.inspector.color.ColorPuck.DEFAULT_ANGLES -> table
Type Constant
Description The table of default angles for the various pucks (1-4).
Notes None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 47

# ELASTICITY

Signature cp.apple.finalcutpro.inspector.color.ColorPuck.ELASTICITY -> number
Type Constant
Description Elasticity as number.
Notes None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 42

# NATURAL_LENGTH

Signature cp.apple.finalcutpro.inspector.color.ColorPuck.NATURAL_LENGTH -> number
Type Constant
Description Natural Length as number.
Notes None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 37

# RANGE

Signature cp.apple.finalcutpro.inspector.color.ColorPuck.RANGE -> table
Type Constant
Description Table of puck ranges.
Notes None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 32

# Functions

# matches

Signature cp.apple.finalcutpro.inspector.color.ColorPuck.matches(element) -> boolean
Type Function
Description Checks to see if an element matches what we think it should be.
Parameters
  • element - An axuielementObject to check.
Returns
  • true if matches otherwise false
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 77

# Constructors

# ColorPuck

Signature cp.apple.finalcutpro.inspector.color.ColorPuck(parent, puckNumber, labelKeys, hasAngle) -> ColorPuck
Type Constructor
Description Creates a new ColorPuck object
Parameters
  • parent - The parent
  • puckNumber - The puck number
  • labelKeys - Label Keys
  • hasAngle - If true, the puck has an angle parameter.
Returns
  • A ColorInspector object
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 90

# Fields

# angle

Signature cp.apple.finalcutpro.inspector.color.ColorPuck.angle <cp.ui.TextField>
Type Field
Description The 'angle' text field (only present for the 'color' aspect).
Notes None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 172

# label

Signature cp.apple.finalcutpro.inspector.color.ColorPuck.label <cp.prop: string; read-only>
Type Field
Description The human-readable label for the puck, in FCPX's current language.
Notes None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 155

# percent

Signature cp.apple.finalcutpro.inspector.color.ColorPuck.percent <cp.prop: TextField>
Type Field
Description The 'percent' text field.
Notes None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 162

# row

Signature cp.apple.finalcutpro.inspector.color.ColorPuck.row <cp.prop: PropertyRow>
Type Field
Description Finds the 'row' for the property type.
Notes None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 148

# skimming

Signature cp.apple.finalcutpro.inspector.color.ColorPuck.skimming <cp.prop: boolean>
Type Field
Description The Skimming Preferences value.
Notes None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 141

# Methods

# accumulate

Signature cp.apple.finalcutpro.inspector.color.ColorPuck:accumulate(xShift, yShift) -> none
Type Method
Description Accumulate's the Shift Values.
Parameters
  • xShift - x value as number
  • yShift - y value as number
Returns
  • x - Accumulated x value as number
  • y - Accumulated y value as number
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 582

# cleanup

Signature cp.apple.finalcutpro.inspector.color.ColorPuck:cleanup() -> none
Type Method
Description Cleans up the Color ColorPuck drawings.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 551

# colorMarker

Signature cp.apple.finalcutpro.inspector.color.ColorPuck:colorMarker(pct, angle) -> none
Type Method
Description Draws a Color Marker.
Parameters
  • pct - Percentage
  • angle - Angle
Returns
  • None
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 499

# contentUI

Signature cp.apple.finalcutpro.inspector.color.ColorPuck:contentUI() -> axuielementObject
Type Method
Description Returns the Content Accessibility Object
Parameters
  • None
Returns
  • An axuielementObject or nil
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 128

# doReset

Signature cp.apple.finalcutpro.inspector.color.ColorPuck:doReset() -> cp.rx.go.Statement
Type Method
Description A Statement that resets the puck to its default settings.
Parameters
  • None
Returns
  • The Statement, resolving to true if successful, or throwing an error if not.
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 358

# doSelect

Signature cp.apple.finalcutpro.inspector.color.ColorPuck:doSelect() -> cp.rx.go.Statement
Type Method
Description A Statement that selects this puck.
Parameters
  • None
Returns
  • The Statement, resolving to true if successful or throwing an error if no.
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 260

# doShiftPercent

Signature cp.apple.finalcutpro.inspector.color.ColorPuck:doShiftPercent(amount) -> cp.rx.go.Statement
Type Method
Description A Statement that shifts the percent value by the provide amount.
Parameters
  • amount - The amount to shift the percent value.
Returns
  • The Statement, resolving to the updated percent value, or throwing an error if there is a problem.
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 301

# doShow

Signature cp.apple.finalcutpro.inspector.color.ColorPuck:doShow() -> cp.rx.go.Statement
Type Method
Description A Statement that shows the Color ColorPuck.
Parameters
  • None
Returns
  • The Statement, resolving to true if successful or sending an error if not.
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 226

# drawMarker

Signature cp.apple.finalcutpro.inspector.color.ColorPuck:drawMarker() -> none
Type Method
Description Draws a marker.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 464

# getArc

Signature cp.apple.finalcutpro.inspector.color.ColorPuck:getArc() -> number
Type Method
Description Gets the arc value.
Parameters
  • None
Returns
  • The arc value as number.
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 445

# getBrightness

Signature cp.apple.finalcutpro.inspector.color.ColorPuck:getBrightness() -> number
Type Method
Description Gets the brightness value.
Parameters
  • None
Returns
  • The brightness value as number.
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 422

# hasAngle

Signature cp.apple.finalcutpro.inspector.color.ColorPuck:hasAngle() -> boolean
Type Method
Description Indicates if the puck has an angle parameter. The angle cp.prop will always exist regardless, but if this is false, it will never return a result.
Parameters
  • None
Returns
  • true if the puck has an angle.
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 199

# index

Signature cp.apple.finalcutpro.inspector.color.ColorPuck:index() -> number
Type Method
Description Returns the puck number (1 through 4).
Parameters
  • None
Returns
  • The puck number.
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 186

# loop

Signature cp.apple.finalcutpro.inspector.color.ColorPuck:loop() -> none
Type Method
Description Loops the Color ColorPuck function.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 615

# reset

Signature cp.apple.finalcutpro.inspector.color.ColorPuck:reset() -> cp.apple.finalcutpro.inspector.color.ColorPuck
Type Method
Description Resets the puck to its default settings.
Parameters
  • None
Returns
  • The ColorPuck instance.
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 343

# select

Signature cp.apple.finalcutpro.inspector.color.ColorPuck:select() -> cp.apple.finalcutpro.inspector.color.ColorPuck
Type Method
Description Selects this puck.
Parameters
  • None
Returns
  • The ColorPuck instance.
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 239

# shiftAngle

Signature cp.apple.finalcutpro.inspector.color.ColorPuck:shiftAngle(amount) -> cp.apple.finalcutpro.inspector.color.ColorPuck
Type Method
Description Shifts the angle value by the provide amount.
Parameters
  • amount - The amount to shift the angle value.
Returns
  • The ColorPuck instance.
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 318

# shiftPercent

Signature cp.apple.finalcutpro.inspector.color.ColorPuck:shiftPercent(amount) -> cp.apple.finalcutpro.inspector.color.ColorPuck
Type Method
Description Shifts the percent value by the provide amount.
Parameters
  • amount - The amount to shift the percent value.
Returns
  • The updated value.
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 284

# show

Signature cp.apple.finalcutpro.inspector.color.ColorPuck:show() -> cp.apple.finalcutpro.inspector.color.ColorPuck
Type Method
Description Shows the Color ColorPuck
Parameters
  • None
Returns
  • The cp.apple.finalcutpro.inspector.color.ColorPuck object for method chaining.
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 212

# start

Signature cp.apple.finalcutpro.inspector.color.ColorPuck:start() -> cp.apple.finalcutpro.inspector.color.ColorPuck
Type Method
Description Starts a Color ColorPuck.
Parameters
  • None
Returns
  • The ColorPuck instance.
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 375

# stop

Signature cp.apple.finalcutpro.inspector.color.ColorPuck:stop() -> none
Type Method
Description Stops a Color ColorPuck.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/inspector/color/ColorPuck.lua line 538