#cp.ui.Cell

Represents an AXCell axuielement. This can be used directly, or can be subclassed to provide more specific access to the cell contents. It is typically used in conjunction with a container type such as Table, something like this:

function MyPanel.lazy.value:tableOfStuff() return Table:withRowsOf( Row:containing( Cell:with(TextField), Cell:with(Button) ) )(self, self.UI:mutate(chain // uielement >> attribute "AXContents")) end

This is a subclass of Element.


#API Overview

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

#Functions

Signaturecp.ui.Cell.matches(element) -> boolean
TypeFunction
DescriptionChecks if the element is an AXCell.
Parameters
  • element - An element to check
Returns
  • A boolean
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/Cell.lua line 30

Signaturecp.ui.Cell:with(...) -> function(parent, uiFinder) -> cp.ui.Cell.Builder
TypeFunction
DescriptionA combinator function that returns a Cell.Builder that accepts the parent and uiFinder to construct a new Cell.
Parameters
  • ... - One or more arguments to pass to the constructor.
Returns
Notes
  • For example, if a cell contains a Button, you can use cp.ui.Cell:with(Button), and it will return a Cell
  • Builder that accepts the parent and uiFinder parameters, and whose contents is expected to be a Button.
  • That Button instance can be accessed via the children[1] value.
  • ```
ExamplesNone
Sourcesrc/extensions/cp/ui/Cell.lua line 41

#Constructors

Signaturecp.ui.Cell(parent, uiFinder[, childInits]) -> Cell
TypeConstructor
DescriptionCreates a new Cell instance.
Parameters
  • parent - The parent Element.
  • uiFinder - A cp.prop or axuielement that will be used to find this Cell's axuielement.
  • ... - The list of child Element builders to initialize.
Returns
  • A new Cell instance.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/Cell.lua line 57

#Fields

Signaturecp.ui.Cell.children <table of cp.ui.Element; live?; read-only>
TypeField
DescriptionThe list of Elements which are children of this Cell, if the childInits were provided to the constructor.
NotesNone
Sourcesrc/extensions/cp/ui/Cell.lua line 101

Signaturecp.ui.Cell.childrenUI <cp.prop: table of axuielement; read-only>
TypeField
DescriptionThe list of axuielements which are children of this Cell.
NotesNone
Sourcesrc/extensions/cp/ui/Cell.lua line 94

Signaturecp.ui.Cell.columnIndexRange <cp.prop: table; read-only>
TypeField
DescriptionReturns a table of {len,loc}, which indicates if the cell covers multiple columns.
NotesNone
Sourcesrc/extensions/cp/ui/Cell.lua line 73

Signaturecp.ui.Cell.rowIndexRange <cp.prop: table; read-only>
TypeField
DescriptionReturns a table of {len,loc}, which indicates if the cell covers multiple rows.
NotesNone
Sourcesrc/extensions/cp/ui/Cell.lua line 80

Signaturecp.ui.Cell.selected <cp.prop: table>
TypeField
DescriptionIndicates if the cell is currently selected.
NotesNone
Sourcesrc/extensions/cp/ui/Cell.lua line 87

Signaturecp.ui.Cell.value <cp.prop: string>
TypeField
DescriptionThe cell value, if it is a string.
NotesNone
Sourcesrc/extensions/cp/ui/Cell.lua line 115

#Methods

Signaturecp.ui.Cell.textValueIs(value) -> boolean
TypeMethod
DescriptionChecks if the cell's text value equals value.
Parameters
  • value - The text value to compare.
Returns
  • true if the cell text value equals the provided value.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/Cell.lua line 122