| 1 | n/a | """Suite Standard Suite: Common terms for most applications |
|---|
| 2 | n/a | Level 1, version 1 |
|---|
| 3 | n/a | |
|---|
| 4 | n/a | Generated from /Developer/Applications/Apple Help Indexing Tool.app |
|---|
| 5 | n/a | AETE/AEUT resource version 1/1, language 0, script 0 |
|---|
| 6 | n/a | """ |
|---|
| 7 | n/a | |
|---|
| 8 | n/a | import aetools |
|---|
| 9 | n/a | import MacOS |
|---|
| 10 | n/a | |
|---|
| 11 | n/a | _code = 'CoRe' |
|---|
| 12 | n/a | |
|---|
| 13 | n/a | from StdSuites.Standard_Suite import * |
|---|
| 14 | n/a | class Standard_Suite_Events(Standard_Suite_Events): |
|---|
| 15 | n/a | |
|---|
| 16 | n/a | _argmap_close = { |
|---|
| 17 | n/a | 'saving' : 'savo', |
|---|
| 18 | n/a | 'in_' : 'kfil', |
|---|
| 19 | n/a | } |
|---|
| 20 | n/a | |
|---|
| 21 | n/a | def close(self, _object, _attributes={}, **_arguments): |
|---|
| 22 | n/a | """close: Close an object |
|---|
| 23 | n/a | Required argument: the objects to close |
|---|
| 24 | n/a | Keyword argument saving: specifies whether or not changes should be saved before closing |
|---|
| 25 | n/a | Keyword argument in_: the file in which to save the object |
|---|
| 26 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 27 | n/a | """ |
|---|
| 28 | n/a | _code = 'core' |
|---|
| 29 | n/a | _subcode = 'clos' |
|---|
| 30 | n/a | |
|---|
| 31 | n/a | aetools.keysubst(_arguments, self._argmap_close) |
|---|
| 32 | n/a | _arguments['----'] = _object |
|---|
| 33 | n/a | |
|---|
| 34 | n/a | aetools.enumsubst(_arguments, 'savo', _Enum_savo) |
|---|
| 35 | n/a | |
|---|
| 36 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 37 | n/a | _arguments, _attributes) |
|---|
| 38 | n/a | if _arguments.get('errn', 0): |
|---|
| 39 | n/a | raise aetools.Error(aetools.decodeerror(_arguments)) |
|---|
| 40 | n/a | # XXXX Optionally decode result |
|---|
| 41 | n/a | if _arguments.has_key('----'): |
|---|
| 42 | n/a | return _arguments['----'] |
|---|
| 43 | n/a | |
|---|
| 44 | n/a | def data_size(self, _object, _attributes={}, **_arguments): |
|---|
| 45 | n/a | """data size: Return the size in bytes of an object |
|---|
| 46 | n/a | Required argument: the object whose data size is to be returned |
|---|
| 47 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 48 | n/a | Returns: the size of the object in bytes |
|---|
| 49 | n/a | """ |
|---|
| 50 | n/a | _code = 'core' |
|---|
| 51 | n/a | _subcode = 'dsiz' |
|---|
| 52 | n/a | |
|---|
| 53 | n/a | if _arguments: raise TypeError('No optional args expected') |
|---|
| 54 | n/a | _arguments['----'] = _object |
|---|
| 55 | n/a | |
|---|
| 56 | n/a | |
|---|
| 57 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 58 | n/a | _arguments, _attributes) |
|---|
| 59 | n/a | if _arguments.get('errn', 0): |
|---|
| 60 | n/a | raise aetools.Error(aetools.decodeerror(_arguments)) |
|---|
| 61 | n/a | # XXXX Optionally decode result |
|---|
| 62 | n/a | if _arguments.has_key('----'): |
|---|
| 63 | n/a | return _arguments['----'] |
|---|
| 64 | n/a | |
|---|
| 65 | n/a | def get(self, _object, _attributes={}, **_arguments): |
|---|
| 66 | n/a | """get: Get the data for an object |
|---|
| 67 | n/a | Required argument: the object whose data is to be returned |
|---|
| 68 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 69 | n/a | Returns: The data from the object |
|---|
| 70 | n/a | """ |
|---|
| 71 | n/a | _code = 'core' |
|---|
| 72 | n/a | _subcode = 'getd' |
|---|
| 73 | n/a | |
|---|
| 74 | n/a | if _arguments: raise TypeError('No optional args expected') |
|---|
| 75 | n/a | _arguments['----'] = _object |
|---|
| 76 | n/a | |
|---|
| 77 | n/a | |
|---|
| 78 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 79 | n/a | _arguments, _attributes) |
|---|
| 80 | n/a | if _arguments.get('errn', 0): |
|---|
| 81 | n/a | raise aetools.Error(aetools.decodeerror(_arguments)) |
|---|
| 82 | n/a | # XXXX Optionally decode result |
|---|
| 83 | n/a | if _arguments.has_key('----'): |
|---|
| 84 | n/a | return _arguments['----'] |
|---|
| 85 | n/a | |
|---|
| 86 | n/a | _argmap_make = { |
|---|
| 87 | n/a | 'new' : 'kocl', |
|---|
| 88 | n/a | 'at' : 'insh', |
|---|
| 89 | n/a | 'with_data' : 'data', |
|---|
| 90 | n/a | 'with_properties' : 'prdt', |
|---|
| 91 | n/a | } |
|---|
| 92 | n/a | |
|---|
| 93 | n/a | def make(self, _no_object=None, _attributes={}, **_arguments): |
|---|
| 94 | n/a | """make: Make a new element |
|---|
| 95 | n/a | Keyword argument new: the class of the new element |
|---|
| 96 | n/a | Keyword argument at: the location at which to insert the element |
|---|
| 97 | n/a | Keyword argument with_data: the initial data for the element |
|---|
| 98 | n/a | Keyword argument with_properties: the initial values for the properties of the element |
|---|
| 99 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 100 | n/a | Returns: Object specifier for the new element |
|---|
| 101 | n/a | """ |
|---|
| 102 | n/a | _code = 'core' |
|---|
| 103 | n/a | _subcode = 'crel' |
|---|
| 104 | n/a | |
|---|
| 105 | n/a | aetools.keysubst(_arguments, self._argmap_make) |
|---|
| 106 | n/a | if _no_object is not None: raise TypeError('No direct arg expected') |
|---|
| 107 | n/a | |
|---|
| 108 | n/a | |
|---|
| 109 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 110 | n/a | _arguments, _attributes) |
|---|
| 111 | n/a | if _arguments.get('errn', 0): |
|---|
| 112 | n/a | raise aetools.Error(aetools.decodeerror(_arguments)) |
|---|
| 113 | n/a | # XXXX Optionally decode result |
|---|
| 114 | n/a | if _arguments.has_key('----'): |
|---|
| 115 | n/a | return _arguments['----'] |
|---|
| 116 | n/a | |
|---|
| 117 | n/a | def open(self, _object, _attributes={}, **_arguments): |
|---|
| 118 | n/a | """open: Open the specified object(s) |
|---|
| 119 | n/a | Required argument: Objects to open. Can be a list of files or an object specifier. |
|---|
| 120 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 121 | n/a | """ |
|---|
| 122 | n/a | _code = 'aevt' |
|---|
| 123 | n/a | _subcode = 'odoc' |
|---|
| 124 | n/a | |
|---|
| 125 | n/a | if _arguments: raise TypeError('No optional args expected') |
|---|
| 126 | n/a | _arguments['----'] = _object |
|---|
| 127 | n/a | |
|---|
| 128 | n/a | |
|---|
| 129 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 130 | n/a | _arguments, _attributes) |
|---|
| 131 | n/a | if _arguments.get('errn', 0): |
|---|
| 132 | n/a | raise aetools.Error(aetools.decodeerror(_arguments)) |
|---|
| 133 | n/a | # XXXX Optionally decode result |
|---|
| 134 | n/a | if _arguments.has_key('----'): |
|---|
| 135 | n/a | return _arguments['----'] |
|---|
| 136 | n/a | |
|---|
| 137 | n/a | def print_(self, _object, _attributes={}, **_arguments): |
|---|
| 138 | n/a | """print: Print the specified object(s) |
|---|
| 139 | n/a | Required argument: Objects to print. Can be a list of files or an object specifier. |
|---|
| 140 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 141 | n/a | """ |
|---|
| 142 | n/a | _code = 'aevt' |
|---|
| 143 | n/a | _subcode = 'pdoc' |
|---|
| 144 | n/a | |
|---|
| 145 | n/a | if _arguments: raise TypeError('No optional args expected') |
|---|
| 146 | n/a | _arguments['----'] = _object |
|---|
| 147 | n/a | |
|---|
| 148 | n/a | |
|---|
| 149 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 150 | n/a | _arguments, _attributes) |
|---|
| 151 | n/a | if _arguments.get('errn', 0): |
|---|
| 152 | n/a | raise aetools.Error(aetools.decodeerror(_arguments)) |
|---|
| 153 | n/a | # XXXX Optionally decode result |
|---|
| 154 | n/a | if _arguments.has_key('----'): |
|---|
| 155 | n/a | return _arguments['----'] |
|---|
| 156 | n/a | |
|---|
| 157 | n/a | _argmap_save = { |
|---|
| 158 | n/a | 'in_' : 'kfil', |
|---|
| 159 | n/a | 'as' : 'fltp', |
|---|
| 160 | n/a | } |
|---|
| 161 | n/a | |
|---|
| 162 | n/a | def save(self, _object, _attributes={}, **_arguments): |
|---|
| 163 | n/a | """save: save a set of objects |
|---|
| 164 | n/a | Required argument: Objects to save. |
|---|
| 165 | n/a | Keyword argument in_: the file in which to save the object(s) |
|---|
| 166 | n/a | Keyword argument as: the file type of the document in which to save the data |
|---|
| 167 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 168 | n/a | """ |
|---|
| 169 | n/a | _code = 'core' |
|---|
| 170 | n/a | _subcode = 'save' |
|---|
| 171 | n/a | |
|---|
| 172 | n/a | aetools.keysubst(_arguments, self._argmap_save) |
|---|
| 173 | n/a | _arguments['----'] = _object |
|---|
| 174 | n/a | |
|---|
| 175 | n/a | |
|---|
| 176 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 177 | n/a | _arguments, _attributes) |
|---|
| 178 | n/a | if _arguments.get('errn', 0): |
|---|
| 179 | n/a | raise aetools.Error(aetools.decodeerror(_arguments)) |
|---|
| 180 | n/a | # XXXX Optionally decode result |
|---|
| 181 | n/a | if _arguments.has_key('----'): |
|---|
| 182 | n/a | return _arguments['----'] |
|---|
| 183 | n/a | |
|---|
| 184 | n/a | _argmap_set = { |
|---|
| 185 | n/a | 'to' : 'data', |
|---|
| 186 | n/a | } |
|---|
| 187 | n/a | |
|---|
| 188 | n/a | def set(self, _object, _attributes={}, **_arguments): |
|---|
| 189 | n/a | """set: Set an object\xd5s data |
|---|
| 190 | n/a | Required argument: the object to change |
|---|
| 191 | n/a | Keyword argument to: the new value |
|---|
| 192 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 193 | n/a | """ |
|---|
| 194 | n/a | _code = 'core' |
|---|
| 195 | n/a | _subcode = 'setd' |
|---|
| 196 | n/a | |
|---|
| 197 | n/a | aetools.keysubst(_arguments, self._argmap_set) |
|---|
| 198 | n/a | _arguments['----'] = _object |
|---|
| 199 | n/a | |
|---|
| 200 | n/a | |
|---|
| 201 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 202 | n/a | _arguments, _attributes) |
|---|
| 203 | n/a | if _arguments.get('errn', 0): |
|---|
| 204 | n/a | raise aetools.Error(aetools.decodeerror(_arguments)) |
|---|
| 205 | n/a | # XXXX Optionally decode result |
|---|
| 206 | n/a | if _arguments.has_key('----'): |
|---|
| 207 | n/a | return _arguments['----'] |
|---|
| 208 | n/a | |
|---|
| 209 | n/a | |
|---|
| 210 | n/a | class application(aetools.ComponentItem): |
|---|
| 211 | n/a | """application - An application program """ |
|---|
| 212 | n/a | want = 'capp' |
|---|
| 213 | n/a | # element 'cwin' as ['indx', 'name', 'rele'] |
|---|
| 214 | n/a | # element 'docu' as ['name'] |
|---|
| 215 | n/a | |
|---|
| 216 | n/a | class window(aetools.ComponentItem): |
|---|
| 217 | n/a | """window - A Window """ |
|---|
| 218 | n/a | want = 'cwin' |
|---|
| 219 | n/a | class _Prop_bounds(aetools.NProperty): |
|---|
| 220 | n/a | """bounds - the boundary rectangle for the window """ |
|---|
| 221 | n/a | which = 'pbnd' |
|---|
| 222 | n/a | want = 'qdrt' |
|---|
| 223 | n/a | class _Prop_closeable(aetools.NProperty): |
|---|
| 224 | n/a | """closeable - Does the window have a close box? """ |
|---|
| 225 | n/a | which = 'hclb' |
|---|
| 226 | n/a | want = 'bool' |
|---|
| 227 | n/a | class _Prop_floating(aetools.NProperty): |
|---|
| 228 | n/a | """floating - Does the window float? """ |
|---|
| 229 | n/a | which = 'isfl' |
|---|
| 230 | n/a | want = 'bool' |
|---|
| 231 | n/a | class _Prop_index(aetools.NProperty): |
|---|
| 232 | n/a | """index - the number of the window """ |
|---|
| 233 | n/a | which = 'pidx' |
|---|
| 234 | n/a | want = 'long' |
|---|
| 235 | n/a | class _Prop_modal(aetools.NProperty): |
|---|
| 236 | n/a | """modal - Is the window modal? """ |
|---|
| 237 | n/a | which = 'pmod' |
|---|
| 238 | n/a | want = 'bool' |
|---|
| 239 | n/a | class _Prop_name(aetools.NProperty): |
|---|
| 240 | n/a | """name - the title of the window """ |
|---|
| 241 | n/a | which = 'pnam' |
|---|
| 242 | n/a | want = 'itxt' |
|---|
| 243 | n/a | class _Prop_position(aetools.NProperty): |
|---|
| 244 | n/a | """position - upper left coordinates of window """ |
|---|
| 245 | n/a | which = 'ppos' |
|---|
| 246 | n/a | want = 'QDpt' |
|---|
| 247 | n/a | class _Prop_resizable(aetools.NProperty): |
|---|
| 248 | n/a | """resizable - Is the window resizable? """ |
|---|
| 249 | n/a | which = 'prsz' |
|---|
| 250 | n/a | want = 'bool' |
|---|
| 251 | n/a | class _Prop_titled(aetools.NProperty): |
|---|
| 252 | n/a | """titled - Does the window have a title bar? """ |
|---|
| 253 | n/a | which = 'ptit' |
|---|
| 254 | n/a | want = 'bool' |
|---|
| 255 | n/a | class _Prop_visible(aetools.NProperty): |
|---|
| 256 | n/a | """visible - is the window visible? """ |
|---|
| 257 | n/a | which = 'pvis' |
|---|
| 258 | n/a | want = 'bool' |
|---|
| 259 | n/a | class _Prop_zoomable(aetools.NProperty): |
|---|
| 260 | n/a | """zoomable - Is the window zoomable? """ |
|---|
| 261 | n/a | which = 'iszm' |
|---|
| 262 | n/a | want = 'bool' |
|---|
| 263 | n/a | class _Prop_zoomed(aetools.NProperty): |
|---|
| 264 | n/a | """zoomed - Is the window zoomed? """ |
|---|
| 265 | n/a | which = 'pzum' |
|---|
| 266 | n/a | want = 'bool' |
|---|
| 267 | n/a | |
|---|
| 268 | n/a | class document(aetools.ComponentItem): |
|---|
| 269 | n/a | """document - A Document """ |
|---|
| 270 | n/a | want = 'docu' |
|---|
| 271 | n/a | class _Prop_modified(aetools.NProperty): |
|---|
| 272 | n/a | """modified - Has the document been modified since the last save? """ |
|---|
| 273 | n/a | which = 'imod' |
|---|
| 274 | n/a | want = 'bool' |
|---|
| 275 | n/a | application._superclassnames = [] |
|---|
| 276 | n/a | application._privpropdict = { |
|---|
| 277 | n/a | } |
|---|
| 278 | n/a | application._privelemdict = { |
|---|
| 279 | n/a | 'document' : document, |
|---|
| 280 | n/a | 'window' : window, |
|---|
| 281 | n/a | } |
|---|
| 282 | n/a | window._superclassnames = [] |
|---|
| 283 | n/a | window._privpropdict = { |
|---|
| 284 | n/a | 'bounds' : _Prop_bounds, |
|---|
| 285 | n/a | 'closeable' : _Prop_closeable, |
|---|
| 286 | n/a | 'floating' : _Prop_floating, |
|---|
| 287 | n/a | 'index' : _Prop_index, |
|---|
| 288 | n/a | 'modal' : _Prop_modal, |
|---|
| 289 | n/a | 'name' : _Prop_name, |
|---|
| 290 | n/a | 'position' : _Prop_position, |
|---|
| 291 | n/a | 'resizable' : _Prop_resizable, |
|---|
| 292 | n/a | 'titled' : _Prop_titled, |
|---|
| 293 | n/a | 'visible' : _Prop_visible, |
|---|
| 294 | n/a | 'zoomable' : _Prop_zoomable, |
|---|
| 295 | n/a | 'zoomed' : _Prop_zoomed, |
|---|
| 296 | n/a | } |
|---|
| 297 | n/a | window._privelemdict = { |
|---|
| 298 | n/a | } |
|---|
| 299 | n/a | document._superclassnames = [] |
|---|
| 300 | n/a | document._privpropdict = { |
|---|
| 301 | n/a | 'modified' : _Prop_modified, |
|---|
| 302 | n/a | 'name' : _Prop_name, |
|---|
| 303 | n/a | } |
|---|
| 304 | n/a | document._privelemdict = { |
|---|
| 305 | n/a | } |
|---|
| 306 | n/a | _Enum_savo = { |
|---|
| 307 | n/a | 'yes' : 'yes ', # Save objects now |
|---|
| 308 | n/a | 'no' : 'no ', # Do not save objects |
|---|
| 309 | n/a | 'ask' : 'ask ', # Ask the user whether to save |
|---|
| 310 | n/a | } |
|---|
| 311 | n/a | |
|---|
| 312 | n/a | |
|---|
| 313 | n/a | # |
|---|
| 314 | n/a | # Indices of types declared in this module |
|---|
| 315 | n/a | # |
|---|
| 316 | n/a | _classdeclarations = { |
|---|
| 317 | n/a | 'capp' : application, |
|---|
| 318 | n/a | 'cwin' : window, |
|---|
| 319 | n/a | 'docu' : document, |
|---|
| 320 | n/a | } |
|---|
| 321 | n/a | |
|---|
| 322 | n/a | _propdeclarations = { |
|---|
| 323 | n/a | 'hclb' : _Prop_closeable, |
|---|
| 324 | n/a | 'imod' : _Prop_modified, |
|---|
| 325 | n/a | 'isfl' : _Prop_floating, |
|---|
| 326 | n/a | 'iszm' : _Prop_zoomable, |
|---|
| 327 | n/a | 'pbnd' : _Prop_bounds, |
|---|
| 328 | n/a | 'pidx' : _Prop_index, |
|---|
| 329 | n/a | 'pmod' : _Prop_modal, |
|---|
| 330 | n/a | 'pnam' : _Prop_name, |
|---|
| 331 | n/a | 'ppos' : _Prop_position, |
|---|
| 332 | n/a | 'prsz' : _Prop_resizable, |
|---|
| 333 | n/a | 'ptit' : _Prop_titled, |
|---|
| 334 | n/a | 'pvis' : _Prop_visible, |
|---|
| 335 | n/a | 'pzum' : _Prop_zoomed, |
|---|
| 336 | n/a | } |
|---|
| 337 | n/a | |
|---|
| 338 | n/a | _compdeclarations = { |
|---|
| 339 | n/a | } |
|---|
| 340 | n/a | |
|---|
| 341 | n/a | _enumdeclarations = { |
|---|
| 342 | n/a | 'savo' : _Enum_savo, |
|---|
| 343 | n/a | } |
|---|