docs » plugins.core.preferences.manager


Manager for the CommandPost Preferences Window.

Submodules

API Overview

API Documentation

Constants

lastTab

Signature plugins.core.preferences.manager.lastTab
Type Constant
Description Returns the last tab saved in settings.

position

Signature plugins.core.preferences.manager.position
Type Constant
Description Returns the last frame saved in settings.

Variables

_handlers

Signature plugins.core.preferences.manager._handlers
Type Variable
Description Table containing handlers.

_panels

Signature plugins.core.preferences.manager._panels
Type Variable
Description Table containing panels.

defaultHeight

Signature plugins.core.preferences.manager.defaultHeight
Type Variable
Description Default Height of Preferences Window

defaultTitle

Signature plugins.core.preferences.manager.defaultTitle
Type Variable
Description Default Title of Preferences Window

defaultWidth

Signature plugins.core.preferences.manager.defaultWidth
Type Variable
Description Default Width of Preferences Window

defaultWindowStyle

Signature plugins.core.preferences.manager.defaultWindowStyle
Type Variable
Description Default Webview Window Style of Preferences Window

Functions

addHandler

Signature plugins.core.preferences.manager.addHandler(id, handlerFn) -> string
Type Function
Description Returns the Webview label.
Parameters
  • id - The ID
  • handlerFn - the handler function
Returns
  • Nothing

addPanel

Signature plugins.core.preferences.manager.addPanel(params) -> plugins.core.preferences.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.

focus

Signature plugins.core.preferences.manager.focus() -> boolean
Type Function
Description Puts focus on the Preferences Window.
Parameters
  • None
Returns
  • `true` if successful or otherwise `false`.

getHandler

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

getLabel

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

getWebview

Signature plugins.core.preferences.manager.getWebview() -> hs.webview
Type Function
Description Returns the Webview of the Preferences Window.
Parameters
  • None
Returns
  • A `hs.webview`

hide

Signature plugins.core.preferences.manager.hide() -> none
Type Function
Description Hides the Preferences Window.
Parameters
  • None
Returns
  • None

init

Signature plugins.core.preferences.manager.init() -> nothing
Type Function
Description Initialises the preferences panel.
Parameters
  • None
Returns
  • Nothing

injectScript

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

maxPanelHeight

Signature plugins.core.preferences.manager.maxPanelHeight() -> number
Type Function
Description Returns the maximum size defined by a panel.
Parameters
  • None
Returns
  • The maximum panel height.

new

Signature plugins.core.preferences.manager.new() -> none
Type Function
Description Creates a new Preferences Window.
Parameters
  • None
Returns
  • None

refresh

Signature plugins.core.preferences.manager.refresh() -> none
Type Function
Description Refreshes the Preferences Window.
Parameters
  • None
Returns
  • None

selectPanel

Signature plugins.core.preferences.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.preferences.manager.setPanelRenderer(renderer) -> none
Type Function
Description Sets a Panel Renderer
Parameters
  • renderer - The renderer
Returns
  • None

show

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

results matching ""

    No results matching ""