Internationalisation
Bundled Plugins API
RadioGroup
Represents an AXRadioGroup, providing utility methods.

API Overview

API Documentation

Functions

matches

Signature
cp.ui.RadioGroup.matches(element) -> boolean
Type
Function
Description
Checks if the provided axuielement is a RadioGroup.
Parameters
  • element - The element to check.
Returns
  • true if the element is a RadioGroup.

Constructors

Signature
cp.ui.RadioGroup(parent, uiFinder[, createOptionFn]) -> cp.ui.RadioGroup
Type
Constructor
Description
Creates a new RadioGroup.
Parameters
  • parent - The parent table.
  • uiFinder - The function which will find the axuielement representing the RadioGroup.
  • createOptionFn - If provided a function that receives the RadioGroup and an axuielement for a given option within the group.
Returns
  • The new RadioGroup instance.

Fields

Signature
cp.ui.RadioGroup.optionCount <cp.prop: number; read-only>
Type
Field
Description
The number of options in the group.

options

Signature
cp.ui.RadioGroup.options <table: cp.ui.Element; read-only>
Type
Field
Description
A table containing cp.ui.Element available in the radio group.
Returns
  • The cp.prop of options.

optionsUI

Signature
cp.ui.RadioGroup.optionsUI <cp.prop: axuielement; read-only>
Type
Field
Description
A cp.prop containing table of axuielement options available in the radio group.
Returns
  • The cp.prop of options.
Signature
cp.ui.RadioGroup.selectedOption <cp.prop: number>
Type
Field
Description
The currently selected option number.

Methods

Signature
cp.ui.RadioGroup:doNextOption() -> cp.rx.go.Statement<boolean>
Type
Method
Description
A Statement that selects the next option in the group.
Parameters
  • None
Returns
  • The Statement, that resolves to true if successful or sends an error if not.
Signature
cp.ui.RadioGroup:doPreviousOption() -> cp.rx.go.Statement<boolean>
Type
Method
Description
A Statement that selects the previous option in the group.
Parameters
  • None
Returns
  • The Statement, which resolves to true if successful or sends an error if not..
Signature
cp.ui.RadioGroup:doSelectOption(index) -> cp.rx.go.Statement<boolean>
Type
Method
Description
A Statement which will attempt to select the option at the specified index.
Parameters
  • index - The index to select. Must be between 1 and optionCount.
Returns
  • The Statement, which will resolve to true if successful or send an error if not.
Signature
cp.ui.RadioGroup:nextOption() -> self
Type
Method
Description
Selects the next option in the group. Cycles from the last to the first option.
Parameters
  • None
Returns
  • The RadioGroup.
Signature
cp.ui.RadioGroup:previousOption() -> self
Type
Method
Description
Selects the previous option in the group. Cycles from the first to the last item.
Parameters
  • None
Returns
  • The RadioGroup.
Last modified 1mo ago