ยปCore Development>Code coverage>Mac/Tools/Doc/HelpIndexingTool/Standard_Suite.py

Python code coverage for Mac/Tools/Doc/HelpIndexingTool/Standard_Suite.py

#countcontent
1n/a"""Suite Standard Suite: Common terms for most applications
2n/aLevel 1, version 1
3n/a
4n/aGenerated from /Developer/Applications/Apple Help Indexing Tool.app
5n/aAETE/AEUT resource version 1/1, 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 '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 objects to close
24n/a Keyword argument saving: specifies whether or not changes should be saved before closing
25n/a Keyword argument 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 def data_size(self, _object, _attributes={}, **_arguments):
45n/a """data size: Return the size in bytes of an object
46n/a Required argument: the object whose data size is to be returned
47n/a Keyword argument _attributes: AppleEvent attribute dictionary
48n/a Returns: the size of the object in bytes
49n/a """
50n/a _code = 'core'
51n/a _subcode = 'dsiz'
52n/a
53n/a if _arguments: raise TypeError('No optional args expected')
54n/a _arguments['----'] = _object
55n/a
56n/a
57n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
58n/a _arguments, _attributes)
59n/a if _arguments.get('errn', 0):
60n/a raise aetools.Error(aetools.decodeerror(_arguments))
61n/a # XXXX Optionally decode result
62n/a if _arguments.has_key('----'):
63n/a return _arguments['----']
64n/a
65n/a def get(self, _object, _attributes={}, **_arguments):
66n/a """get: Get the data for an object
67n/a Required argument: the object whose data is to be returned
68n/a Keyword argument _attributes: AppleEvent attribute dictionary
69n/a Returns: The data from the object
70n/a """
71n/a _code = 'core'
72n/a _subcode = 'getd'
73n/a
74n/a if _arguments: raise TypeError('No optional args expected')
75n/a _arguments['----'] = _object
76n/a
77n/a
78n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
79n/a _arguments, _attributes)
80n/a if _arguments.get('errn', 0):
81n/a raise aetools.Error(aetools.decodeerror(_arguments))
82n/a # XXXX Optionally decode result
83n/a if _arguments.has_key('----'):
84n/a return _arguments['----']
85n/a
86n/a _argmap_make = {
87n/a 'new' : 'kocl',
88n/a 'at' : 'insh',
89n/a 'with_data' : 'data',
90n/a 'with_properties' : 'prdt',
91n/a }
92n/a
93n/a def make(self, _no_object=None, _attributes={}, **_arguments):
94n/a """make: Make a new element
95n/a Keyword argument new: the class of the new element
96n/a Keyword argument at: the location at which to insert the element
97n/a Keyword argument with_data: the initial data for the element
98n/a Keyword argument with_properties: the initial values for the properties of the element
99n/a Keyword argument _attributes: AppleEvent attribute dictionary
100n/a Returns: Object specifier for the new element
101n/a """
102n/a _code = 'core'
103n/a _subcode = 'crel'
104n/a
105n/a aetools.keysubst(_arguments, self._argmap_make)
106n/a if _no_object is not None: raise TypeError('No direct arg expected')
107n/a
108n/a
109n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
110n/a _arguments, _attributes)
111n/a if _arguments.get('errn', 0):
112n/a raise aetools.Error(aetools.decodeerror(_arguments))
113n/a # XXXX Optionally decode result
114n/a if _arguments.has_key('----'):
115n/a return _arguments['----']
116n/a
117n/a def open(self, _object, _attributes={}, **_arguments):
118n/a """open: Open the specified object(s)
119n/a Required argument: Objects to open. Can be a list of files or an object specifier.
120n/a Keyword argument _attributes: AppleEvent attribute dictionary
121n/a """
122n/a _code = 'aevt'
123n/a _subcode = 'odoc'
124n/a
125n/a if _arguments: raise TypeError('No optional args expected')
126n/a _arguments['----'] = _object
127n/a
128n/a
129n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
130n/a _arguments, _attributes)
131n/a if _arguments.get('errn', 0):
132n/a raise aetools.Error(aetools.decodeerror(_arguments))
133n/a # XXXX Optionally decode result
134n/a if _arguments.has_key('----'):
135n/a return _arguments['----']
136n/a
137n/a def print_(self, _object, _attributes={}, **_arguments):
138n/a """print: Print the specified object(s)
139n/a Required argument: Objects to print. Can be a list of files or an object specifier.
140n/a Keyword argument _attributes: AppleEvent attribute dictionary
141n/a """
142n/a _code = 'aevt'
143n/a _subcode = 'pdoc'
144n/a
145n/a if _arguments: raise TypeError('No optional args expected')
146n/a _arguments['----'] = _object
147n/a
148n/a
149n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
150n/a _arguments, _attributes)
151n/a if _arguments.get('errn', 0):
152n/a raise aetools.Error(aetools.decodeerror(_arguments))
153n/a # XXXX Optionally decode result
154n/a if _arguments.has_key('----'):
155n/a return _arguments['----']
156n/a
157n/a _argmap_save = {
158n/a 'in_' : 'kfil',
159n/a 'as' : 'fltp',
160n/a }
161n/a
162n/a def save(self, _object, _attributes={}, **_arguments):
163n/a """save: save a set of objects
164n/a Required argument: Objects to save.
165n/a Keyword argument in_: the file in which to save the object(s)
166n/a Keyword argument as: the file type of the document in which to save the data
167n/a Keyword argument _attributes: AppleEvent attribute dictionary
168n/a """
169n/a _code = 'core'
170n/a _subcode = 'save'
171n/a
172n/a aetools.keysubst(_arguments, self._argmap_save)
173n/a _arguments['----'] = _object
174n/a
175n/a
176n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
177n/a _arguments, _attributes)
178n/a if _arguments.get('errn', 0):
179n/a raise aetools.Error(aetools.decodeerror(_arguments))
180n/a # XXXX Optionally decode result
181n/a if _arguments.has_key('----'):
182n/a return _arguments['----']
183n/a
184n/a _argmap_set = {
185n/a 'to' : 'data',
186n/a }
187n/a
188n/a def set(self, _object, _attributes={}, **_arguments):
189n/a """set: Set an object\xd5s data
190n/a Required argument: the object to change
191n/a Keyword argument to: the new value
192n/a Keyword argument _attributes: AppleEvent attribute dictionary
193n/a """
194n/a _code = 'core'
195n/a _subcode = 'setd'
196n/a
197n/a aetools.keysubst(_arguments, self._argmap_set)
198n/a _arguments['----'] = _object
199n/a
200n/a
201n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
202n/a _arguments, _attributes)
203n/a if _arguments.get('errn', 0):
204n/a raise aetools.Error(aetools.decodeerror(_arguments))
205n/a # XXXX Optionally decode result
206n/a if _arguments.has_key('----'):
207n/a return _arguments['----']
208n/a
209n/a
210n/aclass application(aetools.ComponentItem):
211n/a """application - An application program """
212n/a want = 'capp'
213n/a# element 'cwin' as ['indx', 'name', 'rele']
214n/a# element 'docu' as ['name']
215n/a
216n/aclass window(aetools.ComponentItem):
217n/a """window - A Window """
218n/a want = 'cwin'
219n/aclass _Prop_bounds(aetools.NProperty):
220n/a """bounds - the boundary rectangle for the window """
221n/a which = 'pbnd'
222n/a want = 'qdrt'
223n/aclass _Prop_closeable(aetools.NProperty):
224n/a """closeable - Does the window have a close box? """
225n/a which = 'hclb'
226n/a want = 'bool'
227n/aclass _Prop_floating(aetools.NProperty):
228n/a """floating - Does the window float? """
229n/a which = 'isfl'
230n/a want = 'bool'
231n/aclass _Prop_index(aetools.NProperty):
232n/a """index - the number of the window """
233n/a which = 'pidx'
234n/a want = 'long'
235n/aclass _Prop_modal(aetools.NProperty):
236n/a """modal - Is the window modal? """
237n/a which = 'pmod'
238n/a want = 'bool'
239n/aclass _Prop_name(aetools.NProperty):
240n/a """name - the title of the window """
241n/a which = 'pnam'
242n/a want = 'itxt'
243n/aclass _Prop_position(aetools.NProperty):
244n/a """position - upper left coordinates of window """
245n/a which = 'ppos'
246n/a want = 'QDpt'
247n/aclass _Prop_resizable(aetools.NProperty):
248n/a """resizable - Is the window resizable? """
249n/a which = 'prsz'
250n/a want = 'bool'
251n/aclass _Prop_titled(aetools.NProperty):
252n/a """titled - Does the window have a title bar? """
253n/a which = 'ptit'
254n/a want = 'bool'
255n/aclass _Prop_visible(aetools.NProperty):
256n/a """visible - is the window visible? """
257n/a which = 'pvis'
258n/a want = 'bool'
259n/aclass _Prop_zoomable(aetools.NProperty):
260n/a """zoomable - Is the window zoomable? """
261n/a which = 'iszm'
262n/a want = 'bool'
263n/aclass _Prop_zoomed(aetools.NProperty):
264n/a """zoomed - Is the window zoomed? """
265n/a which = 'pzum'
266n/a want = 'bool'
267n/a
268n/aclass document(aetools.ComponentItem):
269n/a """document - A Document """
270n/a want = 'docu'
271n/aclass _Prop_modified(aetools.NProperty):
272n/a """modified - Has the document been modified since the last save? """
273n/a which = 'imod'
274n/a want = 'bool'
275n/aapplication._superclassnames = []
276n/aapplication._privpropdict = {
277n/a}
278n/aapplication._privelemdict = {
279n/a 'document' : document,
280n/a 'window' : window,
281n/a}
282n/awindow._superclassnames = []
283n/awindow._privpropdict = {
284n/a 'bounds' : _Prop_bounds,
285n/a 'closeable' : _Prop_closeable,
286n/a 'floating' : _Prop_floating,
287n/a 'index' : _Prop_index,
288n/a 'modal' : _Prop_modal,
289n/a 'name' : _Prop_name,
290n/a 'position' : _Prop_position,
291n/a 'resizable' : _Prop_resizable,
292n/a 'titled' : _Prop_titled,
293n/a 'visible' : _Prop_visible,
294n/a 'zoomable' : _Prop_zoomable,
295n/a 'zoomed' : _Prop_zoomed,
296n/a}
297n/awindow._privelemdict = {
298n/a}
299n/adocument._superclassnames = []
300n/adocument._privpropdict = {
301n/a 'modified' : _Prop_modified,
302n/a 'name' : _Prop_name,
303n/a}
304n/adocument._privelemdict = {
305n/a}
306n/a_Enum_savo = {
307n/a 'yes' : 'yes ', # Save objects now
308n/a 'no' : 'no ', # Do not save objects
309n/a 'ask' : 'ask ', # Ask the user whether to save
310n/a}
311n/a
312n/a
313n/a#
314n/a# Indices of types declared in this module
315n/a#
316n/a_classdeclarations = {
317n/a 'capp' : application,
318n/a 'cwin' : window,
319n/a 'docu' : document,
320n/a}
321n/a
322n/a_propdeclarations = {
323n/a 'hclb' : _Prop_closeable,
324n/a 'imod' : _Prop_modified,
325n/a 'isfl' : _Prop_floating,
326n/a 'iszm' : _Prop_zoomable,
327n/a 'pbnd' : _Prop_bounds,
328n/a 'pidx' : _Prop_index,
329n/a 'pmod' : _Prop_modal,
330n/a 'pnam' : _Prop_name,
331n/a 'ppos' : _Prop_position,
332n/a 'prsz' : _Prop_resizable,
333n/a 'ptit' : _Prop_titled,
334n/a 'pvis' : _Prop_visible,
335n/a 'pzum' : _Prop_zoomed,
336n/a}
337n/a
338n/a_compdeclarations = {
339n/a}
340n/a
341n/a_enumdeclarations = {
342n/a 'savo' : _Enum_savo,
343n/a}