# plugins.core.watchfolders.manager

Manager for the CommandPost Watch Folders Panel.


# Submodules


# API Overview

Constants - Useful values which cannot be changed

  • DEFAULT_HEIGHT
  • DEFAULT_TITLE
  • DEFAULT_WIDTH
  • DEFAULT_WINDOW_STYLE
  • position
  • WEBVIEW_LABEL

Functions - API calls offered directly by the extension

  • addHandler
  • addPanel
  • getHandler
  • getLabel
  • hide
  • init
  • injectScript
  • maxPanelHeight
  • selectPanel
  • setPanelRenderer
  • show

# API Documentation

# Constants

# DEFAULT_HEIGHT

Signature plugins.core.watchfolders.manager.DEFAULT_HEIGHT -> number
Type Constant
Description Default Height of the Watch Folder Window
Notes None
Source src/plugins/core/watchfolders/manager/init.lua line 48

# DEFAULT_TITLE

Signature plugins.core.watchfolders.manager.DEFAULT_TITLE -> number
Type Constant
Description Default Title of the Watch Folder Window
Notes None
Source src/plugins/core/watchfolders/manager/init.lua line 53

# DEFAULT_WIDTH

Signature plugins.core.watchfolders.manager.DEFAULT_WIDTH -> number
Type Constant
Description Default Width of the Watch Folder Window
Notes None
Source src/plugins/core/watchfolders/manager/init.lua line 43

# DEFAULT_WINDOW_STYLE

Signature plugins.core.watchfolders.manager.DEFAULT_WINDOW_STYLE -> table
Type Constant
Description Table of Default Window Style
Notes None
Source src/plugins/core/watchfolders/manager/init.lua line 38

# position

Signature plugins.core.watchfolders.manager.position <cp.prop: table>
Type Constant
Description Returns the last frame saved in settings.
Notes None
Source src/plugins/core/watchfolders/manager/init.lua line 73

# WEBVIEW_LABEL

Signature plugins.core.watchfolders.manager.WEBVIEW_LABEL -> string
Type Constant
Description WebView Label
Notes None
Source src/plugins/core/watchfolders/manager/init.lua line 33

# 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
Notes None
Examples None
Source src/plugins/core/watchfolders/manager/init.lua line 91

# 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.
Examples None
Source src/plugins/core/watchfolders/manager/init.lua line 506

# 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
Notes None
Examples None
Source src/plugins/core/watchfolders/manager/init.lua line 105

# getLabel

Signature plugins.core.watchfolders.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/core/watchfolders/manager/init.lua line 78

# 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
Notes None
Examples None
Source src/plugins/core/watchfolders/manager/init.lua line 380

# init

Signature plugins.core.watchfolders.manager.init() -> none
Type Function
Description Initialises the Watch Folder Manager.
Parameters
  • None
Returns
  • Nothing
Notes None
Examples None
Source src/plugins/core/watchfolders/manager/init.lua line 534

# 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
Notes None
Examples None
Source src/plugins/core/watchfolders/manager/init.lua line 396

# maxPanelHeight

Signature plugins.core.watchfolders.manager.maxPanelHeight() -> number
Type Function
Description Gets the maximum panel height as a number
Parameters
  • None
Returns
  • A number
Notes None
Examples None
Source src/plugins/core/watchfolders/manager/init.lua line 230

# 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
Notes None
Examples None
Source src/plugins/core/watchfolders/manager/init.lua line 421

# setPanelRenderer

Signature plugins.core.watchfolders.manager.setPanelRenderer(renderer) -> none
Type Function
Description Sets a Panel Renderer
Parameters
  • renderer - The renderer
Returns
  • None
Notes None
Examples None
Source src/plugins/core/watchfolders/manager/init.lua line 118

# show

Signature plugins.core.watchfolders.manager.show([panelID]) -> boolean
Type Function
Description Shows the Watch Folders Window
Parameters
  • [panelID] - An optional panel ID
Returns
  • True if successful or nil if an error occurred
Notes None
Examples None
Source src/plugins/core/watchfolders/manager/init.lua line 343