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

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

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

Signatureplugins.core.controlsurfaces.manager.NUMBER_OF_BANKS -> number
TypeConstant
DescriptionNumber of banks.
NotesNone
Sourcesrc/plugins/core/controlsurfaces/manager/init.lua line 33

Signatureplugins.core.controlsurfaces.manager.NUMBER_OF_DEVICES -> number
TypeConstant
DescriptionNumber of devices.
NotesNone
Sourcesrc/plugins/core/controlsurfaces/manager/init.lua line 38

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

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

#Variables

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

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

#Functions

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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