Adobe 12040118 Using Help - Page 216

Objects used as property values, Properties found only in Window elements, The Bounds Object

Page 216 highlights

Adobe After Effects Help Using Help Creating User Interface Elements Back 216 Property value visible Type Number Boolean Description (for Scrollbar and Slider) the value of the control, for instance, the position of the moveable part of a Scrollbar or Slider. If value is reset outside the bounded range minvalue, maxvalue, value is set to the closest boundary. Contains true if the object is physically visible, false otherwise. If set to false, the UI object is hidden, and if set to true, the object is made visible. Properties found only in Window elements Window elements contain the following properties, in addition to those described in the previous section. defaultElement -- Object The element to notify when a user types the Enter key, with the intent to dismiss the dialog as if the "OK" button had been clicked. cancelElement -- Object The element to notify when a user types the Esc key (or the combination on a Mac), with the intent to dismiss the dialog as if the "Cancel" button had been clicked. Objects used as property values The values of certain properties are represented by objects that the scripting interface defines. This section describes those objects. It includes a description of their semantics, ways to create them, and descriptions of their properties. The Bounds Object A Bounds object is used to define the boundaries of a Window or UI element within its coordinate space. You cannot directly create a Bounds object; one is created when you set an element's bounds property. Reading the bounds property always yields a Bounds object. Bounds contains an array describing the position and size of a UI element. The array values represent the coordinates of the upper left and lower right corners of the element: [left, top, right, bottom]. These are screen coordinates for window elements, and are relative to the coordinate space of the parent (container) element for other element types. You can set an element's bounds property and indirectly create a Bounds object in any of these ways: e.bounds = Object The object must contain properties named left, top, right, bottom, or x, y, width, height, where each property has an integer coordinate value. e.bounds = Array The array must have integer coordinate values in the order [left, top, right, bottom]. e.bounds = String The string must be an executable JavaScript inline object declaration, containing the same property names as in the object case just described. See "Element size and location" on page 198 for examples. A Bounds object may be accessed as an array. In addition, it supports the following properties Property left top Type Number Number Description The 'x' coordinate value of the left edge of the element. The 'y' coordinate value of the top edge of the element. Using Help Back 216

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • 211
  • 212
  • 213
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • 221
  • 222
  • 223
  • 224
  • 225
  • 226
  • 227
  • 228
  • 229
  • 230
  • 231
  • 232
  • 233
  • 234
  • 235
  • 236
  • 237
  • 238
  • 239
  • 240
  • 241
  • 242
  • 243
  • 244
  • 245
  • 246
  • 247
  • 248
  • 249
  • 250
  • 251
  • 252
  • 253

U
sing H
elp
B
ack
216
Adobe After Effects Help
Creating User Interface Elements
U
sing H
elp
B
ack
216
Properties found only in Window elements
Window
elements contain the following properties, in addition to those described in the previous section.
defaultElement --
Object
The element to notify when a user types the Enter key, with the intent to dismiss the dialog as if the “OK”
button had been clicked.
cancelElement --
Object
The element to notify when a user types the Esc key (or the <
Cmd
.> combination on a Mac), with the intent
to dismiss the dialog as if the “Cancel” button had been clicked.
Objects used as property values
The values of certain properties are represented by objects that the scripting interface defines. This section
describes those objects. It includes a description of their semantics, ways to create them, and descriptions of
their properties.
The Bounds Object
A
Bounds
object is used to define the boundaries of a
Window
or UI element within its
coordinate space. You cannot directly create a
Bounds
object; one is created when you set an
element’s
bounds
property. Reading the
bounds
property always yields a
Bounds
object.
Bounds
contains an array describing the position and size of a UI element. The array values represent
the coordinates of the upper left and lower right corners of the element: [
left, top, right,
bottom
]. These are screen coordinates for window elements, and are relative to the coordinate
space of the parent (container) element for other element types.
You can set an element’s
bounds
property and indirectly create a
Bounds
object in any of
these ways:
e.bounds =
Object
The object must contain properties named
left, top, right, bottom,
or
x, y, width, height,
where each property
has an integer coordinate value.
e.bounds =
Array
The array must have integer coordinate values in the order [
left, top, right, bottom]
.
e.bounds =
String
The string must be an executable JavaScript inline object declaration, containing the same property names as
in the object case just described.
See “Element size and location” on page 198 for examples.
A
Bounds
object may be accessed as an array. In addition, it supports the following properties
value
Number
(for
Scrollbar
and
Slider
) the value of the control, for instance, the position of
the moveable part of a
Scrollbar
or
Slider
. If
value
is reset outside the
bounded range
minvalue, maxvalue, value
is set to the closest boundary.
visible
Boolean
Contains
true
if the object is physically visible,
false
otherwise. If set to
false
,
the UI object is hidden, and if set to
true
, the object is made visible.
Property
Type
Description
left
Number
The ‘x’ coordinate value of the left edge of the element.
top
Number
The ‘y’ coordinate value of the top edge of the element.
Property
Type
Description