Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Latest commit

 

History

History
233 lines (200 loc) · 18.9 KB

plugins.finalcutpro.hud.manager.md

File metadata and controls

233 lines (200 loc) · 18.9 KB

docs » plugins.finalcutpro.hud.manager


Manager for the Final Cut Pro HUD.

API Overview

API Documentation

Constants

Signature plugins.finalcutpro.hud.manager.DEFAULT_HEIGHT -> number
Type Constant
Description Default Height of HUD
Signature plugins.finalcutpro.hud.manager.DEFAULT_WIDTH -> number
Type Constant
Description Default Width of HUD
Signature plugins.finalcutpro.hud.manager.lastTab
Type Constant
Description Returns the last tab saved in settings.
Signature plugins.finalcutpro.hud.manager.position
Type Constant
Description Returns the last frame saved in settings.

Variables

Signature plugins.finalcutpro.hud.manager._handlers -> table
Type Variable
Description Table containing handlers.
Signature plugins.finalcutpro.hud.manager._panels -> table
Type Variable
Description Table containing panels.

Functions

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
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.
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
Signature plugins.finalcutpro.hud.manager.delete()
Type Function
Description Deletes the existing HUD if it exists
Parameters
  • None
Returns
  • None
Signature plugins.finalcutpro.hud.manager.getHandler(id) -> string
Type Function
Description Returns the handler for a given ID.
Parameters
  • id - The ID
Returns
  • Table
Signature plugins.finalcutpro.hud.manager.getLabel() -> string
Type Function
Description Returns the Webview label.
Parameters
  • None
Returns
  • The Webview label as a string.
Signature plugins.finalcutpro.hud.manager.getWebview() -> hs.webview
Type Function
Description Returns the Webview of the HUD.
Parameters
  • None
Returns
  • A hs.webview
Signature plugins.finalcutpro.hud.manager.hide() -> none
Type Function
Description Hides the HUD.
Parameters
  • None
Returns
  • None
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
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.
Signature plugins.finalcutpro.hud.manager.new() -> none
Type Function
Description Creates a new HUD.
Parameters
  • None
Returns
  • None
Signature plugins.finalcutpro.hud.manager.refresh() -> none
Type Function
Description Refreshes the HUD.
Parameters
  • None
Returns
  • None
Signature plugins.finalcutpro.hud.manager.resize()
Type Function
Description Resizes the HUD.
Parameters
  • height - The new height of the HUD as number.
Returns
  • None
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
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
Signature plugins.finalcutpro.hud.manager.update() -> none
Type Function
Description Enables or Disables the HUD.
Parameters
  • None
Returns
  • None
Signature plugins.finalcutpro.hud.manager.updatePosition() -> none
Type Function
Description Updates the HUD position.
Parameters
  • None
Returns
  • None
Signature plugins.finalcutpro.hud.manager.updateVisibility() -> none
Type Function
Description Update the visibility of the HUD.
Parameters
  • None
Returns
  • None

Fields

Signature plugins.finalcutpro.hud.manager.enabled <cp.prop: boolean>
Type Field
Description Is the HUD enabled in the settings?