ยปCore Development>Code coverage>Lib/plat-mac/lib-scriptpackages/CodeWarrior/Standard_Suite.py

Python code coverage for Lib/plat-mac/lib-scriptpackages/CodeWarrior/Standard_Suite.py

#countcontent
1n/a"""Suite Standard Suite: Common terms for most applications
2n/aLevel 1, version 1
3n/a
4n/aGenerated from /Volumes/Sap/Applications (Mac OS 9)/Metrowerks CodeWarrior 7.0/Metrowerks CodeWarrior/CodeWarrior IDE 4.2.5
5n/aAETE/AEUT resource version 1/0, language 0, script 0
6n/a"""
7n/a
8n/aimport aetools
9n/aimport MacOS
10n/a
11n/a_code = 'CoRe'
12n/a
13n/afrom StdSuites.Standard_Suite import *
14n/aclass Standard_Suite_Events(Standard_Suite_Events):
15n/a
16n/a _argmap_close = {
17n/a 'saving' : 'savo',
18n/a 'saving_in' : 'kfil',
19n/a }
20n/a
21n/a def close(self, _object, _attributes={}, **_arguments):
22n/a """close: close an object
23n/a Required argument: the object to close
24n/a Keyword argument saving: specifies whether or not changes should be saved before closing
25n/a Keyword argument saving_in: the file in which to save the object
26n/a Keyword argument _attributes: AppleEvent attribute dictionary
27n/a """
28n/a _code = 'core'
29n/a _subcode = 'clos'
30n/a
31n/a aetools.keysubst(_arguments, self._argmap_close)
32n/a _arguments['----'] = _object
33n/a
34n/a aetools.enumsubst(_arguments, 'savo', _Enum_savo)
35n/a
36n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
37n/a _arguments, _attributes)
38n/a if _arguments.get('errn', 0):
39n/a raise aetools.Error, aetools.decodeerror(_arguments)
40n/a # XXXX Optionally decode result
41n/a if _arguments.has_key('----'):
42n/a return _arguments['----']
43n/a
44n/a _argmap_count = {
45n/a 'each' : 'kocl',
46n/a }
47n/a
48n/a def count(self, _object, _attributes={}, **_arguments):
49n/a """count: return the number of elements of a particular class within an object
50n/a Required argument: the object whose elements are to be counted
51n/a Keyword argument each: the class of the elements to be counted. Keyword 'each' is optional in AppleScript
52n/a Keyword argument _attributes: AppleEvent attribute dictionary
53n/a Returns: the number of elements
54n/a """
55n/a _code = 'core'
56n/a _subcode = 'cnte'
57n/a
58n/a aetools.keysubst(_arguments, self._argmap_count)
59n/a _arguments['----'] = _object
60n/a
61n/a
62n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
63n/a _arguments, _attributes)
64n/a if _arguments.get('errn', 0):
65n/a raise aetools.Error, aetools.decodeerror(_arguments)
66n/a # XXXX Optionally decode result
67n/a if _arguments.has_key('----'):
68n/a return _arguments['----']
69n/a
70n/a _argmap_get = {
71n/a 'as' : 'rtyp',
72n/a }
73n/a
74n/a def get(self, _object, _attributes={}, **_arguments):
75n/a """get: get the data for an object
76n/a Required argument: the object whose data is to be returned
77n/a Keyword argument as: the desired types for the data, in order of preference
78n/a Keyword argument _attributes: AppleEvent attribute dictionary
79n/a Returns: The data from the object
80n/a """
81n/a _code = 'core'
82n/a _subcode = 'getd'
83n/a
84n/a aetools.keysubst(_arguments, self._argmap_get)
85n/a _arguments['----'] = _object
86n/a
87n/a
88n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
89n/a _arguments, _attributes)
90n/a if _arguments.get('errn', 0):
91n/a raise aetools.Error, aetools.decodeerror(_arguments)
92n/a # XXXX Optionally decode result
93n/a if _arguments.has_key('----'):
94n/a return _arguments['----']
95n/a
96n/a _argmap_make = {
97n/a 'new' : 'kocl',
98n/a 'as' : 'rtyp',
99n/a 'at' : 'insh',
100n/a 'with_data' : 'data',
101n/a 'with_properties' : 'prdt',
102n/a }
103n/a
104n/a def make(self, _no_object=None, _attributes={}, **_arguments):
105n/a """make: make a new element
106n/a Keyword argument new: the class of the new element\xd1keyword 'new' is optional in AppleScript
107n/a Keyword argument as: the desired types for the data, in order of preference
108n/a Keyword argument at: the location at which to insert the element
109n/a Keyword argument with_data: the initial data for the element
110n/a Keyword argument with_properties: the initial values for the properties of the element
111n/a Keyword argument _attributes: AppleEvent attribute dictionary
112n/a Returns: to the new object(s)
113n/a """
114n/a _code = 'core'
115n/a _subcode = 'crel'
116n/a
117n/a aetools.keysubst(_arguments, self._argmap_make)
118n/a if _no_object is not None: raise TypeError, 'No direct arg expected'
119n/a
120n/a
121n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
122n/a _arguments, _attributes)
123n/a if _arguments.get('errn', 0):
124n/a raise aetools.Error, aetools.decodeerror(_arguments)
125n/a # XXXX Optionally decode result
126n/a if _arguments.has_key('----'):
127n/a return _arguments['----']
128n/a
129n/a def select(self, _object=None, _attributes={}, **_arguments):
130n/a """select: select the specified object
131n/a Required argument: the object to select
132n/a Keyword argument _attributes: AppleEvent attribute dictionary
133n/a """
134n/a _code = 'misc'
135n/a _subcode = 'slct'
136n/a
137n/a if _arguments: raise TypeError, 'No optional args expected'
138n/a _arguments['----'] = _object
139n/a
140n/a
141n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
142n/a _arguments, _attributes)
143n/a if _arguments.get('errn', 0):
144n/a raise aetools.Error, aetools.decodeerror(_arguments)
145n/a # XXXX Optionally decode result
146n/a if _arguments.has_key('----'):
147n/a return _arguments['----']
148n/a
149n/a _argmap_set = {
150n/a 'to' : 'data',
151n/a }
152n/a
153n/a def set(self, _object, _attributes={}, **_arguments):
154n/a """set: set an object's data
155n/a Required argument: the object to change
156n/a Keyword argument to: the new value
157n/a Keyword argument _attributes: AppleEvent attribute dictionary
158n/a """
159n/a _code = 'core'
160n/a _subcode = 'setd'
161n/a
162n/a aetools.keysubst(_arguments, self._argmap_set)
163n/a _arguments['----'] = _object
164n/a
165n/a
166n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
167n/a _arguments, _attributes)
168n/a if _arguments.get('errn', 0):
169n/a raise aetools.Error, aetools.decodeerror(_arguments)
170n/a # XXXX Optionally decode result
171n/a if _arguments.has_key('----'):
172n/a return _arguments['----']
173n/a
174n/a
175n/aclass application(aetools.ComponentItem):
176n/a """application - an application program """
177n/a want = 'capp'
178n/aclass _Prop_user_interaction(aetools.NProperty):
179n/a """user interaction - user interaction level """
180n/a which = 'inte'
181n/a want = 'Inte'
182n/auser_interaction = _Prop_user_interaction()
183n/a# element 'cwin' as ['indx', 'name', 'rang']
184n/a# element 'docu' as ['indx', 'name', 'rang']
185n/a
186n/aclass character(aetools.ComponentItem):
187n/a """character - a character """
188n/a want = 'cha '
189n/aclass _Prop_length(aetools.NProperty):
190n/a """length - length in characters of this object """
191n/a which = 'pLen'
192n/a want = 'long'
193n/aclass _Prop_offset(aetools.NProperty):
194n/a """offset - offset of a text object from the beginning of the document (first char has offset 1) """
195n/a which = 'pOff'
196n/a want = 'long'
197n/a
198n/aclass insertion_point(aetools.ComponentItem):
199n/a """insertion point - An insertion location between two objects """
200n/a want = 'cins'
201n/a
202n/aclass line(aetools.ComponentItem):
203n/a """line - lines of text """
204n/a want = 'clin'
205n/aclass _Prop_index(aetools.NProperty):
206n/a """index - index of a line object from the beginning of the document (first line has index 1) """
207n/a which = 'pidx'
208n/a want = 'long'
209n/a# element 'cha ' as ['indx', 'rang', 'rele']
210n/a
211n/alines = line
212n/a
213n/aclass selection_2d_object(aetools.ComponentItem):
214n/a """selection-object - the selection visible to the user """
215n/a want = 'csel'
216n/aclass _Prop_contents(aetools.NProperty):
217n/a """contents - the contents of the selection """
218n/a which = 'pcnt'
219n/a want = 'type'
220n/a# element 'cha ' as ['indx', 'rele', 'rang', 'test']
221n/a# element 'clin' as ['indx', 'rang', 'rele']
222n/a# element 'ctxt' as ['rang']
223n/a
224n/aclass text(aetools.ComponentItem):
225n/a """text - Text """
226n/a want = 'ctxt'
227n/a# element 'cha ' as ['indx', 'rele', 'rang']
228n/a# element 'cins' as ['rele']
229n/a# element 'clin' as ['indx', 'rang', 'rele']
230n/a# element 'ctxt' as ['rang']
231n/a
232n/aclass window(aetools.ComponentItem):
233n/a """window - A window """
234n/a want = 'cwin'
235n/aclass _Prop_bounds(aetools.NProperty):
236n/a """bounds - the boundary rectangle for the window """
237n/a which = 'pbnd'
238n/a want = 'qdrt'
239n/aclass _Prop_document(aetools.NProperty):
240n/a """document - the document that owns this window """
241n/a which = 'docu'
242n/a want = 'docu'
243n/aclass _Prop_name(aetools.NProperty):
244n/a """name - the title of the window """
245n/a which = 'pnam'
246n/a want = 'itxt'
247n/aclass _Prop_position(aetools.NProperty):
248n/a """position - upper left coordinates of window """
249n/a which = 'ppos'
250n/a want = 'QDpt'
251n/aclass _Prop_visible(aetools.NProperty):
252n/a """visible - is the window visible? """
253n/a which = 'pvis'
254n/a want = 'bool'
255n/aclass _Prop_zoomed(aetools.NProperty):
256n/a """zoomed - Is the window zoomed? """
257n/a which = 'pzum'
258n/a want = 'bool'
259n/a
260n/awindows = window
261n/a
262n/aclass document(aetools.ComponentItem):
263n/a """document - a document """
264n/a want = 'docu'
265n/aclass _Prop_file_permissions(aetools.NProperty):
266n/a """file permissions - the file permissions for the document """
267n/a which = 'PERM'
268n/a want = 'PERM'
269n/aclass _Prop_kind(aetools.NProperty):
270n/a """kind - the kind of document """
271n/a which = 'DKND'
272n/a want = 'DKND'
273n/aclass _Prop_location(aetools.NProperty):
274n/a """location - the file of the document """
275n/a which = 'FILE'
276n/a want = 'fss '
277n/aclass _Prop_window(aetools.NProperty):
278n/a """window - the window of the document. """
279n/a which = 'cwin'
280n/a want = 'cwin'
281n/a
282n/adocuments = document
283n/a
284n/aclass files(aetools.ComponentItem):
285n/a """files - Every file """
286n/a want = 'file'
287n/a
288n/afile = files
289n/aapplication._superclassnames = []
290n/aapplication._privpropdict = {
291n/a 'user_interaction' : _Prop_user_interaction,
292n/a}
293n/aapplication._privelemdict = {
294n/a 'document' : document,
295n/a 'window' : window,
296n/a}
297n/acharacter._superclassnames = []
298n/acharacter._privpropdict = {
299n/a 'length' : _Prop_length,
300n/a 'offset' : _Prop_offset,
301n/a}
302n/acharacter._privelemdict = {
303n/a}
304n/ainsertion_point._superclassnames = []
305n/ainsertion_point._privpropdict = {
306n/a 'length' : _Prop_length,
307n/a 'offset' : _Prop_offset,
308n/a}
309n/ainsertion_point._privelemdict = {
310n/a}
311n/aline._superclassnames = []
312n/aline._privpropdict = {
313n/a 'index' : _Prop_index,
314n/a 'length' : _Prop_length,
315n/a 'offset' : _Prop_offset,
316n/a}
317n/aline._privelemdict = {
318n/a 'character' : character,
319n/a}
320n/aselection_2d_object._superclassnames = []
321n/aselection_2d_object._privpropdict = {
322n/a 'contents' : _Prop_contents,
323n/a 'length' : _Prop_length,
324n/a 'offset' : _Prop_offset,
325n/a}
326n/aselection_2d_object._privelemdict = {
327n/a 'character' : character,
328n/a 'line' : line,
329n/a 'text' : text,
330n/a}
331n/atext._superclassnames = []
332n/atext._privpropdict = {
333n/a 'length' : _Prop_length,
334n/a 'offset' : _Prop_offset,
335n/a}
336n/atext._privelemdict = {
337n/a 'character' : character,
338n/a 'insertion_point' : insertion_point,
339n/a 'line' : line,
340n/a 'text' : text,
341n/a}
342n/awindow._superclassnames = []
343n/awindow._privpropdict = {
344n/a 'bounds' : _Prop_bounds,
345n/a 'document' : _Prop_document,
346n/a 'index' : _Prop_index,
347n/a 'name' : _Prop_name,
348n/a 'position' : _Prop_position,
349n/a 'visible' : _Prop_visible,
350n/a 'zoomed' : _Prop_zoomed,
351n/a}
352n/awindow._privelemdict = {
353n/a}
354n/adocument._superclassnames = []
355n/adocument._privpropdict = {
356n/a 'file_permissions' : _Prop_file_permissions,
357n/a 'index' : _Prop_index,
358n/a 'kind' : _Prop_kind,
359n/a 'location' : _Prop_location,
360n/a 'name' : _Prop_name,
361n/a 'window' : _Prop_window,
362n/a}
363n/adocument._privelemdict = {
364n/a}
365n/afiles._superclassnames = []
366n/afiles._privpropdict = {
367n/a}
368n/afiles._privelemdict = {
369n/a}
370n/a
371n/a#
372n/a# Indices of types declared in this module
373n/a#
374n/a_classdeclarations = {
375n/a 'capp' : application,
376n/a 'cha ' : character,
377n/a 'cins' : insertion_point,
378n/a 'clin' : line,
379n/a 'csel' : selection_2d_object,
380n/a 'ctxt' : text,
381n/a 'cwin' : window,
382n/a 'docu' : document,
383n/a 'file' : files,
384n/a}
385n/a
386n/a_propdeclarations = {
387n/a 'DKND' : _Prop_kind,
388n/a 'FILE' : _Prop_location,
389n/a 'PERM' : _Prop_file_permissions,
390n/a 'cwin' : _Prop_window,
391n/a 'docu' : _Prop_document,
392n/a 'inte' : _Prop_user_interaction,
393n/a 'pLen' : _Prop_length,
394n/a 'pOff' : _Prop_offset,
395n/a 'pbnd' : _Prop_bounds,
396n/a 'pcnt' : _Prop_contents,
397n/a 'pidx' : _Prop_index,
398n/a 'pnam' : _Prop_name,
399n/a 'ppos' : _Prop_position,
400n/a 'pvis' : _Prop_visible,
401n/a 'pzum' : _Prop_zoomed,
402n/a}
403n/a
404n/a_compdeclarations = {
405n/a}
406n/a
407n/a_enumdeclarations = {
408n/a}