# plugins.core.setup

Manager for the CommandPost Setup Screen.


# Submodules


# API Overview

Constants - Useful values which cannot be changed

  • DEFAULT_HEIGHT
  • DEFAULT_TITLE
  • DEFAULT_WIDTH
  • enabled
  • FIRST_PRIORITY
  • LAST_PRIORITY
  • visible

Variables - Configurable values

  • onboardingRequired
  • position

Functions - API calls offered directly by the extension

  • addPanel
  • currentPanel
  • delete
  • focus
  • getLabel
  • injectScript
  • new
  • nextPanel
  • setPanelRenderer
  • show
  • update

# API Documentation

# Constants

# DEFAULT_HEIGHT

Signature plugins.core.setup.DEFAULT_HEIGHT -> number
Type Constant
Description The default panel height.
Notes None
Source src/plugins/core/setup/init.lua line 33

# DEFAULT_TITLE

Signature plugins.core.setup.DEFAULT_TITLE -> string
Type Constant
Description The default panel title.
Notes None
Source src/plugins/core/setup/init.lua line 38

# DEFAULT_WIDTH

Signature plugins.core.setup.DEFAULT_WIDTH -> number
Type Constant
Description The default panel width.
Notes None
Source src/plugins/core/setup/init.lua line 28

# enabled

Signature plugins.core.setup.enabled <cp.prop: boolean>
Type Constant
Description Set to true if the manager is enabled. Defaults to false.
Notes None
Source src/plugins/core/setup/init.lua line 83

# FIRST_PRIORITY

Signature plugins.core.setup.FIRST_PRIORITY -> number
Type Constant
Description The first panel priority.
Notes None
Source src/plugins/core/setup/init.lua line 58

# LAST_PRIORITY

Signature plugins.core.setup.LAST_PRIORITY -> number
Type Constant
Description The last panel priority.
Notes None
Source src/plugins/core/setup/init.lua line 63

# visible

Signature plugins.core.setup.visible <cp.prop: boolean; read-only>
Type Constant
Description A property indicating if the welcome window is visible on screen.
Notes None
Source src/plugins/core/setup/init.lua line 78

# Variables

# onboardingRequired

Signature plugins.core.setup.onboardingRequired <cp.prop: boolean>
Type Variable
Description Set to true if on-boarding is required otherwise false. Defaults to true.
Notes None
Source src/plugins/core/setup/init.lua line 73

# position

Signature plugins.core.setup.position <cp.prop: table>
Type Variable
Description The last known position of the Setup Window as a frame.
Notes None
Source src/plugins/core/setup/init.lua line 68

# Functions

# addPanel

Signature plugins.core.setup.addPanel(newPanel) -> panel
Type Function
Description Adds the new panel to the manager. Panels are created via the plugins.core.setup.panel.new(...) function.
Parameters
  • newPanel - The panel to add.
Returns
  • The manager.
Notes
  • If the Setup Manager is enabled, the window will be displayed immediately when a panel is added.
Examples None
Source src/plugins/core/setup/init.lua line 415

# currentPanel

Signature plugins.core.setup.currentPanel() -> string
Type Function
Description The Current Panel
Parameters
  • None
Returns
  • The current panel as a string
Notes None
Examples None
Source src/plugins/core/setup/init.lua line 186

# delete

Signature plugins.core.setup.delete() -> none
Type Function
Description Deletes the Setup Panels.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/core/setup/init.lua line 339

# focus

Signature plugins.core.setup.focus() -> none
Type Function
Description Focuses on the Setup Panels window.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/core/setup/init.lua line 375

# getLabel

Signature plugins.core.setup.getLabel() -> string
Type Function
Description Returns the Webview label.
Parameters
  • None
Returns
  • The Webview label as a string.
Notes None
Examples None
Source src/plugins/core/setup/init.lua line 107

# injectScript

Signature plugins.core.setup.injectScript(script) -> none
Type Function
Description Injects JavaScript into the Setup Panels.
Parameters
  • script - The JavaScript you want to inject as a string.
Returns
  • None
Notes None
Examples None
Source src/plugins/core/setup/init.lua line 360

# new

Signature plugins.core.setup.new() -> none
Type Function
Description Creates the Setup Panels.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/core/setup/init.lua line 242

# nextPanel

Signature plugins.core.setup.nextPanel() -> boolean
Type Function
Description Moves to the next panel. If the window is visible, the panel will be updated. If no panels are left in the queue, the window will be closed.
Parameters
  • None
Returns
  • true if there was another panel to move to, or false if no panels remain.
Notes None
Examples None
Source src/plugins/core/setup/init.lua line 393

# setPanelRenderer

Signature plugins.core.setup.setPanelRenderer(renderer) -> none
Type Function
Description Sets a Panel Renderer
Parameters
  • renderer - The renderer
Returns
  • None
Notes None
Examples None
Source src/plugins/core/setup/init.lua line 94

# show

Signature plugins.core.setup.show() -> none
Type Function
Description Shows the Setup Panels.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/core/setup/init.lua line 306

# update

Signature plugins.core.setup.update() -> none
Type Function
Description Updates the Setup Panels.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/core/setup/init.lua line 323