# plugins.finalcutpro.hud.manager

Manager for the Final Cut Pro HUD.


# API Overview

Constants - Useful values which cannot be changed

  • DEFAULT_HEIGHT
  • DEFAULT_WIDTH
  • lastTab
  • position

Variables - Configurable values

  • _handlers
  • _panels

Functions - API calls offered directly by the extension

  • addHandler
  • addPanel
  • currentPanelID
  • delete
  • getHandler
  • getLabel
  • getWebview
  • hide
  • injectScript
  • maxPanelHeight
  • new
  • refresh
  • resize
  • selectPanel
  • show
  • update
  • updatePosition
  • updateVisibility

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

  • enabled

# API Documentation

# Constants

# DEFAULT_HEIGHT

Signature plugins.finalcutpro.hud.manager.DEFAULT_HEIGHT -> number
Type Constant
Description Default Height of HUD
Notes None
Source src/plugins/finalcutpro/hud/manager/init.lua line 73

# DEFAULT_WIDTH

Signature plugins.finalcutpro.hud.manager.DEFAULT_WIDTH -> number
Type Constant
Description Default Width of HUD
Notes None
Source src/plugins/finalcutpro/hud/manager/init.lua line 78

# lastTab

Signature plugins.finalcutpro.hud.manager.lastTab
Type Constant
Description Returns the last tab saved in settings.
Notes None
Source src/plugins/finalcutpro/hud/manager/init.lua line 103

# position

Signature plugins.finalcutpro.hud.manager.position
Type Constant
Description Returns the last frame saved in settings.
Notes None
Source src/plugins/finalcutpro/hud/manager/init.lua line 98

# Variables

# _handlers

Signature plugins.finalcutpro.hud.manager._handlers -> table
Type Variable
Description Table containing handlers.
Notes None
Source src/plugins/finalcutpro/hud/manager/init.lua line 88

# _panels

Signature plugins.finalcutpro.hud.manager._panels -> table
Type Variable
Description Table containing panels.
Notes None
Source src/plugins/finalcutpro/hud/manager/init.lua line 83

# Functions

# addHandler

Signature plugins.finalcutpro.hud.manager.addHandler(id, handlerFn) -> string
Type Function
Description Adds a Handler
Parameters
  • id - The ID
  • handlerFn - the handler function
Returns
  • Nothing
Notes None
Examples None
Source src/plugins/finalcutpro/hud/manager/init.lua line 134

# addPanel

Signature plugins.finalcutpro.hud.manager.addPanel(params) -> plugins.finalcutpro.hud.manager.panel
Type Function
Description Adds a new panel with the specified params to the HUD manager.
Parameters
  • params - The parameters table. Details below.
Returns
  • The new panel instance.
Notes
  • The params can have the following properties. The priority and id and properties are required.
  • ** priority - An integer value specifying the priority of the panel compared to others.
  • ** id - A string containing the unique ID of the panel.
  • ** label - The human-readable label for the panel icon.
  • ** image - The hs.image for the panel icon.
  • ** tooltip - The human-readable details for the toolbar icon when the mouse is hovering over it.
  • ** openFn - A callback function that's triggered when the panel is opened.
  • ** closeFn - A callback function that's triggered when the panel is closed.
  • ** loadedFn - A callback function that's triggered when the panel is loaded.
Examples None
Source src/plugins/finalcutpro/hud/manager/init.lua line 789

# currentPanelID

Signature plugins.finalcutpro.hud.manager.currentPanelID() -> string
Type Function
Description Returns the panel ID with the highest priority.
Parameters
  • None
Returns
  • The panel ID as a string
Notes None
Examples None
Source src/plugins/finalcutpro/hud/manager/init.lua line 179

# delete

Signature plugins.finalcutpro.hud.manager.delete()
Type Function
Description Deletes the existing HUD if it exists
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/finalcutpro/hud/manager/init.lua line 613

