#cp.choices.builder

Choices Builder Module.


#API Overview

Functions - API calls offered directly by the extension

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


#API Documentation

#Functions

Signaturecp.choices.builder.new(choiceType) -> builder
TypeFunction
DescriptionCreates a new choice builder instance.
Parameters
  • choice - The choice instance to configure.
Returns
  • The new choice builder.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/choices/init.lua line 7

#Methods

Signaturecp.choices.builder:id(value) -> builder
TypeMethod
DescriptionSets the ID of the choice.
Parameters
  • value - The ID.
Returns
  • The choice builder.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/choices/init.lua line 53

Signaturecp.choices.builder:image(value) -> builder
TypeMethod
DescriptionSets the image of the choice.
Parameters
  • value - A hs.image image object that will be displayed next to the choice
Returns
  • The choice builder.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/choices/init.lua line 67

Signaturecp.choices.builder:params(value) -> builder
TypeMethod
DescriptionSpecifies a table of parameter values for the choice. These values need to be simple - text, numbers, booleans, or tables.
Parameters
  • value - The table of parameters.
Returns
  • The choice builder, added to the choices set.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/choices/init.lua line 83

Signaturecp.choices.builder:subText(value) -> builder
TypeMethod
DescriptionSpecifies the subText value for the choice being built.
Parameters
  • value - The subText title for the choice.
Returns
  • The choice builder.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/choices/init.lua line 39

Signaturecp.choices.builder:text(value) -> builder
TypeMethod
DescriptionSpecifies the text value for the choice being built.
Parameters
  • value - The text title for the choice.
Returns
  • The choice builder, added to the choices set.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/choices/init.lua line 25