#plugins.core.preferences.manager

Manager for the CommandPost Preferences Window.


#Submodules


#API Overview

Constants - Useful values which cannot be changed

Variables - Configurable values

Functions - API calls offered directly by the extension


#API Documentation

#Constants

Signatureplugins.core.preferences.manager.DEFAULT_HEIGHT -> number
TypeConstant
DescriptionDefault Height of Preferences Window
NotesNone
Sourcesrc/plugins/core/preferences/manager/init.lua line 37

Signatureplugins.core.preferences.manager.DEFAULT_WIDTH -> number
TypeConstant
DescriptionDefault Width of Preferences Window
NotesNone
Sourcesrc/plugins/core/preferences/manager/init.lua line 42

Signatureplugins.core.preferences.manager.lastTab
TypeConstant
DescriptionReturns the last tab saved in settings.
NotesNone
Sourcesrc/plugins/core/preferences/manager/init.lua line 62

Signatureplugins.core.preferences.manager.position
TypeConstant
DescriptionReturns the last frame saved in settings.
NotesNone
Sourcesrc/plugins/core/preferences/manager/init.lua line 57

Signatureplugins.core.preferences.manager.WEBVIEW_LABEL -> string
TypeConstant
DescriptionThe WebView Label
NotesNone
Sourcesrc/plugins/core/preferences/manager/init.lua line 32

#Variables

Signatureplugins.core.preferences.manager._handlers -> table
TypeVariable
DescriptionTable containing handlers.
NotesNone
Sourcesrc/plugins/core/preferences/manager/init.lua line 52

Signatureplugins.core.preferences.manager._panels -> table
TypeVariable
DescriptionTable containing panels.
NotesNone
Sourcesrc/plugins/core/preferences/manager/init.lua line 47

#Functions

Signatureplugins.core.preferences.manager.addHandler(id, handlerFn) -> string
TypeFunction
DescriptionAdds a Handler
Parameters
  • id - The ID
  • handlerFn - the handler function
Returns
  • Nothing
NotesNone
ExamplesNone
Sourcesrc/plugins/core/preferences/manager/init.lua line 93

Signatureplugins.core.preferences.manager.addPanel(params) -> plugins.core.preferences.manager.panel
TypeFunction
DescriptionAdds 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.
  • ** closeFn - A callback function that's triggered when the Preferences window is closed.
ExamplesNone
Sourcesrc/plugins/core/preferences/manager/init.lua line 550

Signatureplugins.core.preferences.manager.currentPanelID() -> string
TypeFunction
DescriptionReturns the panel ID with the highest priority.
Parameters
  • None
Returns
  • The panel ID as a string
NotesNone
ExamplesNone
Sourcesrc/plugins/core/preferences/manager/init.lua line 151

Signatureplugins.core.preferences.manager.focus() -> boolean
TypeFunction
DescriptionPuts focus on the Preferences Window.
Parameters
  • None
Returns
  • true if successful or otherwise false.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/preferences/manager/init.lua line 406

Signatureplugins.core.preferences.manager.getHandler(id) -> string
TypeFunction
DescriptionReturns the handler for a given ID.
Parameters
  • id - The ID
Returns
  • Table
NotesNone
ExamplesNone
Sourcesrc/plugins/core/preferences/manager/init.lua line 107

Signatureplugins.core.preferences.manager.getLabel() -> string
TypeFunction
DescriptionReturns the Webview label.
Parameters
  • None
Returns
  • The Webview label as a string.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/preferences/manager/init.lua line 80

Signatureplugins.core.preferences.manager.getWebview() -> hs.webview
TypeFunction
DescriptionReturns the Webview of the Preferences Window.
Parameters
  • None
Returns
  • A hs.webview
NotesNone
ExamplesNone
Sourcesrc/plugins/core/preferences/manager/init.lua line 67

Signatureplugins.core.preferences.manager.hide() -> none
TypeFunction
DescriptionHides the Preferences Window.
Parameters
  • None
Returns
  • None
NotesNone
ExamplesNone
Sourcesrc/plugins/core/preferences/manager/init.lua line 425

Signatureplugins.core.preferences.manager.init() -> nothing
TypeFunction
DescriptionInitialises the preferences panel.
Parameters
  • None
Returns
  • Nothing
NotesNone
ExamplesNone
Sourcesrc/plugins/core/preferences/manager/init.lua line 233

Signatureplugins.core.preferences.manager.injectScript(script) -> none
TypeFunction
DescriptionInjects JavaScript into the Preferences Webview.
Parameters
  • script - The JavaScript code you want to inject in the form of a string.
Returns
  • None
NotesNone
ExamplesNone
Sourcesrc/plugins/core/preferences/manager/init.lua line 463

Signatureplugins.core.preferences.manager.maxPanelHeight() -> number
TypeFunction
DescriptionReturns the maximum size defined by a panel.
Parameters
  • None
Returns
  • The maximum panel height.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/preferences/manager/init.lua line 248

Signatureplugins.core.preferences.manager.new() -> none
TypeFunction
DescriptionCreates a new Preferences Window.
Parameters
  • None
Returns
  • None
NotesNone
ExamplesNone
Sourcesrc/plugins/core/preferences/manager/init.lua line 289

Signatureplugins.core.preferences.manager.refresh() -> none
TypeFunction
DescriptionRefreshes the Preferences Window.
Parameters
  • None
Returns
  • None
NotesNone
ExamplesNone
Sourcesrc/plugins/core/preferences/manager/init.lua line 441

Signatureplugins.core.preferences.manager.selectPanel(id) -> none
TypeFunction
DescriptionSelects a Preferences Panel.
Parameters
  • id - the ID of the panel you want to select.
Returns
  • None
NotesNone
ExamplesNone
Sourcesrc/plugins/core/preferences/manager/init.lua line 484

Signatureplugins.core.preferences.manager.setPanelRenderer(renderer) -> none
TypeFunction
DescriptionSets a Panel Renderer
Parameters
  • renderer - The renderer
Returns
  • None
NotesNone
ExamplesNone
Sourcesrc/plugins/core/preferences/manager/init.lua line 120

Signatureplugins.core.preferences.manager.show([panelID]) -> boolean
TypeFunction
DescriptionShows the Preferences Window
Parameters
  • [panelID] - An optional panel ID
Returns
  • True if successful or nil if an error occurred
NotesNone
ExamplesNone
Sourcesrc/plugins/core/preferences/manager/init.lua line 374