#plugins.core.toolbox.manager

Manager for the CommandPost Toolbox Window.


#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.toolbox.manager.DEFAULT_HEIGHT -> number
TypeConstant
DescriptionDefault Height of Preferences Window
NotesNone
Sourcesrc/plugins/core/toolbox/manager/init.lua line 38

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

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

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

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

#Variables

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

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

#Functions

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

Signatureplugins.core.toolbox.manager.addPanel(params) -> plugins.core.toolbox.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/toolbox/manager/init.lua line 553

Signatureplugins.core.toolbox.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/toolbox/manager/init.lua line 152

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

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

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

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

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

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

Signatureplugins.core.toolbox.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/toolbox/manager/init.lua line 463

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

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

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

Signatureplugins.core.toolbox.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/toolbox/manager/init.lua line 487

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

Signatureplugins.core.toolbox.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/toolbox/manager/init.lua line 374