# cp.apple.finalcutpro.timeline.Contents

Timeline Contents Module.


# API Overview

Functions - API calls offered directly by the extension

  • clipsUI
  • matches
  • playheadClipsUI
  • positionClipsUI
  • skimmingPlayheadClipsUI

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

  • Contents

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

  • children
  • isLoaded
  • playhead
  • scrollArea
  • scrollAreaUI
  • selectedChildren
  • skimmingPlayhead
  • viewFrame

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

  • activePlayhead
  • doFocus
  • doHide
  • doSelectClip
  • doSelectClips
  • doSelectNone
  • doSelectTopClip
  • doShow
  • rangeSelectionUI
  • selectedClipsUI

# API Documentation

# Functions

# clipsUI

Signature cp.apple.finalcutpro.timeline.Contents:clipsUI(expandedGroups, filterFn) -> table of axuielements
Type Function
Description Returns 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.
Examples None
Source src/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 274

# matches

Signature cp.apple.finalcutpro.timeline.Contents.matches(element) -> boolean
Type Function
Description Checks if an axuielementObject matches the Contents type.
Parameters
  • element - An axuielementObject to check.
Returns
  • true if it matches, otherwise false.
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 28

# playheadClipsUI

Signature cp.apple.finalcutpro.timeline.Contents:playheadClipsUI(expandedGroups, filterFn) -> table of axuielements
Type Function
Description Returns 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.
Examples None
Source src/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 345

# positionClipsUI

Signature cp.apple.finalcutpro.timeline.Contents:positionClipsUI(position, expandedGroups, filterFn) -> table of axuielements
Type Function
Description Returns 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.
Examples None
Source src/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 318

# skimmingPlayheadClipsUI

Signature cp.apple.finalcutpro.timeline.Contents:skimmingPlayheadClipsUI(expandedGroups, filterFn) -> table of axuielements
Type Function
Description Returns 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.
Examples None
Source src/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 363

# Constructors

# Contents

Signature cp.apple.finalcutpro.timeline.Contents(parent) -> Contents
Type Constructor
Description Creates a new Timeline Contents instance.
Parameters
  • parent - The parent Timeline
Returns
  • A new Contents object.
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 43

# Fields

# children

Signature cp.apple.finalcutpro.timeline.Contents.children <cp.prop: table; read-only; live>
Type Field
Description The current set of child elements in the Contents.
Notes None
Source src/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 115

# isLoaded

Signature cp.apple.finalcutpro.timeline.Contents.isLoaded <cp.prop: booelan; read-only; live>
Type Field
Description Checks if the Timeline has content loaded.
Notes None
Source src/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 139

# playhead

Signature cp.apple.finalcutpro.timeline.Contents.playhead <cp.apple.finalcutpro.main.Playhead>
Type Field
Description The main Playhead.
Notes None
Source src/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 196

# scrollArea

Signature cp.apple.finalcutpro.timeline.Contents.scrollArea <cp.ui.ScrollArea>
Type Field
Description The ScrollArea for the Contents element.
Notes None
Source src/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 94

# scrollAreaUI

Signature cp.apple.finalcutpro.timeline.Contents.scrollAreaUI <cp.prop: hs.axuielement; read-only; live>
Type Field
Description The parent ScrollArea UI of the Timeline Contents area.
Notes None
Source src/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 84

# selectedChildren

Signature cp.apple.finalcutpro.timeline.Contents.selectedChildren <cp.prop: table; read-only; live>
Type Field
Description The current set of selected child elements in the Contents.
Notes None
Source src/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 127

# skimmingPlayhead

Signature cp.apple.finalcutpro.timeline.Contents.skimmingPlayhead <cp.apple.finalcutpro.main.Playhead>
Type Field
Description The Playhead that tracks with the mouse pointer.
Notes None
Source src/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 203

# viewFrame

Signature cp.apple.finalcutpro.timeline.Contents.viewFrame <cp.prop: table; read-only; live>
Type Field
Description The current 'frame' of the internal timeline content, or nil if not available.
Notes None
Source src/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 108

# Methods

# activePlayhead

Signature cp.apple.finalcutpro.timeline.Contents:activePlayhead() -> Playhead
Type Method
Description Returns the active Playhead. If the Skimming Playhead is available, return that, otherwise, return the normal Playhead.
Parameters
  • None
Returns
  • The active Playhead.
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 211

# doFocus

Signature cp.apple.finalcutpro.timeline.Contents:doFocus(show) -> cp.rx.go.Statement
Type Method
Description A Statement which will focus on the Contents.
Parameters
  • show - if true, the Contents will be shown before focusing.
Returns
  • The Statement.
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 576

# doHide

Signature cp.apple.finalcutpro.timeline.Contents:doHide() -> cp.rx.go.Statement
Type Method
Description A Statement that will attempt to hide the Timeline Contents.
Parameters
  • None
Returns
  • The Statement.
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 177

# doSelectClip

Signature cp.apple.finalcutpro.timeline.Contents:doSelectClip(clipUI) -> cp.rx.go.Statement
Type Method
Description A 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.
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 529

# doSelectClips

Signature cp.apple.finalcutpro.timeline.Contents:doSelectClips(clipsUI) -> cp.rx.go.Statement
Type Method
Description A 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.
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 502

# doSelectNone

Signature cp.apple.finalcutpro.timeline.Contents:doSelectNone() -> cp.rx.go.Statement
Type Method
Description Returns a Statement that will clear any clip selection.
Parameters
  • None
Returns
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 480

# doSelectTopClip

Signature cp.apple.finalcutpro.timeline.Contents:doSelectTopClip([position]) -> cp.rx.go.Statement
Type Method
Description Creates 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
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 550

# doShow

Signature cp.apple.finalcutpro.timeline.Contents:doShow() -> cp.rx.go.Statement
Type Method
Description A Statement that will attempt to show the Timeline Contents.
Parameters
  • None
Returns
  • The Statement.
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 158

# rangeSelectionUI

Signature cp.apple.finalcutpro.timeline.Contents:rangeSelectionUI() -> axuielements
Type Method
Description Returns the UI for the current 'Range Selection', if present.
Parameters
  • None
Returns
  • The 'Range Selection' UI or nil
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 300

# selectedClipsUI

Signature cp.apple.finalcutpro.timeline.Contents:selectedClipsUI(expandedGroups, filterFn) -> table of axuielements
Type Method
Description Returns 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.
Examples None
Source src/extensions/cp/apple/finalcutpro/timeline/Contents.lua line 252