# 
        cp.apple.finalcutpro
    
Represents the Final Cut Pro application, providing functions that allow different tasks to be accomplished.
Generally, you will require the cp.apple.finalcutpro module to import it, like so:
local fcp = require "cp.apple.finalcutpro"Then, there are the UpperCase files, which represent the application itself:
- MenuBar- The main menu bar.
- prefs/PreferencesWindow- The preferences window.
- etc...
The fcp variable is the root application. It has functions which allow you to perform tasks or access parts of the UI. For example, to open the Preferences window, you can do this:
fcp.preferencesWindow:show()In general, as long as Final Cut Pro is running, actions can be performed directly, and the API will perform the required operations to achieve it. For example, to toggle the 'Create Optimized Media' checkbox in the 'Import' section of the 'Preferences' window, you can simply do this:
fcp.preferencesWindow.importPanel:toggleCreateOptimizedMedia()The API will automatically open the Preferences window, navigate to the 'Import' panel and toggle the checkbox.
The UpperCase classes also have a variety of UI methods. These will return the axuielement for the relevant GUI element, if it is accessible. If not, it will return nil. These allow direct interaction with the GUI if necessary. It's most useful when adding new functions to UpperCase files for a particular element.
This can also be used to 'wait' for an element to be visible before performing a task. For example, if you need to wait for the Preferences window to finish loading before doing something else, you can do this with the just library:
local just = require "cp.just"
local prefsWindow = fcp.preferencesWindow
local prefsUI = just.doUntil(function() return prefsWindow:UI() end)
if prefsUI then
	-- it's open!
else
	-- it's closed!
endBy using the just library, we can do a loop waiting until the function returns a result that will give up after a certain time period (10 seconds by default).
Of course, we have a specific support function for that already, so you could do this instead:
if fcp.preferencesWindow:isShowing() then
	-- it's open!
else
	-- it's closed!
endNotes: All values/methods/props from delegates can be accessed directly from the cp.apple.finalcutpro instance. For example:
fcp.app:UI() == fcp:UI() -- the same `cp.prop` result.
        # 
        Submodules
    
- cp.apple.finalcutpro.app
- cp.apple.finalcutpro.browser
- cp.apple.finalcutpro.cmd
- cp.apple.finalcutpro.content
- cp.apple.finalcutpro.export
- cp.apple.finalcutpro.import
- cp.apple.finalcutpro.inspector
- cp.apple.finalcutpro.main
- cp.apple.finalcutpro.menu
- cp.apple.finalcutpro.plugins
- cp.apple.finalcutpro.prefs
- cp.apple.finalcutpro.strings
- cp.apple.finalcutpro.timeline
- cp.apple.finalcutpro.viewer
- cp.apple.finalcutpro.workflowextensions
        # 
        API Overview
    
Constants - Useful values which cannot be changed
- ALLOWED_IMPORT_AUDIO_EXTENSIONS 
- ALLOWED_IMPORT_EXTENSIONS 
- ALLOWED_IMPORT_IMAGE_EXTENSIONS 
- ALLOWED_IMPORT_VIDEO_EXTENSIONS 
- EARLIEST_SUPPORTED_VERSION 
- EVENT_DESCRIPTION_PATH 
- FLEXO_LANGUAGES 
- PASTEBOARD_UTI 
- preferences 
- WORKSPACES_PATH 
Variables - Configurable values
- activeCommandSet 
- customWorkspaces 
- openAndSavePanelDefaultPath 
- selectedWorkspace 
Functions - API calls offered directly by the extension
- commandSet 
- matches 
- matches 
- userCommandSetPath 
- workflowExtensionNames 
Constructors - API calls which return an object, typically one that offers API methods
- Color 
- TranscodeMedia 
Fields - Variables which can only be accessed from an object returned by a constructor
- activeCommandSetPath 
- alert 
- audioEnhancements 
- audioLanes 
- audioMeters 
- backgroundTasksDialog 
- browser 
- changePosition 
- color 
- colorBoard 
- colorCorrection 
- commandDescriptions 
- commandEditor 
- commandNames 
- commandPostWorkflowExtension 
- contentUI 
- contentUI 
- deselectAll 
- effects 
- effects 
- eventViewer 
- exportDialog 
- findAndReplaceTitleText 
- fullScreenPlayer 
- generators 
- inspector 
- inspectorUnits 
- isAudioScrubbingEnabled 
- isFrontmost 
- isInstalled 
- isModalDialogOpen 
- isPlaying 
- isPlaying 
- isRunning 
- isShowing 
- isSkimmingEnabled 
- isSupported 
- isUnsupported 
- keywordEditor 
- libraries 
- media 
- mediaImport 
- pan 
- playButton 
- playFullScreen 
- playImage 
- preferencesWindow 
- preset 
- primaryWindow 
- resetDialogWarnings 
- secondaryWindow 
- textArea 
- textLayerLeft 
- textLayerRight 
- timecodeField 
- timeDisplay 
- timeline 
- toolbar 
- transcodeMedia 
- transitions 
- UI 
- validateAudioUnits 
- viewer 
- volume 
Methods - API calls which can only be made on an object returned by a constructor
- activeLibraryPaths 
- closeLibrary 
- defaultCommandSetPath 
- doShortcut 
- getCommandShortcuts 
- getPath 
- importXML 
- keysWithString 
- openLibrary 
- plugins 
- recentLibraryNames 
- recentLibraryPaths 
- scanPlugins 
- selectLibrary 
- string 
- userCommandSets 
