#cp.apple.finalcutpro.timeline.Role

Extends Row

Represents a Role in the Timeline Index.


#API Overview

Constants - Useful values which cannot be changed

Functions - API calls offered directly by the extension

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

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

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


#API Documentation

#Constants

Signaturecp.apple.finalcutpro.timeline.Role.TITLE_KEY <table>
TypeConstant
DescriptionContains the list of strings used for default roles.
Notes
  • CAPTIONS - "Captions"
  • VIDEO - "Video"
  • TITLES - "Titles"
  • DIALOGUE - "Dialogue"
  • MUSIC - "Music"
  • EFFECTS - "Effects"
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Role.lua line 25

Signaturecp.apple.finalcutpro.timeline.Role.TYPE <table>
TypeConstant
DescriptionContains the set of role types.
Notes
  • VIDEO - A Video Role
  • AUDIO - An Audio Role
  • CAPTION - A Caption Role
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Role.lua line 45

#Functions

Signaturecp.apple.finalcutpro.timeline.Role.findTitle(title) -> string
TypeFunction
DescriptionChecks 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
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Role.lua line 87

Signaturecp.apple.finalcutpro.timeline.Role.is(thing) -> boolean
TypeFunction
DescriptionChecks if the thing is a Role.
Parameters
  • thing - The thing to check
Returns
  • true if the thing is a Table instance.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Role.lua line 74

Signaturecp.apple.finalcutpro.timeline.Role.matches(element) -> boolean
TypeFunction
DescriptionChecks if the element is a Role.
Parameters
  • element - the axuielement to check.
Returns
  • true if it matches, otherwise false.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Role.lua line 59

#Constructors

Signaturecp.apple.finalcutpro.timeline.Role(parent, uiFinder, type)
TypeConstructor
DescriptionCreates 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.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Role.lua line 109

#Fields

Signaturecp.apple.finalcutpro.timeline.Role.active <cp.ui.CheckBox>
TypeField
DescriptionThe CheckBox that determines if the Role is active in the timeline.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Role.lua line 159

Signaturecp.apple.finalcutpro.timeline.Role.cellUI <cp.prop: axuielement; read-only>
TypeField
DescriptionThe AXCell axuielement containing the Role details.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Role.lua line 141

Signaturecp.apple.finalcutpro.timeline.Role.subroleRow <cp.prop: boolean; read-only>
TypeField
DescriptionThis is true if the Role is an Subrole Row.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Role.lua line 150

Signaturecp.apple.finalcutpro.timeline.Role.title <cp.ui.StaticText>
TypeField
DescriptionThe StaticText containing the title.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Role.lua line 168

#Methods

Signaturecp.apple.finalcutpro.timeline.Role:doActivate() -> cp.rx.go.Statement.md
TypeMethod
DescriptionA Statement that will activate the current role, if possible.
Parameters
  • None
Returns
  • Statement
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Role.lua line 177

Signaturecp.apple.finalcutpro.timeline.Role:doDeactivate() -> cp.rx.go.Statement.md
TypeMethod
DescriptionA Statement that will deactivate the current role, if possible.
Parameters
  • None
Returns
  • Statement
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Role.lua line 190

Signaturecp.apple.finalcutpro.timeline.Role:type() -> cp.apple.finalcut.timeline.Role.TYPE
TypeMethod
DescriptionReturns the type of Role this is.
Parameters
  • None
Returns
  • Role Type
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Role.lua line 128