# 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

  • matches
  • with

Constructors - API calls which return an object, typically one that offers API methods

  • Cell

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

  • children
  • childrenUI
  • columnIndexRange
  • rowIndexRange
  • selected
  • value

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

  • textValueIs

# API Documentation

# Functions

# matches

Signature cp.ui.Cell.matches(element) -> boolean
Type Function
Description Checks if the element is an AXCell.
Parameters
  • element - An element to check
Returns
  • A boolean
Notes None
Examples None
Source src/extensions/cp/ui/Cell.lua line 30

# with

Signature cp.ui.Cell:with(...) -> function(parent, uiFinder) -> cp.ui.Cell.Builder
Type Function
Description A 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.
  • ```
Examples None
Source src/extensions/cp/ui/Cell.lua line 41

# Constructors

# Cell

Signature cp.ui.Cell(parent, uiFinder[, childInits]) -> Cell
Type Constructor
Description Creates 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.
Notes None
Examples None
Source src/extensions/cp/ui/Cell.lua line 57

# Fields

# children

Signature cp.ui.Cell.children <table of cp.ui.Element; live?; read-only>
Type Field
Description The list of Elements which are children of this Cell, if the childInits were provided to the constructor.
Notes None
Source src/extensions/cp/ui/Cell.lua line 101

# childrenUI

Signature cp.ui.Cell.childrenUI <cp.prop: table of axuielement; read-only>
Type Field
Description The list of axuielements which are children of this Cell.
Notes None
Source src/extensions/cp/ui/Cell.lua line 94

# columnIndexRange

Signature cp.ui.Cell.columnIndexRange <cp.prop: table; read-only>
Type Field
Description Returns a table of {len,loc}, which indicates if the cell covers multiple columns.
Notes None
Source src/extensions/cp/ui/Cell.lua line 73

# rowIndexRange

Signature cp.ui.Cell.rowIndexRange <cp.prop: table; read-only>
Type Field
Description Returns a table of {len,loc}, which indicates if the cell covers multiple rows.
Notes None
Source src/extensions/cp/ui/Cell.lua line 80

# selected

Signature cp.ui.Cell.selected <cp.prop: table>
Type Field
Description Indicates if the cell is currently selected.
Notes None
Source src/extensions/cp/ui/Cell.lua line 87

# value

Signature cp.ui.Cell.value <cp.prop: string>
Type Field
Description The cell value, if it is a string.
Notes None
Source src/extensions/cp/ui/Cell.lua line 115

# Methods

# textValueIs

Signature cp.ui.Cell.textValueIs(value) -> boolean
Type Method
Description Checks 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.
Notes None
Examples None
Source src/extensions/cp/ui/Cell.lua line 122