#cp.ui.Sheet

Sheet UI Module.


#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.Sheet.matches(element) -> boolean
TypeFunction
DescriptionChecks to see if an element matches what we think it should be.
Parameters
  • element - An axuielementObject to check.
Returns
  • true if matches otherwise false
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/Sheet.lua line 16

#Constructors

Signaturecp.ui.Sheet(parent, uiFinder) -> Sheet
TypeConstructor
DescriptionCreates a new Sheet instance.
Parameters
  • parent - The parent object.
  • uiFinder - The UI, either a cp.prop or a function.
Returns
  • A new Browser object.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/Sheet.lua line 29

#Fields

Signaturecp.ui.Sheet.cancel <cp.ui.Button>
TypeField
DescriptionThe cancel Button for the Sheet.
NotesNone
Sourcesrc/extensions/cp/ui/Sheet.lua line 57

Signaturecp.ui.Sheet.default <cp.ui.Button>
TypeField
DescriptionThe default Button for the Sheet.
NotesNone
Sourcesrc/extensions/cp/ui/Sheet.lua line 50

Signaturecp.ui.Sheet.title <cp.prop: string>
TypeField
DescriptionGets the title of the sheet.
NotesNone
Sourcesrc/extensions/cp/ui/Sheet.lua line 43

#Methods

Signaturecp.ui.Sheet:containsText(value[, plain]) -> boolean
TypeMethod
DescriptionChecks if there are any child text elements containing the exact text or pattern, from beginning to end.
Parameters
  • textPattern - The text pattern to check.
  • plain - If true, the text will be compared exactly, otherwise it will be considered to be a pattern. Defaults to false.
Returns
  • true if an element's AXValue matches the text pattern exactly.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/Sheet.lua line 171

Signaturecp.ui.Sheet:doCancel() -> cp.rx.go.Statement <boolean>
TypeMethod
DescriptionAttempts to hide the Sheet (if visible) by pressing the Cancel button.
Parameters
  • None
Returns
  • A Statement to execute, resolving to true if the button was present and clicked, otherwise false.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/Sheet.lua line 94

Signaturecp.ui.Sheet:doDefault() -> cp.rx.go.Statement <boolean>
TypeMethod
DescriptionAttempts to press the default Button.
Parameters
  • None
Returns
  • A Statement to execute, resolving to true if the button was present and clicked, otherwise false.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/Sheet.lua line 107

Signaturecp.ui.Sheet:doHide() -> cp.rx.go.Statement <boolean>
TypeMethod
DescriptionAttempts to hide the Sheet (if visible) by pressing the Cancel button.
Parameters
  • None
Returns
  • A Statement to execute, resolving to true if the button was present and clicked, otherwise false.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/Sheet.lua line 77

Signaturecp.ui.Sheet:doPress(buttonFromLeft) -> cp.rx.go.Statement <boolean>
TypeMethod
DescriptionAttempts to press the indicated button from left-to-right, if it can be found.
Parameters
  • buttonFromLeft - The number of the button from left-to-right.
Returns
  • a Statement to execute, resolving in true if the button was found and pressed, otherwise false.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/Sheet.lua line 120

Signaturecp.ui.Sheet:hide() -> none
TypeMethod
DescriptionHides the sheet by pressing the "Cancel" button, if it exists.
Parameters
  • None
Returns
  • None
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/Sheet.lua line 64

Signaturecp.ui.Sheet:pressCancel() -> self, boolean
TypeMethod
DescriptionPresses the Cancel button.
Parameters
  • None
Returns
  • The Sheet object.
  • true if successful, otherwise false.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/Sheet.lua line 141

Signaturecp.ui.Sheet:pressDefault() -> self, boolean
TypeMethod
DescriptionPresses the Default button.
Parameters
  • None
Returns
  • The Sheet object.
  • true if successful, otherwise false.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/Sheet.lua line 156