docs » plugins.core.setup.panel


CommandPost Setup Window Panel.

API Overview

API Documentation

Constants

WEBVIEW_LABEL

Signature plugins.core.setup.panel.WEBVIEW_LABEL -> string
Type Constant
Description The ID for the Webview

Functions

panelCount

Signature plugins.core.setup.panelCount() -> number
Type Function
Description The number of panels currently being processed in this session.
Parameters
  • None
Returns
  • The number of panels.

panelNumber

Signature plugins.core.setup.panelNumber() -> number
Type Function
Description The number of the panel currently being viewed.
Parameters
  • None
Returns
  • the current panel number, or `0` if no panels are registered.

panelQueue

Signature plugins.core.setup.panelQueue() -> table of panels
Type Function
Description The table of panels remaining to be processed. Panels are removed from the queue
Parameters
  • None
Returns
  • The table of panels remaining to be processed.

Constructors

new

Signature plugins.core.setup.panel.new(id, priority) -> plugins.core.setup.panel
Type Constructor
Description Constructs a new panel with the specified priority and ID.
Parameters
  • priority - Defines the order in which the panel appears.
  • id - The unique ID for the panel.

Methods

addButton

Signature plugins.core.setup.panel:addButton(params) -> panel
Type Method
Description Adds 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.

addCheckbox

Signature plugins.core.setup.panel:addCheckbox(params) -> panel
Type Method
Description Adds 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 object.
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.

addContent

Signature plugins.core.setup.panel:addContent(content[, escaped]) -> panel
Type Method
Description Adds the specified content to the panel.
Parameters
  • * `content` - a value that can be converted to a string.
  • * `escaped` - if `true`, the content will not be escaped. Defaults to true.
Returns
  • * The panel.

addFooter

Signature plugins.core.setup.panel:addFooter(content, unescaped) -> panel
Type Method
Description Adds the specified content to the panel's footer.
Parameters
  • * `content` - a value that can be converted to a string.
  • * `unescaped` - if `true`, the content will not be escaped. Defaults to true.
Returns
  • * The panel.

addHandler

Signature plugins.core.setup.panel:addHandler(event, id, handlerFn, keys) -> none
Type Method
Description Gets a handler from an Handler ID
Parameters
  • event - The event
  • id - the Handler ID
  • handlerFn - The Handler function
  • keys - Keys
Returns
  • None

addHeading

Signature plugins.core.setup.panel:addHeading(text) -> panel
Type Method
Description Adds a heading to the panel
Parameters
  • text - The text of the heading as a string
Returns
  • * The panel object.

addIcon

Signature plugins.core.setup.panel:addIcon(src) -> panel
Type Method
Description Adds an icon to the panel.
Parameters
  • src - Location of the icon.
Returns
  • * The panel object.

addParagraph

Signature plugins.core.setup.panel:addParagraph(content[, escaped[, class]]) -> panel
Type Method
Description Adds a Paragraph to the panel
Parameters
  • content - The content as a string
  • escaped - Whether or not the HTML should be escaped as a boolean
  • class - The class as a string
Returns
  • * The panel object.

addPassword

Signature plugins.core.setup.panel:addPassword(params) -> panel
Type Method
Description Adds a password text-box to the panel.
Parameters
  • params - A table of parameters
Returns
  • * The panel object.

addSelect

Signature plugins.core.setup.panel:addSelect(params) -> panel
Type Method
Description Adds a select to the panel.
Parameters
  • params - A table of parameters
Returns
  • * The panel object.

addSubHeading

Signature plugins.core.setup.panel:addSubHeading(text) -> panel
Type Method
Description Adds a sub-heading to the panel
Parameters
  • text - The text of the sub-heading as a string
Returns
  • * The panel object.

addTextbox

Signature plugins.core.setup.panel:addTextbox(params) -> panel
Type Method
Description Adds a text-box to the panel
Parameters
  • params - A table of parameters
Returns
  • * The panel object.

getHandler

Signature plugins.core.setup.panel:getHandler(id) -> handler
Type Method
Description Gets a handler from an Handler ID
Parameters
  • * `id` - the Handler ID
Returns
  • * A handler.

results matching ""

    No results matching ""