#cp.apple.finalcutpro.timeline.Contents

Timeline Contents Module.


#API Overview

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

#Functions

Signaturecp.apple.finalcutpro.timeline.Contents:clipsUI(expandedGroups, filterFn) -> table of axuielements
TypeFunction
DescriptionReturns a table containing the list of clips in the Timeline.
Parameters
  • expandGroups - (optional) if true, expand AXGroups to include contained AXLayoutItems
  • filterFn - (optional) if provided, the function will be called to check each clip
Returns
  • The table of axuielements that match the conditions
Notes
  • If expandsGroups is true any AXGroup items will be expanded to the list of contained AXLayoutItems.
  • If filterFn is provided it will be called with a single argument to check if the provided clip should be included in the final table.
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 274

Signaturecp.apple.finalcutpro.timeline.Contents.matches(element) -> boolean
TypeFunction
DescriptionChecks if an axuielementObject matches the Contents type.
Parameters
  • element - An axuielementObject to check.
Returns
  • true if it matches, otherwise false.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 28

Signaturecp.apple.finalcutpro.timeline.Contents:playheadClipsUI(expandedGroups, filterFn) -> table of axuielements
TypeFunction
DescriptionReturns a table array containing the list of clips in the Timeline under the playhead, ordered with the highest clips at the beginning of the array.
Parameters
  • expandGroups - (optional) if true, expand AXGroups to include contained AXLayoutItems
  • filterFn - (optional) if provided, the function will be called to check each clip
Returns
  • The table of axuielements that match the conditions
Notes
  • If expandsGroups is true any AXGroup items will be expanded to the list of contained AXLayoutItems.
  • If filterFn is provided it will be called with a single argument to check if the provided clip should be included in the final table.
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 345

Signaturecp.apple.finalcutpro.timeline.Contents:positionClipsUI(position, expandedGroups, filterFn) -> table of axuielements
TypeFunction
DescriptionReturns a table array containing the list of clips in the Timeline at the specified position, ordered with the highest clips at the beginning of the array.
Parameters
  • position - The X (or horizontal) position value to find clips under.
  • expandGroups - (optional) if true, expand AXGroups to include contained AXLayoutItems
  • filterFn - (optional) if provided, the function will be called to check each clip
Returns
  • The table of axuielements that match the conditions
Notes
  • If expandsGroups is true any AXGroup items will be expanded to the list of contained AXLayoutItems.
  • If filterFn is provided it will be called with a single argument to check if the provided clip should be included in the final table.
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 318

Signaturecp.apple.finalcutpro.timeline.Contents:skimmingPlayheadClipsUI(expandedGroups, filterFn) -> table of axuielements
TypeFunction
DescriptionReturns a table array containing the list of clips in the Timeline under the skimming playhead, ordered with the highest clips at the beginning of the array.
Parameters
  • expandGroups - (optional) if true, expand AXGroups to include contained AXLayoutItems
  • filterFn - (optional) if provided, the function will be called to check each clip
Returns
  • The table of axuielements that match the conditions
Notes
  • If expandsGroups is true any AXGroup items will be expanded to the list of contained AXLayoutItems.
  • If filterFn is provided it will be called with a single argument to check if the provided clip should be included in the final table.
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 363

#Constructors

Signaturecp.apple.finalcutpro.timeline.Contents(parent) -> Contents
TypeConstructor
DescriptionCreates a new Timeline Contents instance.
Parameters
  • parent - The parent Timeline
Returns
  • A new Contents object.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 43

#Fields

Signaturecp.apple.finalcutpro.timeline.Contents.children <cp.prop: table; read-only; live>
TypeField
DescriptionThe current set of child elements in the Contents.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 115

Signaturecp.apple.finalcutpro.timeline.Contents.isLoaded <cp.prop: booelan; read-only; live>
TypeField
DescriptionChecks if the Timeline has content loaded.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 139

Signaturecp.apple.finalcutpro.timeline.Contents.playhead <cp.apple.finalcutpro.main.Playhead>
TypeField
DescriptionThe main Playhead.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 196

Signaturecp.apple.finalcutpro.timeline.Contents.scrollArea <cp.ui.ScrollArea>
TypeField
DescriptionThe ScrollArea for the Contents element.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 94

