#cp.ui.PropertyRow

Represents a single property row, typically in a Property Inspector.


#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

Fields - Variables which can only be accessed from an object returned by a constructor

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


#API Documentation

#Constants

Signaturecp.ui.PropertyRow.intersectBuffer
TypeConstant
DescriptionDefines the buffer for intersections with the labelUI.
NotesNone
Sourcesrc/extensions/cp/ui/PropertyRow.lua line 37

#Functions

Signaturecp.ui.PropertyRow.isParent(parent) -> boolean
TypeFunction
DescriptionChecks if the parent has been prepared via prepareParent.
Parameters
  • None
Returns
  • true if the parent is prepared.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/PropertyRow.lua line 84

Signaturecp.ui.PropertyRow.matches(element) -> boolean
TypeFunction
DescriptionChecks if the provided axuielement could be a property row.
Parameters
  • element - The element to check.
Returns
  • true if the element could be a property row.
Notes
  • This does not guarantee that it is a property row element, just that it could be.
ExamplesNone
Sourcesrc/extensions/cp/ui/PropertyRow.lua line 97

Signaturecp.ui.PropertyRow.parentUIFinder(parent) -> cp.prop
TypeFunction
DescriptionReturns the cp.prop which finds the hs.axuielement that contains property rows from the parent. This needs to be configured first by calling the prepareParent function with the parent and finder function.
Parameters
  • parent - The parent which has a finder assigned.
Returns
  • The cp.prop which provides access to the finder, or nil.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/PropertyRow.lua line 42

Signaturecp.ui.PropertyRow.prepareParent(parent, uiFinder) -> none
TypeFunction
DescriptionCall this to make parent table ready to be a parent of PropertyRows. Essentially, this lets PropertyRow instances ask the parent for the hs.axuielement that contains the property row details.
Parameters
  • parent - The parent table.
  • uiFinder - The function or cp.prop which will be called to find the parent UI element. Functions will be passed the parent when being executed.
Returns
  • None
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/PropertyRow.lua line 55

#Constructors

Signaturecp.ui.PropertyRow(parent, labelKey[, index]) -> cp.ui.PropertyRow
TypeConstructor
DescriptionCreates a new PropertyRow with the specified parent and label key.
Parameters
  • parent - The parent object.
  • labelKey - The key of the label that the row will map to.
  • index - The row number with the same label to get. Defaults to 1.
Returns
  • The new PropertyRow instance.
Notes
  • If you have more than one row with the same label, specify the index - specifying 2 will match with the second instance, for example.
ExamplesNone
Sourcesrc/extensions/cp/ui/PropertyRow.lua line 113

#Fields

Signaturecp.ui.PropertyRow.label <cp.prop: string; read-only>
TypeField
DescriptionThe label of the property row, in the current langauge.
NotesNone
Sourcesrc/extensions/cp/ui/PropertyRow.lua line 191

Signaturecp.ui.PropertyRow.labelUI <cp.prop: hs.axuielement; read-only>
TypeField
DescriptionReturns the axuielement for the label UI.
NotesNone
Sourcesrc/extensions/cp/ui/PropertyRow.lua line 133

Signaturecp.ui.PropertyRow.propertiesUI <cp.prop: hs.axuielement; read-only>
TypeField
DescriptionThe axuielement from the parent that contains the properties.
NotesNone
Sourcesrc/extensions/cp/ui/PropertyRow.lua line 184

Signaturecp.ui.PropertyRow.reset <cp.ui.Button>
TypeField
DescriptionThe reset button for the row, which may or may not actually exist.
NotesNone
Sourcesrc/extensions/cp/ui/PropertyRow.lua line 208

Signaturecp.ui.PropertyRow.UI <cp.prop: hs.axuielement; read-only>
TypeField
DescriptionReturns the axuielement for the row.
NotesNone
Sourcesrc/extensions/cp/ui/PropertyRow.lua line 150

#Methods

Signaturecp.ui.PropertyRow:app() -> App
TypeMethod
DescriptionReturns the app instance.
Parameters
  • None
Returns
  • App
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/PropertyRow.lua line 236

Signaturecp.ui.PropertyRow:children() -> table | nil
TypeMethod
DescriptionGets a table of children for the Property Row.
Parameters
  • None
Returns
  • A table of children or nil.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/PropertyRow.lua line 319

Signaturecp.ui.PropertyRow:doHide() -> cp.rx.go.Statement
TypeMethod
DescriptionA Statement that will attempt to hide the PropertyRow.
Parameters
  • None
Returns
  • The Statement.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/PropertyRow.lua line 293

Signaturecp.ui.PropertyRow:doShow() -> cp.rx.go.Statement
TypeMethod
DescriptionA Statement that shows the PropertyRow.
Parameters
  • None
Returns
  • self
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/PropertyRow.lua line 263

Signaturecp.ui.PropertyRow:extend(extendFn) -> cp.ui.PropertyRow
TypeMethod
DescriptionThis method will call the provided function, passing it the current PropertyRow. This can be used to add addtional tweaks to the row, such as adding custom Elements.
Parameters
  • extendFn - A function that will be passed the current row.
Returns
  • The same PropertyRow instance.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/PropertyRow.lua line 169

Signaturecp.ui.PropertyRow:hide() -> self
TypeMethod
DescriptionHides the PropertyRow.
Parameters
  • None
Returns
  • self
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/PropertyRow.lua line 276

Signaturecp.ui.PropertyRow:labelKeys() -> string
TypeMethod
DescriptionGets the key of the label that the row will map to.
Parameters
  • None
Returns
  • string
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/PropertyRow.lua line 306

Signaturecp.ui.PropertyRow:parent() -> parent
TypeMethod
DescriptionReturns the parent object.
Parameters
  • None
Returns
  • parent
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/PropertyRow.lua line 223

Signaturecp.ui.PropertyRow:show() -> self
TypeMethod
DescriptionShows the PropertyRow.
Parameters
  • None
Returns
  • self
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/PropertyRow.lua line 249