docs » plugins.core.watchfolders.manager


Manager for the CommandPost Watch Folders Panel.

Submodules

API Overview

API Documentation

Constants

DEFAULT_HEIGHT

Signature plugins.core.watchfolders.manager.DEFAULT_HEIGHT -> number
Type Constant
Description Default Height of the Watch Folder Window

DEFAULT_TITLE

Signature plugins.core.watchfolders.manager.DEFAULT_TITLE -> number
Type Constant
Description Default Title of the Watch Folder Window

DEFAULT_WIDTH

Signature plugins.core.watchfolders.manager.DEFAULT_WIDTH -> number
Type Constant
Description Default Width of the Watch Folder Window

DEFAULT_WINDOW_STYLE

Signature plugins.core.watchfolders.manager.DEFAULT_WINDOW_STYLE -> table
Type Constant
Description Table of Default Window Style

position

Signature plugins.core.watchfolders.manager.position <cp.prop: table>
Type Constant
Description Returns the last frame saved in settings.

WEBVIEW_LABEL

Signature plugins.core.watchfolders.manager.WEBVIEW_LABEL -> string
Type Constant
Description WebView Label

Functions

addHandler

Signature plugins.core.watchfolders.manager.addHandler(id, handlerFn) -> string
Type Function
Description Adds a Handler
Parameters
  • id - The ID
  • handlerFn - the handler function
Returns
  • Nothing

addPanel

Signature plugins.core.watchfolders.manager.addPanel(params) -> plugins.core.watchfolders.manager.panel
Type Function
Description Adds a new panel with the specified params to the preferences 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.

getHandler

Signature plugins.core.watchfolders.manager.getHandler(id) -> string
Type Function
Description Returns the handler for a given ID.
Parameters
  • id - The ID
Returns
  • Table

getLabel

Signature plugins.core.watchfolders.manager.getLabel() -> string
Type Function
Description Returns the Webview label.
Parameters
  • None
Returns
  • The Webview label as a string.

hide

Signature plugins.core.watchfolders.manager.hide() -> boolean
Type Function
Description Hides the Watch Folders Window
Parameters
  • None
Returns
  • True if successful or nil if an error occurred

init

Signature plugins.core.watchfolders.manager.init() -> none
Type Function
Description Initialises the Watch Folder Manager.
Parameters
  • None
Returns
  • Nothing

injectScript

Signature plugins.core.watchfolders.manager.injectScript(script) -> none
Type Function
Description Injects JavaScript into the Watch Folders Webview.
Parameters
  • script - The JavaScript code you want to inject in the form of a string.
Returns
  • None

maxPanelHeight

Signature plugins.core.watchfolders.manager.maxPanelHeight() -> number
Type Function
Description Gets the maximum panel height as a number
Parameters
  • * None
Returns
  • * A number

selectPanel

Signature plugins.core.watchfolders.manager.selectPanel(id) -> none
Type Function
Description Selects a Preferences Panel.
Parameters
  • id - the ID of the panel you want to select.
Returns
  • None

setPanelRenderer

Signature plugins.core.watchfolders.manager.setPanelRenderer(renderer) -> none
Type Function
Description Sets a Panel Renderer
Parameters
  • renderer - The renderer
Returns
  • None

show

Signature plugins.core.watchfolders.manager.show() -> boolean
Type Function
Description Shows the Watch Folders Window
Parameters
  • None
Returns
  • True if successful or nil if an error occurred

results matching ""

    No results matching ""