#plugins.core.setup.panel

CommandPost Setup Window Panel.


#API Overview

Constants - Useful values which cannot be changed

Functions - API calls offered directly by the extension

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

#Constants

Signatureplugins.core.setup.panel.WEBVIEW_LABEL -> string
TypeConstant
DescriptionThe ID for the Webview
NotesNone
Sourcesrc/plugins/core/setup/panel.lua line 17

#Functions

Signatureplugins.core.setup.panelCount() -> number
TypeFunction
DescriptionThe number of panels currently being processed in this session. This includes panels already processed, the current panel, and remaining panels.
Parameters
  • None
Returns
  • The number of panels.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/setup/init.lua line 147

Signatureplugins.core.setup.panelNumber() -> number
TypeFunction
DescriptionThe number of the panel currently being viewed.
Parameters
  • None
Returns
  • the current panel number, or 0 if no panels are registered.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/setup/init.lua line 160

Signatureplugins.core.setup.panelQueue() -> table of panels
TypeFunction
DescriptionThe table of panels remaining to be processed. Panels are removed from the queue one at a time and displayed in the window via the nextPanel() function.
Parameters
  • None
Returns
  • The table of panels remaining to be processed.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/setup/init.lua line 173

#Constructors

Signatureplugins.core.setup.panel.new(id, priority) -> plugins.core.setup.panel
TypeConstructor
DescriptionConstructs 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.
Returns
    NotesNone
    ExamplesNone
    Sourcesrc/plugins/core/setup/panel.lua line 22

    #Methods

    Signatureplugins.core.setup.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/setup/panel.lua line 352

    Signatureplugins.core.setup.panel:addCheckbox(params) -> panel
    TypeMethod
    DescriptionAdds a checkbox to the panel with the specified params.
    Parameters
    • 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.
    ExamplesNone
    Sourcesrc/plugins/core/setup/panel.lua line 182

    Signatureplugins.core.setup.panel:addContent(content[, escaped]) -> panel
    TypeMethod
    DescriptionAdds 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.
    NotesNone
    ExamplesNone
    Sourcesrc/plugins/core/setup/panel.lua line 72

    Signatureplugins.core.setup.panel:addFooter(content, unescaped) -> panel
    TypeMethod
    DescriptionAdds 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.
    NotesNone
    ExamplesNone
    Sourcesrc/plugins/core/setup/panel.lua line 87

    Signatureplugins.core.setup.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/setup/panel.lua line 115

    Signatureplugins.core.setup.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/setup/panel.lua line 220

    Signatureplugins.core.setup.panel:addIcon(src) -> panel
    TypeMethod
    DescriptionAdds an icon to the panel.
    Parameters
    • src - Location of the icon.
    Returns
    • The panel object.
    NotesNone
    ExamplesNone
    Sourcesrc/plugins/core/setup/panel.lua line 331

    Signatureplugins.core.setup.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
    • class - The class as a string
    Returns
    • The panel object.
    NotesNone
    ExamplesNone
    Sourcesrc/plugins/core/setup/panel.lua line 167

    Signatureplugins.core.setup.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/setup/panel.lua line 273

    Signatureplugins.core.setup.panel:addSelect(params) -> panel
    TypeMethod
    DescriptionAdds a select to the panel.
    Parameters
    • params - A table of parameters
    Returns
    • The panel object.
    NotesNone
    ExamplesNone
    Sourcesrc/plugins/core/setup/panel.lua line 300

    Signatureplugins.core.setup.panel:addSubHeading(text) -> panel
    TypeMethod
    DescriptionAdds a sub-heading to the panel
    Parameters
    • text - The text of the sub-heading as a string
    Returns
    • The panel object.
    NotesNone
    ExamplesNone
    Sourcesrc/plugins/core/setup/panel.lua line 233

    Signatureplugins.core.setup.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/setup/panel.lua line 246

    Signatureplugins.core.setup.panel:getHandler(id) -> handler
    TypeMethod
    DescriptionGets a handler from an Handler ID
    Parameters
    • id - the Handler ID
    Returns
    • A handler.
    NotesNone
    ExamplesNone
    Sourcesrc/plugins/core/setup/panel.lua line 102