#cp.ui.SplitGroup

Split Group UI. A SplitGroup is a container that can be split into multiple sections. Each section is an Element, and they are divided by a Splitter, resulting in something like { Element, Splitter, 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


#API Documentation

#Functions

Signaturecp.ui.SplitGroup.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/SplitGroup.lua line 21

#Constructors

Signaturecp.ui.SplitGroup(parent, uiFinder, childInits) -> cp.ui.SplitGroup
TypeConstructor
DescriptionCreates a new SplitGroup.
Parameters
  • parent - The parent object.
  • uiFinder - The function or cp.prop which returns an hs.axuielement for the SplitGroup, or nil.
  • childInits - A table of section-creating functions, in order, including the Splitters.
Returns
  • A new SplitGroup instance.
Notes
  • Many childInints values can be the actual Element value (eg: TextArea), since they only require the parent and uiFinder parameters.
  • The cp.fn.ax.init function can be useful for passing in Element types which require more than just the parent and uiFinder values.
  • Example: `SplitGroup(parent, uiFinder, { cp.fn.ax.init(ScrollArea, cp.ui.List), cp.fn.ax.init(ScrollArea, cp.ui.TextArea) })
ExamplesNone
Sourcesrc/extensions/cp/ui/SplitGroup.lua line 32

#Fields

Signaturecp.ui.SplitGroup.children <table: cp.ui.Element, read-only>
TypeField
DescriptionAll children of the Split Group, based on the childInits passed to the constructor.
NotesNone
Sourcesrc/extensions/cp/ui/SplitGroup.lua line 60

Signaturecp.ui.SplitGroup.childrenUI <cp.prop: table of axuielementObject, read-only>
TypeField
DescriptionThe list of axuielementObjects for the sections, sorted in top-down order.
NotesNone
Sourcesrc/extensions/cp/ui/SplitGroup.lua line 53

Signaturecp.ui.SplitGroup.sections <table: table of cp.ui.Element, read-only>
TypeField
DescriptionThe Sections of the SplitGroup. Each section will be a table of cp.ui.Elements.
NotesNone
Sourcesrc/extensions/cp/ui/SplitGroup.lua line 80

Signaturecp.ui.SplitGroup.splitters <table: cp.ui.Splitter, read-only>
TypeField
DescriptionThe Splitters of the SplitGroup. There will be one less splitter than there are sections.
NotesNone
Sourcesrc/extensions/cp/ui/SplitGroup.lua line 75

Signaturecp.ui.SplitGroup.splittersUI <cp.prop: table of axuielementObject, read-only>
TypeField
DescriptionThe list of axuielementObjects for the splitters.
NotesNone
Sourcesrc/extensions/cp/ui/SplitGroup.lua line 68