Signaturecp.apple.finalcutpro.timeline.Contents.scrollAreaUI <cp.prop: hs.axuielement; read-only; live>
TypeField
DescriptionThe parent ScrollArea UI of the Timeline Contents area.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 84

Signaturecp.apple.finalcutpro.timeline.Contents.selectedChildren <cp.prop: table; read-only; live>
TypeField
DescriptionThe current set of selected child elements in the Contents.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 127

Signaturecp.apple.finalcutpro.timeline.Contents.skimmingPlayhead <cp.apple.finalcutpro.main.Playhead>
TypeField
DescriptionThe Playhead that tracks with the mouse pointer.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 203

Signaturecp.apple.finalcutpro.timeline.Contents.viewFrame <cp.prop: table; read-only; live>
TypeField
DescriptionThe current 'frame' of the internal timeline content, or nil if not available.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 108

#Methods

Signaturecp.apple.finalcutpro.timeline.Contents:activePlayhead() -> Playhead
TypeMethod
DescriptionReturns the active Playhead. If the Skimming Playhead is available, return that, otherwise, return the normal Playhead.
Parameters
  • None
Returns
  • The active Playhead.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 211

Signaturecp.apple.finalcutpro.timeline.Contents:doFocus(show) -> cp.rx.go.Statement
TypeMethod
DescriptionA Statement which will focus on the Contents.
Parameters
  • show - if true, the Contents will be shown before focusing.
Returns
  • The Statement.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 576

Signaturecp.apple.finalcutpro.timeline.Contents:doHide() -> cp.rx.go.Statement
TypeMethod
DescriptionA Statement that will attempt to hide the Timeline Contents.
Parameters
  • None
Returns
  • The Statement.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 177

Signaturecp.apple.finalcutpro.timeline.Contents:doSelectClip(clipUI) -> cp.rx.go.Statement
TypeMethod
DescriptionA Statement which will select the specified single hs.axuielement value in the Timeline Contents area.
Parameters
  • clipUI - The hs._asm.axuilement values to select.
Returns
  • A Statement that will select the clip or throw an error if there is an issue.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 529

Signaturecp.apple.finalcutpro.timeline.Contents:doSelectClips(clipsUI) -> cp.rx.go.Statement
TypeMethod
DescriptionA Statement which will select the specified list of hs.axuielement values in the Timeline Contents area.
Parameters
  • clipsUI - The table of hs._asm.axuilement values to select.
Returns
  • A Statement that will select the clips or throw an error if there is an issue.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 502

Signaturecp.apple.finalcutpro.timeline.Contents:doSelectNone() -> cp.rx.go.Statement
TypeMethod
DescriptionReturns a Statement that will clear any clip selection.
Parameters
  • None
Returns
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 480

Signaturecp.apple.finalcutpro.timeline.Contents:doSelectTopClip([position]) -> cp.rx.go.Statement
TypeMethod
DescriptionCreates a Statement that will select the top clip at the given position, resolving to the top clip if available.
Parameters
  • position - (optional) The position table to select the top clip at. If not provided, the current active playhead position is used.
Returns
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 550

Signaturecp.apple.finalcutpro.timeline.Contents:doShow() -> cp.rx.go.Statement
TypeMethod
DescriptionA Statement that will attempt to show the Timeline Contents.
Parameters
  • None
Returns
  • The Statement.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 158

Signaturecp.apple.finalcutpro.timeline.Contents:rangeSelectionUI() -> axuielements
TypeMethod
DescriptionReturns the UI for the current 'Range Selection', if present.
Parameters
  • None
Returns
  • The 'Range Selection' UI or nil
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 300

Signaturecp.apple.finalcutpro.timeline.Contents:selectedClipsUI(expandedGroups, filterFn) -> table of axuielements
TypeMethod
DescriptionReturns a table containing the list of selected clips.
Parameters
  • expandGroups - (optional) if true, expand AXGroups to include contained AXLayoutItems
  • filterFn - (optional) if provided, the function will be called to check each clip
Returns
  • The table of selected axuielements that match the conditions
Notes
  • If expandsGroups is true any AXGroup items will be expanded to the list of contained AXLayoutItems.
  • If filterFn is provided it will be called with a single argument to check if the provided clip should be included in the final table.
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 252