blob: 36eaed8aa8ae5371698c8ddf9db40a8e09a0ab3e [file] [log] [blame]
Jack Jansenbc608641995-07-17 11:43:59 +00001"""Suite Standard Suite: Common terms for most applications
2Level 1, version 1
3
Jack Jansen21b5d601997-08-27 13:49:18 +00004Generated from flap:System Folder:Extensions:Scripting Additions:Dialects:English Dialect
Jack Jansenbc608641995-07-17 11:43:59 +00005AETE/AEUT resource version 1/0, language 0, script 0
6"""
7
Jack Jansenbc608641995-07-17 11:43:59 +00008import aetools
9import MacOS
10
Jack Jansen84264771995-10-03 14:35:58 +000011_code = 'core'
Jack Jansenbc608641995-07-17 11:43:59 +000012
Jack Jansenbc608641995-07-17 11:43:59 +000013class Standard_Suite:
14
Jack Jansen84264771995-10-03 14:35:58 +000015 _argmap_class_info = {
16 '_in' : 'wrcd',
17 }
18
19 def class_info(self, _object=None, _attributes={}, **_arguments):
20 """class info: Get information about an object class
21 Required argument: the object class about which information is requested
22 Keyword argument _in: the human language and script system in which to return information
23 Keyword argument _attributes: AppleEvent attribute dictionary
Jack Jansen433a48e1996-09-20 15:29:08 +000024 Returns: a record containing the object¹s properties and elements
Jack Jansen84264771995-10-03 14:35:58 +000025 """
26 _code = 'core'
27 _subcode = 'qobj'
28
Jack Jansen73215141995-10-09 23:09:23 +000029 aetools.keysubst(_arguments, self._argmap_class_info)
Jack Jansen84264771995-10-03 14:35:58 +000030 _arguments['----'] = _object
31
Jack Jansen84264771995-10-03 14:35:58 +000032
33 _reply, _arguments, _attributes = self.send(_code, _subcode,
34 _arguments, _attributes)
35 if _arguments.has_key('errn'):
Jack Jansen433a48e1996-09-20 15:29:08 +000036 raise aetools.Error, aetools.decodeerror(_arguments)
Jack Jansen84264771995-10-03 14:35:58 +000037 # XXXX Optionally decode result
38 if _arguments.has_key('----'):
39 return _arguments['----']
40
Jack Jansenbc608641995-07-17 11:43:59 +000041 _argmap_close = {
42 'saving' : 'savo',
43 'saving_in' : 'kfil',
44 }
45
Jack Jansen84264771995-10-03 14:35:58 +000046 def close(self, _object, _attributes={}, **_arguments):
Jack Jansenbc608641995-07-17 11:43:59 +000047 """close: Close an object
48 Required argument: the object to close
Jack Jansen84264771995-10-03 14:35:58 +000049 Keyword argument saving: specifies whether changes should be saved before closing
Jack Jansenbc608641995-07-17 11:43:59 +000050 Keyword argument saving_in: the file in which to save the object
51 Keyword argument _attributes: AppleEvent attribute dictionary
52 """
53 _code = 'core'
54 _subcode = 'clos'
55
Jack Jansen73215141995-10-09 23:09:23 +000056 aetools.keysubst(_arguments, self._argmap_close)
Jack Jansen84264771995-10-03 14:35:58 +000057 _arguments['----'] = _object
Jack Jansenbc608641995-07-17 11:43:59 +000058
Jack Jansen84264771995-10-03 14:35:58 +000059 aetools.enumsubst(_arguments, 'savo', _Enum_savo)
Jack Jansenbc608641995-07-17 11:43:59 +000060
Jack Jansen84264771995-10-03 14:35:58 +000061 _reply, _arguments, _attributes = self.send(_code, _subcode,
62 _arguments, _attributes)
63 if _arguments.has_key('errn'):
Jack Jansen433a48e1996-09-20 15:29:08 +000064 raise aetools.Error, aetools.decodeerror(_arguments)
Jack Jansenbc608641995-07-17 11:43:59 +000065 # XXXX Optionally decode result
Jack Jansen84264771995-10-03 14:35:58 +000066 if _arguments.has_key('----'):
67 return _arguments['----']
Jack Jansenbc608641995-07-17 11:43:59 +000068
69 _argmap_count = {
70 'each' : 'kocl',
71 }
72
Jack Jansen84264771995-10-03 14:35:58 +000073 def count(self, _object, _attributes={}, **_arguments):
Jack Jansenbc608641995-07-17 11:43:59 +000074 """count: Return the number of elements of a particular class within an object
75 Required argument: the object whose elements are to be counted
Jack Jansen84264771995-10-03 14:35:58 +000076 Keyword argument each: the class of the elements to be counted.
Jack Jansenbc608641995-07-17 11:43:59 +000077 Keyword argument _attributes: AppleEvent attribute dictionary
78 Returns: the number of elements
79 """
80 _code = 'core'
81 _subcode = 'cnte'
82
Jack Jansen73215141995-10-09 23:09:23 +000083 aetools.keysubst(_arguments, self._argmap_count)
Jack Jansen84264771995-10-03 14:35:58 +000084 _arguments['----'] = _object
Jack Jansenbc608641995-07-17 11:43:59 +000085
Jack Jansenbc608641995-07-17 11:43:59 +000086
Jack Jansen84264771995-10-03 14:35:58 +000087 _reply, _arguments, _attributes = self.send(_code, _subcode,
88 _arguments, _attributes)
89 if _arguments.has_key('errn'):
Jack Jansen433a48e1996-09-20 15:29:08 +000090 raise aetools.Error, aetools.decodeerror(_arguments)
Jack Jansenbc608641995-07-17 11:43:59 +000091 # XXXX Optionally decode result
Jack Jansen84264771995-10-03 14:35:58 +000092 if _arguments.has_key('----'):
93 return _arguments['----']
Jack Jansenbc608641995-07-17 11:43:59 +000094
95 _argmap_data_size = {
96 'as' : 'rtyp',
97 }
98
Jack Jansen84264771995-10-03 14:35:58 +000099 def data_size(self, _object, _attributes={}, **_arguments):
Jack Jansenbc608641995-07-17 11:43:59 +0000100 """data size: Return the size in bytes of an object
101 Required argument: the object whose data size is to be returned
102 Keyword argument as: the data type for which the size is calculated
103 Keyword argument _attributes: AppleEvent attribute dictionary
104 Returns: the size of the object in bytes
105 """
106 _code = 'core'
107 _subcode = 'dsiz'
108
Jack Jansen73215141995-10-09 23:09:23 +0000109 aetools.keysubst(_arguments, self._argmap_data_size)
Jack Jansen84264771995-10-03 14:35:58 +0000110 _arguments['----'] = _object
Jack Jansenbc608641995-07-17 11:43:59 +0000111
Jack Jansenbc608641995-07-17 11:43:59 +0000112
Jack Jansen84264771995-10-03 14:35:58 +0000113 _reply, _arguments, _attributes = self.send(_code, _subcode,
114 _arguments, _attributes)
115 if _arguments.has_key('errn'):
Jack Jansen433a48e1996-09-20 15:29:08 +0000116 raise aetools.Error, aetools.decodeerror(_arguments)
Jack Jansenbc608641995-07-17 11:43:59 +0000117 # XXXX Optionally decode result
Jack Jansen84264771995-10-03 14:35:58 +0000118 if _arguments.has_key('----'):
119 return _arguments['----']
Jack Jansenbc608641995-07-17 11:43:59 +0000120
Jack Jansen84264771995-10-03 14:35:58 +0000121 def delete(self, _object, _attributes={}, **_arguments):
Jack Jansenbc608641995-07-17 11:43:59 +0000122 """delete: Delete an element from an object
123 Required argument: the element to delete
124 Keyword argument _attributes: AppleEvent attribute dictionary
125 """
126 _code = 'core'
127 _subcode = 'delo'
128
Jack Jansen73215141995-10-09 23:09:23 +0000129 if _arguments: raise TypeError, 'No optional args expected'
Jack Jansen84264771995-10-03 14:35:58 +0000130 _arguments['----'] = _object
Jack Jansenbc608641995-07-17 11:43:59 +0000131
Jack Jansenbc608641995-07-17 11:43:59 +0000132
Jack Jansen84264771995-10-03 14:35:58 +0000133 _reply, _arguments, _attributes = self.send(_code, _subcode,
134 _arguments, _attributes)
135 if _arguments.has_key('errn'):
Jack Jansen433a48e1996-09-20 15:29:08 +0000136 raise aetools.Error, aetools.decodeerror(_arguments)
Jack Jansenbc608641995-07-17 11:43:59 +0000137 # XXXX Optionally decode result
Jack Jansen84264771995-10-03 14:35:58 +0000138 if _arguments.has_key('----'):
139 return _arguments['----']
Jack Jansenbc608641995-07-17 11:43:59 +0000140
141 _argmap_duplicate = {
142 'to' : 'insh',
143 }
144
Jack Jansen84264771995-10-03 14:35:58 +0000145 def duplicate(self, _object, _attributes={}, **_arguments):
Jack Jansenbc608641995-07-17 11:43:59 +0000146 """duplicate: Duplicate object(s)
147 Required argument: the object(s) to duplicate
148 Keyword argument to: the new location for the object(s)
149 Keyword argument _attributes: AppleEvent attribute dictionary
150 Returns: to the duplicated object(s)
151 """
152 _code = 'core'
153 _subcode = 'clon'
154
Jack Jansen73215141995-10-09 23:09:23 +0000155 aetools.keysubst(_arguments, self._argmap_duplicate)
Jack Jansen84264771995-10-03 14:35:58 +0000156 _arguments['----'] = _object
Jack Jansenbc608641995-07-17 11:43:59 +0000157
Jack Jansenbc608641995-07-17 11:43:59 +0000158
Jack Jansen84264771995-10-03 14:35:58 +0000159 _reply, _arguments, _attributes = self.send(_code, _subcode,
160 _arguments, _attributes)
161 if _arguments.has_key('errn'):
Jack Jansen433a48e1996-09-20 15:29:08 +0000162 raise aetools.Error, aetools.decodeerror(_arguments)
Jack Jansenbc608641995-07-17 11:43:59 +0000163 # XXXX Optionally decode result
Jack Jansen84264771995-10-03 14:35:58 +0000164 if _arguments.has_key('----'):
165 return _arguments['----']
Jack Jansenbc608641995-07-17 11:43:59 +0000166
Jack Jansen84264771995-10-03 14:35:58 +0000167 _argmap_event_info = {
168 '_in' : 'wrcd',
169 }
170
171 def event_info(self, _object, _attributes={}, **_arguments):
172 """event info: Get information about the Apple events in a suite
173 Required argument: the event class of the Apple events for which to return information
174 Keyword argument _in: the human language and script system in which to return information
175 Keyword argument _attributes: AppleEvent attribute dictionary
176 Returns: a record containing the events and their parameters
177 """
178 _code = 'core'
179 _subcode = 'gtei'
180
Jack Jansen73215141995-10-09 23:09:23 +0000181 aetools.keysubst(_arguments, self._argmap_event_info)
Jack Jansen84264771995-10-03 14:35:58 +0000182 _arguments['----'] = _object
183
Jack Jansen84264771995-10-03 14:35:58 +0000184
185 _reply, _arguments, _attributes = self.send(_code, _subcode,
186 _arguments, _attributes)
187 if _arguments.has_key('errn'):
Jack Jansen433a48e1996-09-20 15:29:08 +0000188 raise aetools.Error, aetools.decodeerror(_arguments)
Jack Jansen84264771995-10-03 14:35:58 +0000189 # XXXX Optionally decode result
190 if _arguments.has_key('----'):
191 return _arguments['----']
192
193 def exists(self, _object, _attributes={}, **_arguments):
Jack Jansenbc608641995-07-17 11:43:59 +0000194 """exists: Verify if an object exists
195 Required argument: the object in question
196 Keyword argument _attributes: AppleEvent attribute dictionary
197 Returns: true if it exists, false if not
198 """
199 _code = 'core'
200 _subcode = 'doex'
201
Jack Jansen73215141995-10-09 23:09:23 +0000202 if _arguments: raise TypeError, 'No optional args expected'
Jack Jansen84264771995-10-03 14:35:58 +0000203 _arguments['----'] = _object
Jack Jansenbc608641995-07-17 11:43:59 +0000204
Jack Jansenbc608641995-07-17 11:43:59 +0000205
Jack Jansen84264771995-10-03 14:35:58 +0000206 _reply, _arguments, _attributes = self.send(_code, _subcode,
207 _arguments, _attributes)
208 if _arguments.has_key('errn'):
Jack Jansen433a48e1996-09-20 15:29:08 +0000209 raise aetools.Error, aetools.decodeerror(_arguments)
Jack Jansenbc608641995-07-17 11:43:59 +0000210 # XXXX Optionally decode result
Jack Jansen84264771995-10-03 14:35:58 +0000211 if _arguments.has_key('----'):
212 return _arguments['----']
Jack Jansenbc608641995-07-17 11:43:59 +0000213
214 _argmap_make = {
215 'new' : 'kocl',
216 'at' : 'insh',
217 'with_data' : 'data',
218 'with_properties' : 'prdt',
219 }
220
Jack Jansen84264771995-10-03 14:35:58 +0000221 def make(self, _no_object=None, _attributes={}, **_arguments):
Jack Jansenbc608641995-07-17 11:43:59 +0000222 """make: Make a new element
Jack Jansen84264771995-10-03 14:35:58 +0000223 Keyword argument new: the class of the new element.
Jack Jansenbc608641995-07-17 11:43:59 +0000224 Keyword argument at: the location at which to insert the element
225 Keyword argument with_data: the initial data for the element
226 Keyword argument with_properties: the initial values for the properties of the element
227 Keyword argument _attributes: AppleEvent attribute dictionary
228 Returns: to the new object(s)
229 """
230 _code = 'core'
231 _subcode = 'crel'
232
Jack Jansen73215141995-10-09 23:09:23 +0000233 aetools.keysubst(_arguments, self._argmap_make)
Jack Jansen84264771995-10-03 14:35:58 +0000234 if _no_object != None: raise TypeError, 'No direct arg expected'
Jack Jansenbc608641995-07-17 11:43:59 +0000235
Jack Jansenbc608641995-07-17 11:43:59 +0000236
Jack Jansen84264771995-10-03 14:35:58 +0000237 _reply, _arguments, _attributes = self.send(_code, _subcode,
238 _arguments, _attributes)
239 if _arguments.has_key('errn'):
Jack Jansen433a48e1996-09-20 15:29:08 +0000240 raise aetools.Error, aetools.decodeerror(_arguments)
Jack Jansenbc608641995-07-17 11:43:59 +0000241 # XXXX Optionally decode result
Jack Jansen84264771995-10-03 14:35:58 +0000242 if _arguments.has_key('----'):
243 return _arguments['----']
Jack Jansenbc608641995-07-17 11:43:59 +0000244
245 _argmap_move = {
246 'to' : 'insh',
247 }
248
Jack Jansen84264771995-10-03 14:35:58 +0000249 def move(self, _object, _attributes={}, **_arguments):
Jack Jansenbc608641995-07-17 11:43:59 +0000250 """move: Move object(s) to a new location
251 Required argument: the object(s) to move
252 Keyword argument to: the new location for the object(s)
253 Keyword argument _attributes: AppleEvent attribute dictionary
254 Returns: to the object(s) after they have been moved
255 """
256 _code = 'core'
257 _subcode = 'move'
258
Jack Jansen73215141995-10-09 23:09:23 +0000259 aetools.keysubst(_arguments, self._argmap_move)
Jack Jansen84264771995-10-03 14:35:58 +0000260 _arguments['----'] = _object
Jack Jansenbc608641995-07-17 11:43:59 +0000261
Jack Jansenbc608641995-07-17 11:43:59 +0000262
Jack Jansen84264771995-10-03 14:35:58 +0000263 _reply, _arguments, _attributes = self.send(_code, _subcode,
264 _arguments, _attributes)
265 if _arguments.has_key('errn'):
Jack Jansen433a48e1996-09-20 15:29:08 +0000266 raise aetools.Error, aetools.decodeerror(_arguments)
Jack Jansenbc608641995-07-17 11:43:59 +0000267 # XXXX Optionally decode result
Jack Jansen84264771995-10-03 14:35:58 +0000268 if _arguments.has_key('----'):
269 return _arguments['----']
Jack Jansenbc608641995-07-17 11:43:59 +0000270
Jack Jansen84264771995-10-03 14:35:58 +0000271 def open(self, _object, _attributes={}, **_arguments):
Jack Jansenbc608641995-07-17 11:43:59 +0000272 """open: Open the specified object(s)
273 Required argument: list of objects to open
274 Keyword argument _attributes: AppleEvent attribute dictionary
275 """
276 _code = 'aevt'
277 _subcode = 'odoc'
278
Jack Jansen73215141995-10-09 23:09:23 +0000279 if _arguments: raise TypeError, 'No optional args expected'
Jack Jansen84264771995-10-03 14:35:58 +0000280 _arguments['----'] = _object
Jack Jansenbc608641995-07-17 11:43:59 +0000281
Jack Jansenbc608641995-07-17 11:43:59 +0000282
Jack Jansen84264771995-10-03 14:35:58 +0000283 _reply, _arguments, _attributes = self.send(_code, _subcode,
284 _arguments, _attributes)
285 if _arguments.has_key('errn'):
Jack Jansen433a48e1996-09-20 15:29:08 +0000286 raise aetools.Error, aetools.decodeerror(_arguments)
Jack Jansenbc608641995-07-17 11:43:59 +0000287 # XXXX Optionally decode result
Jack Jansen84264771995-10-03 14:35:58 +0000288 if _arguments.has_key('----'):
289 return _arguments['----']
Jack Jansenbc608641995-07-17 11:43:59 +0000290
Jack Jansen84264771995-10-03 14:35:58 +0000291 def _print(self, _object, _attributes={}, **_arguments):
Jack Jansenbc608641995-07-17 11:43:59 +0000292 """print: Print the specified object(s)
293 Required argument: list of objects to print
294 Keyword argument _attributes: AppleEvent attribute dictionary
295 """
296 _code = 'aevt'
297 _subcode = 'pdoc'
298
Jack Jansen73215141995-10-09 23:09:23 +0000299 if _arguments: raise TypeError, 'No optional args expected'
Jack Jansen84264771995-10-03 14:35:58 +0000300 _arguments['----'] = _object
Jack Jansenbc608641995-07-17 11:43:59 +0000301
Jack Jansenbc608641995-07-17 11:43:59 +0000302
Jack Jansen84264771995-10-03 14:35:58 +0000303 _reply, _arguments, _attributes = self.send(_code, _subcode,
304 _arguments, _attributes)
305 if _arguments.has_key('errn'):
Jack Jansen433a48e1996-09-20 15:29:08 +0000306 raise aetools.Error, aetools.decodeerror(_arguments)
Jack Jansenbc608641995-07-17 11:43:59 +0000307 # XXXX Optionally decode result
Jack Jansen84264771995-10-03 14:35:58 +0000308 if _arguments.has_key('----'):
309 return _arguments['----']
Jack Jansenbc608641995-07-17 11:43:59 +0000310
311 _argmap_quit = {
312 'saving' : 'savo',
313 }
314
Jack Jansen84264771995-10-03 14:35:58 +0000315 def quit(self, _no_object=None, _attributes={}, **_arguments):
Jack Jansenbc608641995-07-17 11:43:59 +0000316 """quit: Quit an application program
Jack Jansen84264771995-10-03 14:35:58 +0000317 Keyword argument saving: specifies whether to save currently open documents
Jack Jansenbc608641995-07-17 11:43:59 +0000318 Keyword argument _attributes: AppleEvent attribute dictionary
319 """
320 _code = 'aevt'
321 _subcode = 'quit'
322
Jack Jansen73215141995-10-09 23:09:23 +0000323 aetools.keysubst(_arguments, self._argmap_quit)
Jack Jansen84264771995-10-03 14:35:58 +0000324 if _no_object != None: raise TypeError, 'No direct arg expected'
Jack Jansenbc608641995-07-17 11:43:59 +0000325
Jack Jansen84264771995-10-03 14:35:58 +0000326 aetools.enumsubst(_arguments, 'savo', _Enum_savo)
Jack Jansenbc608641995-07-17 11:43:59 +0000327
Jack Jansen84264771995-10-03 14:35:58 +0000328 _reply, _arguments, _attributes = self.send(_code, _subcode,
329 _arguments, _attributes)
330 if _arguments.has_key('errn'):
Jack Jansen433a48e1996-09-20 15:29:08 +0000331 raise aetools.Error, aetools.decodeerror(_arguments)
Jack Jansenbc608641995-07-17 11:43:59 +0000332 # XXXX Optionally decode result
Jack Jansen84264771995-10-03 14:35:58 +0000333 if _arguments.has_key('----'):
334 return _arguments['----']
Jack Jansenbc608641995-07-17 11:43:59 +0000335
336 _argmap_save = {
337 '_in' : 'kfil',
338 'as' : 'fltp',
339 }
340
Jack Jansen84264771995-10-03 14:35:58 +0000341 def save(self, _object, _attributes={}, **_arguments):
Jack Jansenbc608641995-07-17 11:43:59 +0000342 """save: Save an object
343 Required argument: the object to save
344 Keyword argument _in: the file in which to save the object
345 Keyword argument as: the file type of the document in which to save the data
346 Keyword argument _attributes: AppleEvent attribute dictionary
347 """
348 _code = 'core'
349 _subcode = 'save'
350
Jack Jansen73215141995-10-09 23:09:23 +0000351 aetools.keysubst(_arguments, self._argmap_save)
Jack Jansen84264771995-10-03 14:35:58 +0000352 _arguments['----'] = _object
Jack Jansenbc608641995-07-17 11:43:59 +0000353
Jack Jansenbc608641995-07-17 11:43:59 +0000354
Jack Jansen84264771995-10-03 14:35:58 +0000355 _reply, _arguments, _attributes = self.send(_code, _subcode,
356 _arguments, _attributes)
357 if _arguments.has_key('errn'):
Jack Jansen433a48e1996-09-20 15:29:08 +0000358 raise aetools.Error, aetools.decodeerror(_arguments)
Jack Jansenbc608641995-07-17 11:43:59 +0000359 # XXXX Optionally decode result
Jack Jansen84264771995-10-03 14:35:58 +0000360 if _arguments.has_key('----'):
361 return _arguments['----']
Jack Jansenbc608641995-07-17 11:43:59 +0000362
Jack Jansen84264771995-10-03 14:35:58 +0000363 _argmap_suite_info = {
364 '_in' : 'wrcd',
Jack Jansenbc608641995-07-17 11:43:59 +0000365 }
366
Jack Jansen84264771995-10-03 14:35:58 +0000367 def suite_info(self, _object, _attributes={}, **_arguments):
368 """suite info: Get information about event suite(s)
369 Required argument: the suite for which to return information
370 Keyword argument _in: the human language and script system in which to return information
Jack Jansenbc608641995-07-17 11:43:59 +0000371 Keyword argument _attributes: AppleEvent attribute dictionary
Jack Jansen84264771995-10-03 14:35:58 +0000372 Returns: a record containing the suites and their versions
Jack Jansenbc608641995-07-17 11:43:59 +0000373 """
374 _code = 'core'
Jack Jansen84264771995-10-03 14:35:58 +0000375 _subcode = 'gtsi'
Jack Jansenbc608641995-07-17 11:43:59 +0000376
Jack Jansen73215141995-10-09 23:09:23 +0000377 aetools.keysubst(_arguments, self._argmap_suite_info)
Jack Jansen84264771995-10-03 14:35:58 +0000378 _arguments['----'] = _object
Jack Jansenbc608641995-07-17 11:43:59 +0000379
Jack Jansenbc608641995-07-17 11:43:59 +0000380
Jack Jansen84264771995-10-03 14:35:58 +0000381 _reply, _arguments, _attributes = self.send(_code, _subcode,
382 _arguments, _attributes)
383 if _arguments.has_key('errn'):
Jack Jansen433a48e1996-09-20 15:29:08 +0000384 raise aetools.Error, aetools.decodeerror(_arguments)
Jack Jansenbc608641995-07-17 11:43:59 +0000385 # XXXX Optionally decode result
Jack Jansen84264771995-10-03 14:35:58 +0000386 if _arguments.has_key('----'):
387 return _arguments['----']
Jack Jansenbc608641995-07-17 11:43:59 +0000388
389
Jack Jansen21b5d601997-08-27 13:49:18 +0000390class application(aetools.ComponentItem):
391 """application - An application program"""
392 want = 'capp'
393class clipboard(aetools.NProperty):
394 """clipboard - the clipboard"""
395 which = 'pcli'
396 want = '****'
397class frontmost(aetools.NProperty):
398 """frontmost - Is this the frontmost application?"""
399 which = 'pisf'
400 want = 'bool'
401class name(aetools.NProperty):
402 """name - the name"""
403 which = 'pnam'
404 want = 'itxt'
405class selection(aetools.NProperty):
406 """selection - the selection visible to the user"""
407 which = 'sele'
408 want = 'csel'
409class version(aetools.NProperty):
410 """version - the version of the application"""
411 which = 'vers'
412 want = 'vers'
Jack Jansenbc608641995-07-17 11:43:59 +0000413
Jack Jansen21b5d601997-08-27 13:49:18 +0000414applications = application
Jack Jansen84264771995-10-03 14:35:58 +0000415
Jack Jansen21b5d601997-08-27 13:49:18 +0000416class character(aetools.ComponentItem):
417 """character - A character"""
418 want = 'cha '
419class color(aetools.NProperty):
420 """color - the color"""
421 which = 'colr'
422 want = 'cRGB'
423class font(aetools.NProperty):
424 """font - the name of the font"""
425 which = 'font'
426 want = 'ctxt'
427class size(aetools.NProperty):
428 """size - the size in points"""
429 which = 'ptsz'
430 want = 'fixd'
431class writing_code(aetools.NProperty):
432 """writing code - the script system and language"""
433 which = 'psct'
434 want = 'intl'
435class style(aetools.NProperty):
436 """style - the text style"""
437 which = 'txst'
438 want = 'tsty'
439class uniform_styles(aetools.NProperty):
440 """uniform styles - the text style"""
441 which = 'ustl'
442 want = 'tsty'
Jack Jansen84264771995-10-03 14:35:58 +0000443
Jack Jansen21b5d601997-08-27 13:49:18 +0000444characters = character
Jack Jansenbc608641995-07-17 11:43:59 +0000445
Jack Jansen21b5d601997-08-27 13:49:18 +0000446class document(aetools.ComponentItem):
447 """document - A document"""
448 want = 'docu'
449class modified(aetools.NProperty):
450 """modified - Has the document been modified since the last save?"""
451 which = 'imod'
452 want = 'bool'
Jack Jansenbc608641995-07-17 11:43:59 +0000453
Jack Jansen21b5d601997-08-27 13:49:18 +0000454documents = document
Jack Jansenbc608641995-07-17 11:43:59 +0000455
Jack Jansen21b5d601997-08-27 13:49:18 +0000456class file(aetools.ComponentItem):
457 """file - A file"""
458 want = 'file'
459class stationery(aetools.NProperty):
460 """stationery - Is the file a stationery file?"""
461 which = 'pspd'
462 want = 'bool'
Jack Jansenbc608641995-07-17 11:43:59 +0000463
Jack Jansen21b5d601997-08-27 13:49:18 +0000464files = file
Jack Jansenbc608641995-07-17 11:43:59 +0000465
Jack Jansen21b5d601997-08-27 13:49:18 +0000466class selection_2d_object(aetools.ComponentItem):
467 """selection-object - the selection visible to the user"""
468 want = 'csel'
469class contents(aetools.NProperty):
470 """contents - the contents of the selection"""
471 which = 'pcnt'
472 want = 'type'
Jack Jansen84264771995-10-03 14:35:58 +0000473
Jack Jansen21b5d601997-08-27 13:49:18 +0000474class text(aetools.ComponentItem):
475 """text - Text"""
476 want = 'ctxt'
477# repeated property font the name of the font of the first character
Jack Jansen84264771995-10-03 14:35:58 +0000478
Jack Jansen21b5d601997-08-27 13:49:18 +0000479class text_style_info(aetools.ComponentItem):
480 """text style info - On and Off styles of text run"""
481 want = 'tsty'
482class on_styles(aetools.NProperty):
483 """on styles - the styles that are on for the text"""
484 which = 'onst'
485 want = 'styl'
486class off_styles(aetools.NProperty):
487 """off styles - the styles that are off for the text"""
488 which = 'ofst'
489 want = 'styl'
Jack Jansen84264771995-10-03 14:35:58 +0000490
Jack Jansen21b5d601997-08-27 13:49:18 +0000491text_style_infos = text_style_info
Jack Jansenbc608641995-07-17 11:43:59 +0000492
Jack Jansen21b5d601997-08-27 13:49:18 +0000493class window(aetools.ComponentItem):
494 """window - A window"""
495 want = 'cwin'
496class bounds(aetools.NProperty):
497 """bounds - the boundary rectangle for the window"""
498 which = 'pbnd'
499 want = 'qdrt'
500class closeable(aetools.NProperty):
501 """closeable - Does the window have a close box?"""
502 which = 'hclb'
503 want = 'bool'
504class titled(aetools.NProperty):
505 """titled - Does the window have a title bar?"""
506 which = 'ptit'
507 want = 'bool'
508class index(aetools.NProperty):
509 """index - the number of the window"""
510 which = 'pidx'
511 want = 'long'
512class floating(aetools.NProperty):
513 """floating - Does the window float?"""
514 which = 'isfl'
515 want = 'bool'
516class modal(aetools.NProperty):
517 """modal - Is the window modal?"""
518 which = 'pmod'
519 want = 'bool'
520class resizable(aetools.NProperty):
521 """resizable - Is the window resizable?"""
522 which = 'prsz'
523 want = 'bool'
524class zoomable(aetools.NProperty):
525 """zoomable - Is the window zoomable?"""
526 which = 'iszm'
527 want = 'bool'
528class zoomed(aetools.NProperty):
529 """zoomed - Is the window zoomed?"""
530 which = 'pzum'
531 want = 'bool'
532class visible(aetools.NProperty):
533 """visible - Is the window visible?"""
534 which = 'pvis'
535 want = 'bool'
Jack Jansenbc608641995-07-17 11:43:59 +0000536
Jack Jansen21b5d601997-08-27 13:49:18 +0000537windows = window
Jack Jansen84264771995-10-03 14:35:58 +0000538
Jack Jansen21b5d601997-08-27 13:49:18 +0000539class insertion_point(aetools.ComponentItem):
540 """insertion point - An insertion location between two objects"""
541 want = 'cins'
Jack Jansen84264771995-10-03 14:35:58 +0000542
Jack Jansen21b5d601997-08-27 13:49:18 +0000543insertion_points = insertion_point
544application._propdict = {
545 'clipboard' : clipboard,
546 'frontmost' : frontmost,
547 'name' : name,
548 'selection' : selection,
549 'version' : version,
550}
551application._elemdict = {
552}
553character._propdict = {
554 'color' : color,
555 'font' : font,
556 'size' : size,
557 'writing_code' : writing_code,
558 'style' : style,
559 'uniform_styles' : uniform_styles,
560}
561character._elemdict = {
562}
563document._propdict = {
564 'modified' : modified,
565}
566document._elemdict = {
567}
568file._propdict = {
569 'stationery' : stationery,
570}
571file._elemdict = {
572}
573selection_2d_object._propdict = {
574 'contents' : contents,
575}
576selection_2d_object._elemdict = {
577}
578text._propdict = {
579 'font' : font,
580}
581text._elemdict = {
582}
583text_style_info._propdict = {
584 'on_styles' : on_styles,
585 'off_styles' : off_styles,
586}
587text_style_info._elemdict = {
588}
589window._propdict = {
590 'bounds' : bounds,
591 'closeable' : closeable,
592 'titled' : titled,
593 'index' : index,
594 'floating' : floating,
595 'modal' : modal,
596 'resizable' : resizable,
597 'zoomable' : zoomable,
598 'zoomed' : zoomed,
599 'visible' : visible,
600}
601window._elemdict = {
602}
603insertion_point._propdict = {
604}
605insertion_point._elemdict = {
606}
607class starts_with(aetools.NComparison):
608 """starts with - Starts with"""
609class contains(aetools.NComparison):
610 """contains - Contains"""
611class ends_with(aetools.NComparison):
612 """ends with - Ends with"""
613class _3d_(aetools.NComparison):
614 """= - Equal"""
615class _3e_(aetools.NComparison):
616 """> - Greater than"""
617class _b3_(aetools.NComparison):
618 """„ - Greater than or equal to"""
619class _3c_(aetools.NComparison):
620 """< - Less than"""
621class _b2_(aetools.NComparison):
622 """¾ - Less than or equal to"""
623_Enum_savo = {
624 'yes' : 'yes ', # Save objects now
625 'no' : 'no ', # Do not save objects
626 'ask' : 'ask ', # Ask the user whether to save
627}
628
629_Enum_kfrm = {
630 'index' : 'indx', # keyform designating indexed access
631 'named' : 'name', # keyform designating named access
632 'id' : 'ID ', # keyform designating access by unique identifier
633}
634
635_Enum_styl = {
636 'plain' : 'plan', # Plain
637 'bold' : 'bold', # Bold
638 'italic' : 'ital', # Italic
639 'outline' : 'outl', # Outline
640 'shadow' : 'shad', # Shadow
641 'underline' : 'undl', # Underline
642 'superscript' : 'spsc', # Superscript
643 'subscript' : 'sbsc', # Subscript
644 'strikethrough' : 'strk', # Strikethrough
645 'small_caps' : 'smcp', # Small caps
646 'all_caps' : 'alcp', # All capital letters
647 'all_lowercase' : 'lowc', # Lowercase
648 'condensed' : 'cond', # Condensed
649 'expanded' : 'pexp', # Expanded
650 'hidden' : 'hidn', # Hidden
651}
652
653
654#
655# Indices of types declared in this module
656#
657_classdeclarations = {
658 'docu' : document,
659 'tsty' : text_style_info,
660 'ctxt' : text,
661 'capp' : application,
662 'csel' : selection_2d_object,
663 'file' : file,
664 'cwin' : window,
665 'cha ' : character,
666 'cins' : insertion_point,
667}
668
669_propdeclarations = {
670 'ptit' : titled,
671 'onst' : on_styles,
672 'pnam' : name,
673 'pcli' : clipboard,
674 'ustl' : uniform_styles,
675 'psct' : writing_code,
676 'txst' : style,
677 'pvis' : visible,
678 'pspd' : stationery,
679 'pisf' : frontmost,
680 'sele' : selection,
681 'pmod' : modal,
682 'imod' : modified,
683 'ofst' : off_styles,
684 'ptsz' : size,
685 'pzum' : zoomed,
686 'hclb' : closeable,
687 'font' : font,
688 'pcnt' : contents,
689 'isfl' : floating,
690 'pidx' : index,
691 'iszm' : zoomable,
692 'colr' : color,
693 'pbnd' : bounds,
694 'vers' : version,
695 'prsz' : resizable,
696}
697
698_compdeclarations = {
699 '> ' : _3e_,
700 'bgwt' : starts_with,
701 '>= ' : _b3_,
702 '= ' : _3d_,
703 '<= ' : _b2_,
704 'cont' : contains,
705 'ends' : ends_with,
706 '< ' : _3c_,
707}
708
709_enumdeclarations = {
710 'styl' : _Enum_styl,
711 'savo' : _Enum_savo,
712 'kfrm' : _Enum_kfrm,
713}