1 """Suite Standard Suite: Common terms for most applications
4 Generated from /Volumes/Sap/Applications (Mac OS 9)/Metrowerks CodeWarrior 7.0/Metrowerks CodeWarrior/CodeWarrior IDE 4.2.5
5 AETE/AEUT resource version 1/0, 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 object to close
24 Keyword argument saving: specifies whether or not changes should be saved before closing
25 Keyword argument saving_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
['----']
48 def count(self
, _object
, _attributes
={}, **_arguments
):
49 """count: return the number of elements of a particular class within an object
50 Required argument: the object whose elements are to be counted
51 Keyword argument each: the class of the elements to be counted. Keyword 'each' is optional in AppleScript
52 Keyword argument _attributes: AppleEvent attribute dictionary
53 Returns: the number of elements
58 aetools
.keysubst(_arguments
, self
._argmap
_count
)
59 _arguments
['----'] = _object
62 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
63 _arguments
, _attributes
)
64 if _arguments
.get('errn', 0):
65 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
66 # XXXX Optionally decode result
67 if _arguments
.has_key('----'):
68 return _arguments
['----']
74 def get(self
, _object
, _attributes
={}, **_arguments
):
75 """get: get the data for an object
76 Required argument: the object whose data is to be returned
77 Keyword argument as: the desired types for the data, in order of preference
78 Keyword argument _attributes: AppleEvent attribute dictionary
79 Returns: The data from the object
84 aetools
.keysubst(_arguments
, self
._argmap
_get
)
85 _arguments
['----'] = _object
88 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
89 _arguments
, _attributes
)
90 if _arguments
.get('errn', 0):
91 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
92 # XXXX Optionally decode result
93 if _arguments
.has_key('----'):
94 return _arguments
['----']
100 'with_data' : 'data',
101 'with_properties' : 'prdt',
104 def make(self
, _no_object
=None, _attributes
={}, **_arguments
):
105 """make: make a new element
106 Keyword argument new: the class of the new element\xd1keyword 'new' is optional in AppleScript
107 Keyword argument as: the desired types for the data, in order of preference
108 Keyword argument at: the location at which to insert the element
109 Keyword argument with_data: the initial data for the element
110 Keyword argument with_properties: the initial values for the properties of the element
111 Keyword argument _attributes: AppleEvent attribute dictionary
112 Returns: to the new object(s)
117 aetools
.keysubst(_arguments
, self
._argmap
_make
)
118 if _no_object
!= None: raise TypeError, 'No direct arg expected'
121 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
122 _arguments
, _attributes
)
123 if _arguments
.get('errn', 0):
124 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
125 # XXXX Optionally decode result
126 if _arguments
.has_key('----'):
127 return _arguments
['----']
129 def select(self
, _object
=None, _attributes
={}, **_arguments
):
130 """select: select the specified object
131 Required argument: the object to select
132 Keyword argument _attributes: AppleEvent attribute dictionary
137 if _arguments
: raise TypeError, 'No optional args expected'
138 _arguments
['----'] = _object
141 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
142 _arguments
, _attributes
)
143 if _arguments
.get('errn', 0):
144 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
145 # XXXX Optionally decode result
146 if _arguments
.has_key('----'):
147 return _arguments
['----']
153 def set(self
, _object
, _attributes
={}, **_arguments
):
154 """set: set an object's data
155 Required argument: the object to change
156 Keyword argument to: the new value
157 Keyword argument _attributes: AppleEvent attribute dictionary
162 aetools
.keysubst(_arguments
, self
._argmap
_set
)
163 _arguments
['----'] = _object
166 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
167 _arguments
, _attributes
)
168 if _arguments
.get('errn', 0):
169 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
170 # XXXX Optionally decode result
171 if _arguments
.has_key('----'):
172 return _arguments
['----']
175 class application(aetools
.ComponentItem
):
176 """application - an application program """
178 class user_interaction(aetools
.NProperty
):
179 """user interaction - user interaction level """
182 # element 'docu' as ['indx', 'name', 'rang']
183 # element 'cwin' as ['indx', 'name', 'rang']
185 class character(aetools
.ComponentItem
):
186 """character - a character """
188 class offset(aetools
.NProperty
):
189 """offset - offset of a text object from the beginning of the document (first char has offset 1) """
192 class length(aetools
.NProperty
):
193 """length - length in characters of this object """
197 class document(aetools
.ComponentItem
):
198 """document - a document """
200 class name(aetools
.NProperty
):
201 """name - the title of the document """
204 class kind(aetools
.NProperty
):
205 """kind - the kind of document """
208 class index(aetools
.NProperty
):
209 """index - the number of the document """
212 class location(aetools
.NProperty
):
213 """location - the file of the document """
216 class file_permissions(aetools
.NProperty
):
217 """file permissions - the file permissions for the document """
220 class window(aetools
.NProperty
):
221 """window - the window of the document. """
227 class file(aetools
.ComponentItem
):
233 class insertion_point(aetools
.ComponentItem
):
234 """insertion point - An insertion location between two objects """
237 class line(aetools
.ComponentItem
):
238 """line - lines of text """
240 # element 'cha ' as ['indx', 'rang', 'rele']
244 class selection_2d_object(aetools
.ComponentItem
):
245 """selection-object - the selection visible to the user """
247 class contents(aetools
.NProperty
):
248 """contents - the contents of the selection """
251 # element 'cha ' as ['indx', 'rele', 'rang', 'test']
252 # element 'clin' as ['indx', 'rang', 'rele']
253 # element 'ctxt' as ['rang']
255 class text(aetools
.ComponentItem
):
258 # element 'cha ' as ['indx', 'rele', 'rang']
259 # element 'cins' as ['rele']
260 # element 'clin' as ['indx', 'rang', 'rele']
261 # element 'ctxt' as ['rang']
263 class window(aetools
.ComponentItem
):
264 """window - A window """
266 class bounds(aetools
.NProperty
):
267 """bounds - the boundary rectangle for the window """
270 class document(aetools
.NProperty
):
271 """document - the document that owns this window """
274 class position(aetools
.NProperty
):
275 """position - upper left coordinates of window """
278 class visible(aetools
.NProperty
):
279 """visible - is the window visible? """
282 class zoomed(aetools
.NProperty
):
283 """zoomed - Is the window zoomed? """
288 application
._superclassnames
= []
289 application
._privpropdict
= {
290 'user_interaction' : user_interaction
,
292 application
._privelemdict
= {
293 'document' : document
,
296 character
._superclassnames
= []
297 character
._privpropdict
= {
301 character
._privelemdict
= {
303 document
._superclassnames
= []
304 document
._privpropdict
= {
308 'location' : location
,
309 'file_permissions' : file_permissions
,
312 document
._privelemdict
= {
314 file._superclassnames
= []
315 file._privpropdict
= {
317 file._privelemdict
= {
319 insertion_point
._superclassnames
= []
320 insertion_point
._privpropdict
= {
324 insertion_point
._privelemdict
= {
326 line
._superclassnames
= []
327 line
._privpropdict
= {
332 line
._privelemdict
= {
333 'character' : character
,
335 selection_2d_object
._superclassnames
= []
336 selection_2d_object
._privpropdict
= {
337 'contents' : contents
,
341 selection_2d_object
._privelemdict
= {
342 'character' : character
,
346 text
._superclassnames
= []
347 text
._privpropdict
= {
351 text
._privelemdict
= {
352 'character' : character
,
353 'insertion_point' : insertion_point
,
357 window
._superclassnames
= []
358 window
._privpropdict
= {
362 'document' : document
,
363 'position' : position
,
367 window
._privelemdict
= {
371 # Indices of types declared in this module
373 _classdeclarations
= {
379 'csel' : selection_2d_object
,
380 'capp' : application
,
381 'cins' : insertion_point
,
385 _propdeclarations
= {
386 'inte' : user_interaction
,
390 'PERM' : file_permissions
,
403 _compdeclarations
= {
406 _enumdeclarations
= {