Added gnuplot backend.
[smonitor.git] / monitor / extra / Gnuplot / gnuplot_Suites.py
blob429322d4d276c8274d5fc770f5ee79af128a461b
1 # $Id: gnuplot_Suites.py 292 2006-03-03 09:49:04Z mhagger $
3 # This file is provided as part of the Gnuplot.py package for the
4 # convenience of Mac users. It was generated primarily using gensuitemodule
5 # with Mac gnuplot 3.7.1a. Thanks to Anthony M. Ingraldi and Noboru Yamamoto
6 # for helping with this.
8 # file contains
10 # class gnuplot_Suite
11 # class odds_and_ends
12 # class Standard_Suite
13 # class Miscellaneous_Events
15 """Suite gnuplot Suite: Events supplied by gnuplot
16 Level 1, version 1
18 Generated from Alpha:Desktop Folder:gnuplot.1:gnuplot 3.7.1a
19 AETE/AEUT resource version 1/0, language 0, script 0
20 """
22 import aetools
23 import MacOS
25 _code = 'GPSE'
27 class gnuplot_Suite:
29 def gnuexec(self, _object=None, _attributes={}, **_arguments):
30 """exec: execute a gnuplot command
31 Required argument: gnuplot command
32 Keyword argument _attributes: AppleEvent attribute dictionary
33 """
34 _code = 'GPSE'
35 _subcode = 'exec'
37 if _arguments: raise TypeError, 'No optional args expected'
38 _arguments['----'] = _object
41 _reply, _arguments, _attributes = self.send(_code, _subcode,
42 _arguments, _attributes)
43 if _arguments.has_key('errn'):
44 raise aetools.Error, aetools.decodeerror(_arguments)
45 # XXXX Optionally decode result
46 if _arguments.has_key('----'):
47 return _arguments['----']
49 def plot(self, _object=None, _attributes={}, **_arguments):
50 """plot: create a 2-D plot
53 Required argument: data to be plotted
54 Keyword argument _attributes: AppleEvent attribute dictionary
55 """
56 _code = 'GPLT'
57 _subcode = 'plot'
59 if _arguments: raise TypeError, 'No optional args expected'
60 _arguments['----'] = _object
63 _reply, _arguments, _attributes = self.send(_code, _subcode,
64 _arguments, _attributes)
65 if _arguments.has_key('errn'):
66 raise aetools.Error, aetools.decodeerror(_arguments)
67 # XXXX Optionally decode result
68 if _arguments.has_key('----'):
69 return _arguments['----']
71 def splot(self, _object=None, _attributes={}, **_arguments):
72 """splot: create a 3-D plot
73 Required argument: data to be plotted
74 Keyword argument _attributes: AppleEvent attribute dictionary
75 """
76 _code = 'GPLT'
77 _subcode = 'splt'
79 if _arguments: raise TypeError, 'No optional args expected'
80 _arguments['----'] = _object
83 _reply, _arguments, _attributes = self.send(_code, _subcode,
84 _arguments, _attributes)
85 if _arguments.has_key('errn'):
86 raise aetools.Error, aetools.decodeerror(_arguments)
87 # XXXX Optionally decode result
88 if _arguments.has_key('----'):
89 return _arguments['----']
92 class graph(aetools.ComponentItem):
93 """graph - graph - a subclass of window"""
94 want = 'cGRF'
95 class picture(aetools.NProperty):
96 """picture - gnuplot graph in "PICT" format"""
97 which = 'PICT'
98 want = 'PICT'
99 graph._propdict = {
100 'picture' : picture,
102 graph._elemdict = {
104 _Enum_lyty = {
105 'line' : 'typ1', # line
106 'points' : 'typ2', # points
107 'impulses' : 'typ3', # impulses
108 'linespoints' : 'typ4', # linespoints
109 'dots' : 'typ5', # dots
110 'steps' : 'typ6', # steps
111 'fsteps' : 'typ7', # fsteps
112 'errorbars' : 'typ8', # errorbars
113 'xerrorbars' : 'typ9', # xerrorbars
114 'yerrorbars' : 'ty10', # yerrorbars
115 'xyerrorbars' : 'ty11', # xyerrorbars
116 'boxes' : 'ty12', # boxes
117 'boxerrorbars' : 'ty13', # boxerrorbars
118 'boxxyerrorbars' : 'ty14', # boxxyerrorbars
119 'vector' : 'ty19', # vector
124 # Indices of types declared in this module
126 _classdeclarations = {
127 'cGRF' : graph,
130 _propdeclarations = {
131 'PICT' : picture,
134 _compdeclarations = {
137 _enumdeclarations = {
138 'lyty' : _Enum_lyty,
142 """Suite odds and ends: Things that should be in some standard suite, but arenÕt
143 Level 1, version 1
145 Generated from Alpha:Desktop Folder:gnuplot.1:gnuplot 3.7.1a
146 AETE/AEUT resource version 1/0, language 0, script 0
149 import aetools
150 import MacOS
152 _code = 'Odds'
154 class odds_and_ends:
156 def select(self, _object=None, _attributes={}, **_arguments):
157 """select: Select the specified object
158 Required argument: the object to select
159 Keyword argument _attributes: AppleEvent attribute dictionary
161 _code = 'misc'
162 _subcode = 'slct'
164 if _arguments: raise TypeError, 'No optional args expected'
165 _arguments['----'] = _object
168 _reply, _arguments, _attributes = self.send(_code, _subcode,
169 _arguments, _attributes)
170 if _arguments.has_key('errn'):
171 raise aetools.Error, aetools.decodeerror(_arguments)
172 # XXXX Optionally decode result
173 if _arguments.has_key('----'):
174 return _arguments['----']
178 # Indices of types declared in this module
180 _classdeclarations = {
183 _propdeclarations = {
186 _compdeclarations = {
189 _enumdeclarations = {
192 """Suite Standard Suite: Common terms for most applications
193 Level 1, version 1
195 Generated from Alpha:Desktop Folder:gnuplot.1:gnuplot 3.7.1a
196 AETE/AEUT resource version 1/0, language 0, script 0
199 import aetools
200 import MacOS
202 _code = 'CoRe'
204 class Standard_Suite:
206 _argmap_close = {
207 'saving' : 'savo',
208 '_in' : 'kfil',
211 def close(self, _object, _attributes={}, **_arguments):
212 """close: Close an object
213 Required argument: the objects to close
214 Keyword argument saving: specifies whether or not changes should be saved before closing
215 Keyword argument _in: the file in which to save the object
216 Keyword argument _attributes: AppleEvent attribute dictionary
218 _code = 'core'
219 _subcode = 'clos'
221 aetools.keysubst(_arguments, self._argmap_close)
222 _arguments['----'] = _object
224 aetools.enumsubst(_arguments, 'savo', _Enum_savo)
226 _reply, _arguments, _attributes = self.send(_code, _subcode,
227 _arguments, _attributes)
228 if _arguments.has_key('errn'):
229 raise aetools.Error, aetools.decodeerror(_arguments)
230 # XXXX Optionally decode result
231 if _arguments.has_key('----'):
232 return _arguments['----']
234 def data_size(self, _object, _attributes={}, **_arguments):
235 """data size: Return the size in bytes of an object
236 Required argument: the object whose data size is to be returned
237 Keyword argument _attributes: AppleEvent attribute dictionary
238 Returns: the size of the object in bytes
240 _code = 'core'
241 _subcode = 'dsiz'
243 if _arguments: raise TypeError, 'No optional args expected'
244 _arguments['----'] = _object
247 _reply, _arguments, _attributes = self.send(_code, _subcode,
248 _arguments, _attributes)
249 if _arguments.has_key('errn'):
250 raise aetools.Error, aetools.decodeerror(_arguments)
251 # XXXX Optionally decode result
252 if _arguments.has_key('----'):
253 return _arguments['----']
255 def get(self, _object, _attributes={}, **_arguments):
256 """get: Get the data for an object
257 Required argument: the object whose data is to be returned
258 Keyword argument _attributes: AppleEvent attribute dictionary
259 Returns: The data from the object
261 _code = 'core'
262 _subcode = 'getd'
264 if _arguments: raise TypeError, 'No optional args expected'
265 _arguments['----'] = _object
268 _reply, _arguments, _attributes = self.send(_code, _subcode,
269 _arguments, _attributes)
270 if _arguments.has_key('errn'):
271 raise aetools.Error, aetools.decodeerror(_arguments)
272 # XXXX Optionally decode result
273 if _arguments.has_key('----'):
274 return _arguments['----']
276 _argmap_make = {
277 'new' : 'kocl',
278 'at' : 'insh',
279 'with_data' : 'data',
280 'with_properties' : 'prdt',
283 def make(self, _no_object=None, _attributes={}, **_arguments):
284 """make: Make a new element
285 Keyword argument new: the class of the new element
286 Keyword argument at: the location at which to insert the element
287 Keyword argument with_data: the initial data for the element
288 Keyword argument with_properties: the initial values for the properties of the element
289 Keyword argument _attributes: AppleEvent attribute dictionary
290 Returns: Object specifier for the new element
292 _code = 'core'
293 _subcode = 'crel'
295 aetools.keysubst(_arguments, self._argmap_make)
296 if _no_object != None: raise TypeError, 'No direct arg expected'
299 _reply, _arguments, _attributes = self.send(_code, _subcode,
300 _arguments, _attributes)
301 if _arguments.has_key('errn'):
302 raise aetools.Error, aetools.decodeerror(_arguments)
303 # XXXX Optionally decode result
304 if _arguments.has_key('----'):
305 return _arguments['----']
307 def open(self, _object, _attributes={}, **_arguments):
308 """open: Open the specified object(s)
309 Required argument: Objects to open. Can be a list of files or an object specifier.
310 Keyword argument _attributes: AppleEvent attribute dictionary
312 _code = 'aevt'
313 _subcode = 'odoc'
315 if _arguments: raise TypeError, 'No optional args expected'
316 _arguments['----'] = _object
319 _reply, _arguments, _attributes = self.send(_code, _subcode,
320 _arguments, _attributes)
321 if _arguments.has_key('errn'):
322 raise aetools.Error, aetools.decodeerror(_arguments)
323 # XXXX Optionally decode result
324 if _arguments.has_key('----'):
325 return _arguments['----']
327 def _print(self, _object, _attributes={}, **_arguments):
328 """print: Print the specified object(s)
329 Required argument: Objects to print. Can be a list of files or an object specifier.
330 Keyword argument _attributes: AppleEvent attribute dictionary
332 _code = 'aevt'
333 _subcode = 'pdoc'
335 if _arguments: raise TypeError, 'No optional args expected'
336 _arguments['----'] = _object
339 _reply, _arguments, _attributes = self.send(_code, _subcode,
340 _arguments, _attributes)
341 if _arguments.has_key('errn'):
342 raise aetools.Error, aetools.decodeerror(_arguments)
343 # XXXX Optionally decode result
344 if _arguments.has_key('----'):
345 return _arguments['----']
347 _argmap_save = {
348 '_in' : 'kfil',
349 'as' : 'fltp',
352 def save(self, _object, _attributes={}, **_arguments):
353 """save: save a set of objects
354 Required argument: Objects to save.
355 Keyword argument _in: the file in which to save the object(s)
356 Keyword argument as: the file type of the document in which to save the data
357 Keyword argument _attributes: AppleEvent attribute dictionary
359 _code = 'core'
360 _subcode = 'save'
362 aetools.keysubst(_arguments, self._argmap_save)
363 _arguments['----'] = _object
366 _reply, _arguments, _attributes = self.send(_code, _subcode,
367 _arguments, _attributes)
368 if _arguments.has_key('errn'):
369 raise aetools.Error, aetools.decodeerror(_arguments)
370 # XXXX Optionally decode result
371 if _arguments.has_key('----'):
372 return _arguments['----']
374 _argmap_set = {
375 'to' : 'data',
378 def set(self, _object, _attributes={}, **_arguments):
379 """set: Set an objectÕs data
380 Required argument: the object to change
381 Keyword argument to: the new value
382 Keyword argument _attributes: AppleEvent attribute dictionary
384 _code = 'core'
385 _subcode = 'setd'
387 aetools.keysubst(_arguments, self._argmap_set)
388 _arguments['----'] = _object
391 _reply, _arguments, _attributes = self.send(_code, _subcode,
392 _arguments, _attributes)
393 if _arguments.has_key('errn'):
394 raise aetools.Error, aetools.decodeerror(_arguments)
395 # XXXX Optionally decode result
396 if _arguments.has_key('----'):
397 return _arguments['----']
400 class application(aetools.ComponentItem):
401 """application - An application program"""
402 want = 'capp'
403 # element 'cwin' as ['indx', 'name', 'rele']
404 # element 'docu' as ['name']
406 class window(aetools.ComponentItem):
407 """window - A Window"""
408 want = 'cwin'
409 class bounds(aetools.NProperty):
410 """bounds - the boundary rectangle for the window"""
411 which = 'pbnd'
412 want = 'qdrt'
413 class closeable(aetools.NProperty):
414 """closeable - Does the window have a close box?"""
415 which = 'hclb'
416 want = 'bool'
417 class titled(aetools.NProperty):
418 """titled - Does the window have a title bar?"""
419 which = 'ptit'
420 want = 'bool'
421 class index(aetools.NProperty):
422 """index - the number of the window"""
423 which = 'pidx'
424 want = 'long'
425 class floating(aetools.NProperty):
426 """floating - Does the window float?"""
427 which = 'isfl'
428 want = 'bool'
429 class modal(aetools.NProperty):
430 """modal - Is the window modal?"""
431 which = 'pmod'
432 want = 'bool'
433 class resizable(aetools.NProperty):
434 """resizable - Is the window resizable?"""
435 which = 'prsz'
436 want = 'bool'
437 class zoomable(aetools.NProperty):
438 """zoomable - Is the window zoomable?"""
439 which = 'iszm'
440 want = 'bool'
441 class zoomed(aetools.NProperty):
442 """zoomed - Is the window zoomed?"""
443 which = 'pzum'
444 want = 'bool'
445 class name(aetools.NProperty):
446 """name - the title of the window"""
447 which = 'pnam'
448 want = 'itxt'
449 class visible(aetools.NProperty):
450 """visible - is the window visible?"""
451 which = 'pvis'
452 want = 'bool'
453 class position(aetools.NProperty):
454 """position - upper left coordinates of window"""
455 which = 'ppos'
456 want = 'QDpt'
458 class document(aetools.ComponentItem):
459 """document - A Document"""
460 want = 'docu'
461 # repeated property name the title of the document
462 class modified(aetools.NProperty):
463 """modified - Has the document been modified since the last save?"""
464 which = 'imod'
465 want = 'bool'
466 application._propdict = {
468 application._elemdict = {
469 'window' : window,
470 'document' : document,
472 window._propdict = {
473 'bounds' : bounds,
474 'closeable' : closeable,
475 'titled' : titled,
476 'index' : index,
477 'floating' : floating,
478 'modal' : modal,
479 'resizable' : resizable,
480 'zoomable' : zoomable,
481 'zoomed' : zoomed,
482 'name' : name,
483 'visible' : visible,
484 'position' : position,
486 window._elemdict = {
488 document._propdict = {
489 'name' : name,
490 'modified' : modified,
492 document._elemdict = {
494 _Enum_savo = {
495 'yes' : 'yes ', # Save objects now
496 'no' : 'no ', # Do not save objects
497 'ask' : 'ask ', # Ask the user whether to save
502 # Indices of types declared in this module
504 _classdeclarations = {
505 'cwin' : window,
506 'docu' : document,
507 'capp' : application,
510 _propdeclarations = {
511 'ptit' : titled,
512 'pidx' : index,
513 'ppos' : position,
514 'pnam' : name,
515 'pbnd' : bounds,
516 'imod' : modified,
517 'isfl' : floating,
518 'hclb' : closeable,
519 'iszm' : zoomable,
520 'pmod' : modal,
521 'pzum' : zoomed,
522 'pvis' : visible,
523 'prsz' : resizable,
526 _compdeclarations = {
529 _enumdeclarations = {
530 'savo' : _Enum_savo,
533 """Suite Miscellaneous Events: Useful events that arenÕt in any other suite
534 Level 1, version 1
536 Generated from Alpha:Desktop Folder:gnuplot.1:gnuplot 3.7.1a
537 AETE/AEUT resource version 1/0, language 0, script 0
540 import aetools
541 import MacOS
543 _code = 'misc'
545 class Miscellaneous_Events:
547 def revert(self, _object, _attributes={}, **_arguments):
548 """revert: Revert an object to the most recently saved version
549 Required argument: object to revert
550 Keyword argument _attributes: AppleEvent attribute dictionary
552 _code = 'misc'
553 _subcode = 'rvrt'
555 if _arguments: raise TypeError, 'No optional args expected'
556 _arguments['----'] = _object
559 _reply, _arguments, _attributes = self.send(_code, _subcode,
560 _arguments, _attributes)
561 if _arguments.has_key('errn'):
562 raise aetools.Error, aetools.decodeerror(_arguments)
563 # XXXX Optionally decode result
564 if _arguments.has_key('----'):
565 return _arguments['----']
567 def do_script(self, _object=None, _attributes={}, **_arguments):
568 """do script: execute a gnuplot script
569 Required argument: a gnuplot script
570 Keyword argument _attributes: AppleEvent attribute dictionary
572 _code = 'misc'
573 _subcode = 'dosc'
575 if _arguments: raise TypeError, 'No optional args expected'
576 _arguments['----'] = _object
579 _reply, _arguments, _attributes = self.send(_code, _subcode,
580 _arguments, _attributes)
581 if _arguments.has_key('errn'):
582 raise aetools.Error, aetools.decodeerror(_arguments)
583 # XXXX Optionally decode result
584 if _arguments.has_key('----'):
585 return _arguments['----']
589 # Indices of types declared in this module
591 _classdeclarations = {
594 _propdeclarations = {
597 _compdeclarations = {
600 _enumdeclarations = {