#plugins.core.controlsurfaces.manager.panel

CommandPost Control Surfaces Panel.


#API Overview

Constructors - API calls which return an object, typically one that offers API methods

Methods - API calls which can only be made on an object returned by a constructor


#API Documentation

#Constructors

Signatureplugins.core.controlsurfaces.manager.panel.new(params, manager) -> cp.core.controlsurfaces.manager.panel
TypeConstructor
DescriptionConstructs a new panel with the specified priority and ID.
Parameters
  • params - A table of parameters
  • manager - The manager
Returns
  • The new object.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/controlsurfaces/manager/panel.lua line 16

#Methods

Signatureplugins.core.controlsurfaces.manager.panel:addButton(params) -> panel
TypeMethod
DescriptionAdds a button to the panel.
Parameters
  • params - The list of parameters.
Returns
  • The same panel.
Notes
  • The params table may contain:
  • ** id - (optional) the unique ID for the button. If none is provided, one is generated.
  • ** value - The value of the button. This is sent to the onclick function.
  • ** label - The text label for the button. Defaults to the value if not provided.
  • ** width - The width of the button in pixels.
  • ** onclick - the function to execute when the button is clicked. The function should have the signature of function(id, value), where id is the id of the button that was clicked, and value is the value of the button.
ExamplesNone
Sourcesrc/plugins/core/controlsurfaces/manager/panel.lua line 305

Signatureplugins.core.controlsurfaces.manager.panel:addCheckbox(priority, params) -> panel
TypeMethod
DescriptionAdds a checkbox to the panel with the specified priority and params.
Parameters
  • priority - The priority number for the checkbox.
  • params - The set of parameters for the checkbox.
Returns
  • The panel.
Notes
  • The params can contain the following fields:
  • ** id - (optional) The unique ID. If none is provided, one will be generated.
  • ** name - (optional) The name of the checkbox field.
  • ** label - (optional) The text label to display after the checkbox.
  • ** onchange - (optional) a function that will get called when the checkbox value changes. It will be passed two parameters, id and params, the latter of which is a table containing the value and checked values of the checkbox.
  • ** class - (optional) the CSS class list to apply to the checkbox.
ExamplesNone
Sourcesrc/plugins/core/controlsurfaces/manager/panel.lua line 200

Signatureplugins.core.controlsurfaces.manager.panel:addContent(priority, content[, escaped]) -> panel
TypeMethod
DescriptionAdds the specified content to the panel, with the specified priority order.
Parameters
  • priority - the priority order of the content.
  • content - a value that can be converted to a string.
  • escaped - if true, the content will be escaped.
Returns
  • The panel.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/controlsurfaces/manager/panel.lua line 109

Signatureplugins.core.controlsurfaces.manager.panel:addHandler(event, id, handlerFn, keys) -> none
TypeMethod
DescriptionGets a handler from an Handler ID
Parameters
  • event - The event
  • id - the Handler ID
  • handlerFn - The Handler function
  • keys - Keys
Returns
  • None
NotesNone
ExamplesNone
Sourcesrc/plugins/core/controlsurfaces/manager/panel.lua line 132

Signatureplugins.core.controlsurfaces.manager.panel:addHeading(text) -> panel
TypeMethod
DescriptionAdds a heading to the panel
Parameters
  • text - The text of the heading as a string
Returns
  • The panel object.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/controlsurfaces/manager/panel.lua line 238

Signatureplugins.core.controlsurfaces.manager.panel:addParagraph(content[, escaped[, class]]) -> panel
TypeMethod
DescriptionAdds a Paragraph to the panel
Parameters
  • content - The content as a string
  • escaped - Whether or not the HTML should be escaped as a boolean. Defaults to true for simple text.
  • class - The class as a string
Returns
  • The panel object.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/controlsurfaces/manager/panel.lua line 185

Signatureplugins.core.controlsurfaces.manager.panel:addPassword(params) -> panel
TypeMethod
DescriptionAdds a password text-box to the panel.
Parameters
  • params - A table of parameters
Returns
  • The panel object.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/controlsurfaces/manager/panel.lua line 278

Signatureplugins.core.controlsurfaces.manager.panel:addSelect(priority, params) -> panel
TypeMethod
DescriptionAdds a select to the panel.
Parameters
  • priority - Priority of the item as number.
  • params - A table of parameters
Returns
  • The panel object.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/controlsurfaces/manager/panel.lua line 334

Signatureplugins.core.controlsurfaces.manager.panel:addTextbox(params) -> panel
TypeMethod
DescriptionAdds a text-box to the panel
Parameters
  • params - A table of parameters
Returns
  • The panel object.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/controlsurfaces/manager/panel.lua line 251

Signatureplugins.core.controlsurfaces.manager.panel:getToolbarItem() -> table
TypeMethod
DescriptionGets the Tool Bar as a table
Parameters
  • None
Returns
  • The toolbar item as a table.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/controlsurfaces/manager/panel.lua line 46