1 """Suite CodeWarrior Standard Suite: Standard suite events supported by the CodeWarrior IDE.
4 Generated from flap:Metrowerks:Metrowerks CodeWarrior:CodeWarrior IDE 2.0.1
5 AETE/AEUT resource version 1/0, language 0, script 0
13 class CodeWarrior_Standard_Suite
:
20 def close(self
, _object
, _attributes
={}, **_arguments
):
21 """close: Close an object
22 Required argument: the object to close
23 Keyword argument saving: Specifies whether or not changes should be saved before closing
24 Keyword argument saving_in: the file in which to save the object
25 Keyword argument _attributes: AppleEvent attribute dictionary
30 aetools
.keysubst(_arguments
, self
._argmap
_close
)
31 _arguments
['----'] = _object
33 aetools
.enumsubst(_arguments
, 'savo', _Enum_savo
)
35 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
36 _arguments
, _attributes
)
37 if _arguments
.has_key('errn'):
38 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
39 # XXXX Optionally decode result
40 if _arguments
.has_key('----'):
41 return _arguments
['----']
47 def count(self
, _object
, _attributes
={}, **_arguments
):
48 """count: Return the number of elements of a particular class within an object
49 Required argument: the object whose elements are to be counted
50 Keyword argument each: the class of the elements to be counted. Keyword 'each' is optional in AppleScript
51 Keyword argument _attributes: AppleEvent attribute dictionary
52 Returns: the number of elements
57 aetools
.keysubst(_arguments
, self
._argmap
_count
)
58 _arguments
['----'] = _object
61 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
62 _arguments
, _attributes
)
63 if _arguments
.has_key('errn'):
64 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
65 # XXXX Optionally decode result
66 if _arguments
.has_key('----'):
67 return _arguments
['----']
73 def get(self
, _object
, _attributes
={}, **_arguments
):
74 """get: Get the data for an object
75 Required argument: the object whose data is to be returned
76 Keyword argument as: the desired types for the data, in order of preference
77 Keyword argument _attributes: AppleEvent attribute dictionary
78 Returns: The data from the object
83 aetools
.keysubst(_arguments
, self
._argmap
_get
)
84 _arguments
['----'] = _object
87 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
88 _arguments
, _attributes
)
89 if _arguments
.has_key('errn'):
90 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
91 # XXXX Optionally decode result
92 if _arguments
.has_key('----'):
93 return _arguments
['----']
99 'with_properties' : 'prdt',
102 def make(self
, _no_object
=None, _attributes
={}, **_arguments
):
103 """make: Make a new element
104 Keyword argument new: the class of the new element. Keyword 'new' is optional in AppleScript
105 Keyword argument at: the location at which to insert the element
106 Keyword argument with_data: the initial data for the element
107 Keyword argument with_properties: the initial values for the properties of the element
108 Keyword argument _attributes: AppleEvent attribute dictionary
109 Returns: to the new object(s)
114 aetools
.keysubst(_arguments
, self
._argmap
_make
)
115 if _no_object
!= None: raise TypeError, 'No direct arg expected'
118 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
119 _arguments
, _attributes
)
120 if _arguments
.has_key('errn'):
121 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
122 # XXXX Optionally decode result
123 if _arguments
.has_key('----'):
124 return _arguments
['----']
126 def select(self
, _object
=None, _attributes
={}, **_arguments
):
127 """select: Select the specified object
128 Required argument: the object to select
129 Keyword argument _attributes: AppleEvent attribute dictionary
134 if _arguments
: raise TypeError, 'No optional args expected'
135 _arguments
['----'] = _object
138 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
139 _arguments
, _attributes
)
140 if _arguments
.has_key('errn'):
141 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
142 # XXXX Optionally decode result
143 if _arguments
.has_key('----'):
144 return _arguments
['----']
150 def set(self
, _object
, _attributes
={}, **_arguments
):
151 """set: Set an object's data
152 Required argument: the object to change
153 Keyword argument to: the new value
154 Keyword argument _attributes: AppleEvent attribute dictionary
159 aetools
.keysubst(_arguments
, self
._argmap
_set
)
160 _arguments
['----'] = _object
163 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
164 _arguments
, _attributes
)
165 if _arguments
.has_key('errn'):
166 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
167 # XXXX Optionally decode result
168 if _arguments
.has_key('----'):
169 return _arguments
['----']
172 class application(aetools
.ComponentItem
):
173 """application - An application program"""
175 class user_interaction(aetools
.NProperty
):
176 """user interaction - User interaction level"""
179 # element 'docu' as ['indx', 'name', 'rang']
180 # element 'cwin' as ['indx', 'name', 'rang']
181 # element 'Clas' as ['indx', 'name']
183 class character(aetools
.ComponentItem
):
184 """character - A character"""
186 class offset(aetools
.NProperty
):
187 """offset - offset of a text object from the beginning of the document (first char has offset 1)"""
190 class length(aetools
.NProperty
):
191 """length - length in characters of this object"""
195 class document(aetools
.ComponentItem
):
196 """document - A document"""
198 class file(aetools
.NProperty
):
199 """file - The file of the document"""
202 class index(aetools
.NProperty
):
203 """index - the number of the document"""
206 class mode(aetools
.NProperty
):
207 """mode - The documentĀ¹s open mode"""
210 class modified(aetools
.NProperty
):
211 """modified - Has the document been modified since the last save?"""
214 class name(aetools
.NProperty
):
215 """name - the title of the document"""
218 class selection(aetools
.NProperty
):
219 """selection - the selection visible to the user"""
222 class window(aetools
.NProperty
):
223 """window - The window of this document."""
226 # element 'cha ' as ['indx', 'rele', 'rang', 'test']
227 # element 'cins' as ['rele']
228 # element 'clin' as ['indx', 'rang', 'rele']
229 # element 'ctxt' as ['rang']
233 class file(aetools
.ComponentItem
):
239 class insertion_point(aetools
.ComponentItem
):
240 """insertion point - An insertion location between two objects"""
242 # repeated property length length of text object (in characters)
243 # repeated property offset offset of a text object from the beginning of the document (first char has offset 1)
245 class line(aetools
.ComponentItem
):
246 """line - Lines of text"""
248 # repeated property index index of a line object from the beginning of the document (first line has index 1)
249 # repeated property offset offset (in characters) of a line object from the beginning of the document
250 # repeated property length length in characters of this object
251 # element 'cha ' as ['indx', 'rang', 'rele']
255 class selection_2d_object(aetools
.ComponentItem
):
256 """selection-object - the selection visible to the user"""
258 class contents(aetools
.NProperty
):
259 """contents - the contents of the selection"""
262 # repeated property length length of text object (in characters)
263 # repeated property offset offset of a text object from the beginning of the document (first char has offset 1)
264 # element 'cha ' as ['indx', 'rele', 'rang', 'test']
265 # element 'clin' as ['indx', 'rang', 'rele']
266 # element 'ctxt' as ['rang']
268 class text(aetools
.ComponentItem
):
271 # repeated property length length of text object (in characters)
272 # repeated property offset offset of a text object from the beginning of the document (first char has offset 1)
273 # element 'cha ' as ['indx', 'rele', 'rang']
274 # element 'cins' as ['rele']
275 # element 'clin' as ['indx', 'rang', 'rele']
276 # element 'ctxt' as ['rang']
278 class window(aetools
.ComponentItem
):
279 """window - A window"""
281 # repeated property name the title of the window
282 # repeated property index the number of the window
283 class bounds(aetools
.NProperty
):
284 """bounds - the boundary rectangle for the window"""
287 class document(aetools
.NProperty
):
288 """document - the document object that owns this window"""
291 class position(aetools
.NProperty
):
292 """position - upper left coordinates of window"""
295 class visible(aetools
.NProperty
):
296 """visible - is the window visible?"""
299 class zoomed(aetools
.NProperty
):
300 """zoomed - Is the window zoomed?"""
305 # XXXX application element 'Clas' not found!!
306 application
._propdict
= {
307 'user_interaction' : user_interaction
,
309 application
._elemdict
= {
310 'document' : document
,
313 character
._propdict
= {
317 character
._elemdict
= {
319 document
._propdict
= {
323 'modified' : modified
,
325 'selection' : selection
,
328 document
._elemdict
= {
329 'character' : character
,
330 'insertion_point' : insertion_point
,
338 insertion_point
._propdict
= {
342 insertion_point
._elemdict
= {
350 'character' : character
,
352 selection_2d_object
._propdict
= {
353 'contents' : contents
,
357 selection_2d_object
._elemdict
= {
358 'character' : character
,
367 'character' : character
,
368 'insertion_point' : insertion_point
,
376 'document' : document
,
377 'position' : position
,
383 # XXXX enum savo not found!!
386 # Indices of types declared in this module
388 _classdeclarations
= {
390 'cins' : insertion_point
,
391 'capp' : application
,
393 'csel' : selection_2d_object
,
400 _propdeclarations
= {
416 'inte' : user_interaction
,
419 _compdeclarations
= {
422 _enumdeclarations
= {