cp.apple.finalcutpro.timeline.Role

Extends Row

Represents a Role in the Timeline Index.


API Overview

Constants - Useful values which cannot be changed

  • TITLE_KEY
  • TYPE

Functions - API calls offered directly by the extension

  • findTitle
  • is
  • matches

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

  • Role

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

  • active
  • cellUI
  • subroleRow
  • title

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

  • doActivate
  • doDeactivate
  • type

API Documentation

Constants

TITLE_KEY

   
Signature cp.apple.finalcutpro.timeline.Role.TITLE_KEY <table>
Type Constant
Description Contains the list of strings used for default roles.
Notes
  • CAPTIONS - "Captions"
  • VIDEO - "Video"
  • TITLES - "Titles"
  • DIALOGUE - "Dialogue"
  • MUSIC - "Music"
  • EFFECTS - "Effects"
Source src/extensions/cp/apple/finalcutpro/timeline/Role.lua line 25

TYPE

   
Signature cp.apple.finalcutpro.timeline.Role.TYPE <table>
Type Constant
Description Contains the set of role types.
Notes
  • VIDEO - A Video Role
  • AUDIO - An Audio Role
  • CAPTION - A Caption Role
Source src/extensions/cp/apple/finalcutpro/timeline/Role.lua line 45

Functions

findTitle

   
Signature cp.apple.finalcutpro.timeline.Role.findTitle(title) -> string
Type Function
Description Checks if FCPX is not currently running in English, it will check if the title is one of the default English Role titles, and return the current language instead. If it's not found, unmodified title is returned.
Parameters
  • title - A string to find.
Returns
  • A string
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/timeline/Role.lua line 87

is

   
Signature cp.apple.finalcutpro.timeline.Role.is(thing) -> boolean
Type Function
Description Checks if the thing is a Role.
Parameters
  • thing - The thing to check
Returns
  • true if the thing is a Table instance.
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/timeline/Role.lua line 74

matches

   
Signature cp.apple.finalcutpro.timeline.Role.matches(element) -> boolean
Type Function
Description Checks if the element is a Role.
Parameters
  • element - the axuielement to check.
Returns
  • true if it matches, otherwise false.
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/timeline/Role.lua line 59

Constructors

Role

   
Signature cp.apple.finalcutpro.timeline.Role(parent, uiFinder, type)
Type Constructor
Description Creates the new Role. Typically this is not called directly, but rather by one of the subclass roles, such as AudioRole or VideoRole.
Parameters
  • parent - The parent Element
  • uiFinder - The function or cp.prop that provides the axuielement.
  • type - The [#TYPE] of Role.
Returns
  • The new Role instance.
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/timeline/Role.lua line 109

Fields

active

   
Signature cp.apple.finalcutpro.timeline.Role.active <cp.ui.CheckBox>
Type Field
Description The CheckBox that determines if the Role is active in the timeline.
Notes None
Source src/extensions/cp/apple/finalcutpro/timeline/Role.lua line 159

cellUI

   
Signature cp.apple.finalcutpro.timeline.Role.cellUI <cp.prop: axuielement; read-only>
Type Field
Description The AXCell axuielement containing the Role details.
Notes None
Source src/extensions/cp/apple/finalcutpro/timeline/Role.lua line 141

subroleRow

   
Signature cp.apple.finalcutpro.timeline.Role.subroleRow <cp.prop: boolean; read-only>
Type Field
Description This is true if the Role is an Subrole Row.
Notes None
Source src/extensions/cp/apple/finalcutpro/timeline/Role.lua line 150

title

   
Signature cp.apple.finalcutpro.timeline.Role.title <cp.ui.StaticText>
Type Field
Description The StaticText containing the title.
Notes None
Source src/extensions/cp/apple/finalcutpro/timeline/Role.lua line 168

Methods

doActivate

   
Signature cp.apple.finalcutpro.timeline.Role:doActivate() -> cp.rx.go.Statement.md
Type Method
Description A Statement that will activate the current role, if possible.
Parameters
  • None
Returns
  • Statement
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/timeline/Role.lua line 177

doDeactivate

   
Signature cp.apple.finalcutpro.timeline.Role:doDeactivate() -> cp.rx.go.Statement.md
Type Method
Description A Statement that will deactivate the current role, if possible.
Parameters
  • None
Returns
  • Statement
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/timeline/Role.lua line 190

type

   
Signature cp.apple.finalcutpro.timeline.Role:type() -> cp.apple.finalcut.timeline.Role.TYPE
Type Method
Description Returns the type of Role this is.
Parameters
  • None
Returns
  • Role Type
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/timeline/Role.lua line 128