# getHandler

Signature plugins.finalcutpro.hud.manager.getHandler(id) -> string
Type Function
Description Returns the handler for a given ID.
Parameters
  • id - The ID
Returns
  • Table
Notes None
Examples None
Source src/plugins/finalcutpro/hud/manager/init.lua line 148

# getLabel

Signature plugins.finalcutpro.hud.manager.getLabel() -> string
Type Function
Description Returns the Webview label.
Parameters
  • None
Returns
  • The Webview label as a string.
Notes None
Examples None
Source src/plugins/finalcutpro/hud/manager/init.lua line 121

# getWebview

Signature plugins.finalcutpro.hud.manager.getWebview() -> hs.webview
Type Function
Description Returns the Webview of the HUD.
Parameters
  • None
Returns
  • A hs.webview
Notes None
Examples None
Source src/plugins/finalcutpro/hud/manager/init.lua line 108

# hide

Signature plugins.finalcutpro.hud.manager.hide() -> none
Type Function
Description Hides the HUD.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/finalcutpro/hud/manager/init.lua line 597

# injectScript

Signature plugins.finalcutpro.hud.manager.injectScript(script) -> none
Type Function
Description Injects JavaScript into the HUD Webview.
Parameters
  • script - The JavaScript code you want to inject in the form of a string.
Returns
  • None
Notes None
Examples None
Source src/plugins/finalcutpro/hud/manager/init.lua line 672

# maxPanelHeight

Signature plugins.finalcutpro.hud.manager.maxPanelHeight() -> number
Type Function
Description Returns the maximum size defined by a panel.
Parameters
  • None
Returns
  • The maximum panel height.
Notes None
Examples None
Source src/plugins/finalcutpro/hud/manager/init.lua line 411

# new

Signature plugins.finalcutpro.hud.manager.new() -> none
Type Function
Description Creates a new HUD.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/finalcutpro/hud/manager/init.lua line 476

# refresh

Signature plugins.finalcutpro.hud.manager.refresh() -> none
Type Function
Description Refreshes the HUD.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/finalcutpro/hud/manager/init.lua line 650

# resize

Signature plugins.finalcutpro.hud.manager.resize()
Type Function
Description Resizes the HUD.
Parameters
  • height - The new height of the HUD as number.
Returns
  • None
Notes None
Examples None
Source src/plugins/finalcutpro/hud/manager/init.lua line 630

# selectPanel

Signature plugins.finalcutpro.hud.manager.selectPanel([id]) -> none
Type Function
Description Selects a HUD Panel.
Parameters
  • id - the optional ID of the panel you want to select. If no ID is supplied then the current panel ID will be used.
Returns
  • None
Notes None
Examples None
Source src/plugins/finalcutpro/hud/manager/init.lua line 691

# show

Signature plugins.finalcutpro.hud.manager.show() -> boolean
Type Function
Description Shows the HUD
Parameters
  • None
Returns
  • True if successful or nil if an error occurred
Notes None
Examples None
Source src/plugins/finalcutpro/hud/manager/init.lua line 569

# update

Signature plugins.finalcutpro.hud.manager.update() -> none
Type Function
Description Enables or Disables the HUD.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/finalcutpro/hud/manager/init.lua line 911

# updatePosition

Signature plugins.finalcutpro.hud.manager.updatePosition() -> none
Type Function
Description Updates the HUD position.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/finalcutpro/hud/manager/init.lua line 881

# updateVisibility

Signature plugins.finalcutpro.hud.manager.updateVisibility() -> none
Type Function
Description Update the visibility of the HUD.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/finalcutpro/hud/manager/init.lua line 865

# Fields

# enabled

Signature plugins.finalcutpro.hud.manager.enabled <cp.prop: boolean>
Type Field
Description Is the HUD enabled in the settings?
Notes None
Source src/plugins/finalcutpro/hud/manager/init.lua line 68