Scoop API

scoop:scoop.window:0.1.0

src/accessibility/properties_builder.scoop

Selected production source · src/accessibility/properties_builder.scoop

1package scoop.window.accessibility
3import scoop.window.Utf8Selection
5/** Copies a complete immutable snapshot without publishing it or executing actions. */
6public fun SemanticProperties.copy(
7 configure: SemanticPropertiesBuilder.() -> Unit
8): SemanticProperties {
9 val builder = SemanticPropertiesBuilder(this)
10 builder.configure()
11 return builder.snapshot()
14/** Mutable staging for one property copy; node update validates the resulting snapshot. */
15public class SemanticPropertiesBuilder internal constructor(source: SemanticProperties) {
16 public var name: String? = source.name
17 public var description: String? = source.description
18 public var automationId: String? = source.automationId
19 public var value: String? = source.value
20 public var enabled: Boolean = source.enabled
21 public var readOnly: Boolean = source.readOnly
22 public var protectedText: Boolean = source.protectedText
23 public var checked: SemanticChecked? = source.checked
24 public var hidden: Boolean = source.hidden
25 public var error: String? = source.error
26 public var ignored: Boolean = source.ignored
27 public var selection: Utf8Selection? = source.selection
28 public var required: Boolean = source.required
29 public var scroll: SemanticScrollRange? = source.scroll
30 public var cursorAffinity: SemanticTextAffinity = source.cursorAffinity
31 public var selected: Boolean? = source.selected
32 public var expanded: Boolean? = source.expanded
33 public var invalid: Boolean = source.invalid
34 public var busy: Boolean = source.busy
35 public var modal: Boolean = source.modal
36 public var headingLevel: Int? = source.headingLevel
37 public var range: SemanticValueRange? = source.range
38 public var url: String? = source.url
39 public var live: SemanticLive = source.live
40 public var table: SemanticTableSize? = source.table
41 public var cell: SemanticTableCell? = source.cell
42 public var orientation: SemanticOrientation? = source.orientation
43 public var selectionMode: SemanticSelectionMode? = source.selectionMode
44 public var multiline: Boolean = source.multiline
45 internal fun snapshot(): SemanticProperties =
46 SemanticProperties(
47 name,
48 description,
49 automationId,
50 value,
51 enabled,
52 readOnly,
53 protectedText,
54 checked,
55 hidden,
56 error,
57 ignored,
58 selection,
59 required,
60 scroll,
61 cursorAffinity,
62 selected,
63 expanded,
64 invalid,
65 busy,
66 modal,
67 headingLevel,
68 range,
69 url,
70 live,
71 table,
72 cell,
73 orientation,
74 selectionMode,
75 multiline
76 )