1
"""Suite Standard Suite: Common terms for most applications
4
Generated from /Developer/Applications/Apple Help Indexing Tool.app
5
AETE/AEUT resource version 1/1, language 0, script 0
13
from StdSuites.Standard_Suite import *
14
class Standard_Suite_Events(Standard_Suite_Events):
21
def close(self, _object, _attributes={}, **_arguments):
22
"""close: Close an object
23
Required argument: the objects to close
24
Keyword argument saving: specifies whether or not changes should be saved before closing
25
Keyword argument in_: the file in which to save the object
26
Keyword argument _attributes: AppleEvent attribute dictionary
31
aetools.keysubst(_arguments, self._argmap_close)
32
_arguments['----'] = _object
34
aetools.enumsubst(_arguments, 'savo', _Enum_savo)
36
_reply, _arguments, _attributes = self.send(_code, _subcode,
37
_arguments, _attributes)
38
if _arguments.get('errn', 0):
39
raise aetools.Error(aetools.decodeerror(_arguments))
40
# XXXX Optionally decode result
41
if _arguments.has_key('----'):
42
return _arguments['----']
44
def data_size(self, _object, _attributes={}, **_arguments):
45
"""data size: Return the size in bytes of an object
46
Required argument: the object whose data size is to be returned
47
Keyword argument _attributes: AppleEvent attribute dictionary
48
Returns: the size of the object in bytes
53
if _arguments: raise TypeError('No optional args expected')
54
_arguments['----'] = _object
57
_reply, _arguments, _attributes = self.send(_code, _subcode,
58
_arguments, _attributes)
59
if _arguments.get('errn', 0):
60
raise aetools.Error(aetools.decodeerror(_arguments))
61
# XXXX Optionally decode result
62
if _arguments.has_key('----'):
63
return _arguments['----']
65
def get(self, _object, _attributes={}, **_arguments):
66
"""get: Get the data for an object
67
Required argument: the object whose data is to be returned
68
Keyword argument _attributes: AppleEvent attribute dictionary
69
Returns: The data from the object
74
if _arguments: raise TypeError('No optional args expected')
75
_arguments['----'] = _object
78
_reply, _arguments, _attributes = self.send(_code, _subcode,
79
_arguments, _attributes)
80
if _arguments.get('errn', 0):
81
raise aetools.Error(aetools.decodeerror(_arguments))
82
# XXXX Optionally decode result
83
if _arguments.has_key('----'):
84
return _arguments['----']
90
'with_properties' : 'prdt',
93
def make(self, _no_object=None, _attributes={}, **_arguments):
94
"""make: Make a new element
95
Keyword argument new: the class of the new element
96
Keyword argument at: the location at which to insert the element
97
Keyword argument with_data: the initial data for the element
98
Keyword argument with_properties: the initial values for the properties of the element
99
Keyword argument _attributes: AppleEvent attribute dictionary
100
Returns: Object specifier for the new element
105
aetools.keysubst(_arguments, self._argmap_make)
106
if _no_object is not None: raise TypeError('No direct arg expected')
109
_reply, _arguments, _attributes = self.send(_code, _subcode,
110
_arguments, _attributes)
111
if _arguments.get('errn', 0):
112
raise aetools.Error(aetools.decodeerror(_arguments))
113
# XXXX Optionally decode result
114
if _arguments.has_key('----'):
115
return _arguments['----']
117
def open(self, _object, _attributes={}, **_arguments):
118
"""open: Open the specified object(s)
119
Required argument: Objects to open. Can be a list of files or an object specifier.
120
Keyword argument _attributes: AppleEvent attribute dictionary
125
if _arguments: raise TypeError('No optional args expected')
126
_arguments['----'] = _object
129
_reply, _arguments, _attributes = self.send(_code, _subcode,
130
_arguments, _attributes)
131
if _arguments.get('errn', 0):
132
raise aetools.Error(aetools.decodeerror(_arguments))
133
# XXXX Optionally decode result
134
if _arguments.has_key('----'):
135
return _arguments['----']
137
def print_(self, _object, _attributes={}, **_arguments):
138
"""print: Print the specified object(s)
139
Required argument: Objects to print. Can be a list of files or an object specifier.
140
Keyword argument _attributes: AppleEvent attribute dictionary
145
if _arguments: raise TypeError('No optional args expected')
146
_arguments['----'] = _object
149
_reply, _arguments, _attributes = self.send(_code, _subcode,
150
_arguments, _attributes)
151
if _arguments.get('errn', 0):
152
raise aetools.Error(aetools.decodeerror(_arguments))
153
# XXXX Optionally decode result
154
if _arguments.has_key('----'):
155
return _arguments['----']
162
def save(self, _object, _attributes={}, **_arguments):
163
"""save: save a set of objects
164
Required argument: Objects to save.
165
Keyword argument in_: the file in which to save the object(s)
166
Keyword argument as: the file type of the document in which to save the data
167
Keyword argument _attributes: AppleEvent attribute dictionary
172
aetools.keysubst(_arguments, self._argmap_save)
173
_arguments['----'] = _object
176
_reply, _arguments, _attributes = self.send(_code, _subcode,
177
_arguments, _attributes)
178
if _arguments.get('errn', 0):
179
raise aetools.Error(aetools.decodeerror(_arguments))
180
# XXXX Optionally decode result
181
if _arguments.has_key('----'):
182
return _arguments['----']
188
def set(self, _object, _attributes={}, **_arguments):
189
"""set: Set an object\xd5s data
190
Required argument: the object to change
191
Keyword argument to: the new value
192
Keyword argument _attributes: AppleEvent attribute dictionary
197
aetools.keysubst(_arguments, self._argmap_set)
198
_arguments['----'] = _object
201
_reply, _arguments, _attributes = self.send(_code, _subcode,
202
_arguments, _attributes)
203
if _arguments.get('errn', 0):
204
raise aetools.Error(aetools.decodeerror(_arguments))
205
# XXXX Optionally decode result
206
if _arguments.has_key('----'):
207
return _arguments['----']
210
class application(aetools.ComponentItem):
211
"""application - An application program """
213
# element 'cwin' as ['indx', 'name', 'rele']
214
# element 'docu' as ['name']
216
class window(aetools.ComponentItem):
217
"""window - A Window """
219
class _Prop_bounds(aetools.NProperty):
220
"""bounds - the boundary rectangle for the window """
223
class _Prop_closeable(aetools.NProperty):
224
"""closeable - Does the window have a close box? """
227
class _Prop_floating(aetools.NProperty):
228
"""floating - Does the window float? """
231
class _Prop_index(aetools.NProperty):
232
"""index - the number of the window """
235
class _Prop_modal(aetools.NProperty):
236
"""modal - Is the window modal? """
239
class _Prop_name(aetools.NProperty):
240
"""name - the title of the window """
243
class _Prop_position(aetools.NProperty):
244
"""position - upper left coordinates of window """
247
class _Prop_resizable(aetools.NProperty):
248
"""resizable - Is the window resizable? """
251
class _Prop_titled(aetools.NProperty):
252
"""titled - Does the window have a title bar? """
255
class _Prop_visible(aetools.NProperty):
256
"""visible - is the window visible? """
259
class _Prop_zoomable(aetools.NProperty):
260
"""zoomable - Is the window zoomable? """
263
class _Prop_zoomed(aetools.NProperty):
264
"""zoomed - Is the window zoomed? """
268
class document(aetools.ComponentItem):
269
"""document - A Document """
271
class _Prop_modified(aetools.NProperty):
272
"""modified - Has the document been modified since the last save? """
275
application._superclassnames = []
276
application._privpropdict = {
278
application._privelemdict = {
279
'document' : document,
282
window._superclassnames = []
283
window._privpropdict = {
284
'bounds' : _Prop_bounds,
285
'closeable' : _Prop_closeable,
286
'floating' : _Prop_floating,
287
'index' : _Prop_index,
288
'modal' : _Prop_modal,
290
'position' : _Prop_position,
291
'resizable' : _Prop_resizable,
292
'titled' : _Prop_titled,
293
'visible' : _Prop_visible,
294
'zoomable' : _Prop_zoomable,
295
'zoomed' : _Prop_zoomed,
297
window._privelemdict = {
299
document._superclassnames = []
300
document._privpropdict = {
301
'modified' : _Prop_modified,
304
document._privelemdict = {
307
'yes' : 'yes ', # Save objects now
308
'no' : 'no ', # Do not save objects
309
'ask' : 'ask ', # Ask the user whether to save
314
# Indices of types declared in this module
316
_classdeclarations = {
317
'capp' : application,
322
_propdeclarations = {
323
'hclb' : _Prop_closeable,
324
'imod' : _Prop_modified,
325
'isfl' : _Prop_floating,
326
'iszm' : _Prop_zoomable,
327
'pbnd' : _Prop_bounds,
328
'pidx' : _Prop_index,
329
'pmod' : _Prop_modal,
331
'ppos' : _Prop_position,
332
'prsz' : _Prop_resizable,
333
'ptit' : _Prop_titled,
334
'pvis' : _Prop_visible,
335
'pzum' : _Prop_zoomed,
338
_compdeclarations = {
341
_enumdeclarations = {