Internationalisation
Bundled Plugins API
Sheet
Sheet UI Module.

API Overview

API Documentation

Functions

matches

Signature
cp.ui.Sheet.matches(element) -> boolean
Type
Function
Description
Checks to see if an element matches what we think it should be.
Parameters
  • element - An axuielementObject to check.
Returns
  • true if matches otherwise false

Constructors

Sheet

Signature
cp.ui.Sheet(parent, uiFinder) -> Sheet
Type
Constructor
Description
Creates a new Sheet instance.
Parameters
  • parent - The parent object.
  • uiFinder - The UI, either a cp.prop or a function.
Returns
  • A new Browser object.

Fields

cancel

Signature
cp.ui.Sheet.cancel <cp.ui.Button>
Type
Field
Description
The cancel Button for the Sheet.

default

Signature
cp.ui.Sheet.default <cp.ui.Button>
Type
Field
Description
The default Button for the Sheet.

title

Signature
cp.ui.Sheet.title <cp.prop: string>
Type
Field
Description
Gets the title of the sheet.

Methods

Signature
cp.ui.Sheet:containsText(value[, plain]) -> boolean
Type
Method
Description
Checks 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.

doCancel

Signature
cp.ui.Sheet:doCancel() -> cp.rx.go.Statement <boolean>
Type
Method
Description
Attempts 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.

doDefault

Signature
cp.ui.Sheet:doDefault() -> cp.rx.go.Statement <boolean>
Type
Method
Description
Attempts to press the default Button.
Parameters
  • None
Returns
  • A Statement to execute, resolving to true if the button was present and clicked, otherwise false.

doHide

Signature
cp.ui.Sheet:doHide() -> cp.rx.go.Statement <boolean>
Type
Method
Description
Attempts 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.

doPress

Signature
cp.ui.Sheet:doPress(buttonFromLeft) -> cp.rx.go.Statement <boolean>
Type
Method
Description
Attempts 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.

hide

Signature
cp.ui.Sheet:hide() -> none
Type
Method
Description
Hides the sheet by pressing the "Cancel" button, if it exists.
Parameters
  • None
Returns
  • None
Signature
cp.ui.Sheet:pressCancel() -> self, boolean
Type
Method
Description
Presses the Cancel button.
Parameters
  • None
Returns
  • The Sheet object.
  • true if successful, otherwise false.
Signature
cp.ui.Sheet:pressDefault() -> self, boolean
Type
Method
Description
Presses the Default button.
Parameters
  • None
Returns
  • The Sheet object.
  • true if successful, otherwise false.
Last modified 1mo ago