1 """Suite Finder items: Commands used with file system items, and basic item definition
4 Generated from Macintosh HD:Systeemmap:Finder
5 AETE/AEUT resource version 0/144, language 0, script 0
13 class Finder_items_Events
:
15 def add_to_favorites(self
, _object
, _attributes
={}, **_arguments
):
16 """add to favorites: Add the items to the Favorites menu in the Apple Menu and in Open and Save dialogs
17 Required argument: the items to add to the collection of Favorites
18 Keyword argument _attributes: AppleEvent attribute dictionary
23 if _arguments
: raise TypeError, 'No optional args expected'
24 _arguments
['----'] = _object
27 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
28 _arguments
, _attributes
)
29 if _arguments
.has_key('errn'):
30 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
31 # XXXX Optionally decode result
32 if _arguments
.has_key('----'):
33 return _arguments
['----']
39 def clean_up(self
, _object
, _attributes
={}, **_arguments
):
40 """clean up: Arrange items in window nicely (only applies to open windows in icon or button views that are not kept arranged)
41 Required argument: the window to clean up
42 Keyword argument by: the order in which to clean up the objects (name, index, date, etc.)
43 Keyword argument _attributes: AppleEvent attribute dictionary
48 aetools
.keysubst(_arguments
, self
._argmap
_clean
_up
)
49 _arguments
['----'] = _object
52 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
53 _arguments
, _attributes
)
54 if _arguments
.has_key('errn'):
55 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
56 # XXXX Optionally decode result
57 if _arguments
.has_key('----'):
58 return _arguments
['----']
60 def eject(self
, _object
=None, _attributes
={}, **_arguments
):
61 """eject: Eject the specified disk(s), or every ejectable disk if no parameter is specified
62 Required argument: the items to eject
63 Keyword argument _attributes: AppleEvent attribute dictionary
68 if _arguments
: raise TypeError, 'No optional args expected'
69 _arguments
['----'] = _object
72 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
73 _arguments
, _attributes
)
74 if _arguments
.has_key('errn'):
75 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
76 # XXXX Optionally decode result
77 if _arguments
.has_key('----'):
78 return _arguments
['----']
80 def empty(self
, _object
=None, _attributes
={}, **_arguments
):
81 """empty: Empty the trash
82 Required argument: ³empty² and ³empty trash² both do the same thing
83 Keyword argument _attributes: AppleEvent attribute dictionary
88 if _arguments
: raise TypeError, 'No optional args expected'
89 _arguments
['----'] = _object
92 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
93 _arguments
, _attributes
)
94 if _arguments
.has_key('errn'):
95 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
96 # XXXX Optionally decode result
97 if _arguments
.has_key('----'):
98 return _arguments
['----']
100 def erase(self
, _object
, _attributes
={}, **_arguments
):
101 """erase: Erase the specified disk(s)
102 Required argument: the items to erase
103 Keyword argument _attributes: AppleEvent attribute dictionary
108 if _arguments
: raise TypeError, 'No optional args expected'
109 _arguments
['----'] = _object
112 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
113 _arguments
, _attributes
)
114 if _arguments
.has_key('errn'):
115 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
116 # XXXX Optionally decode result
117 if _arguments
.has_key('----'):
118 return _arguments
['----']
120 def put_away(self
, _object
, _attributes
={}, **_arguments
):
121 """put away: Put away the specified object(s)
122 Required argument: the items to put away
123 Keyword argument _attributes: AppleEvent attribute dictionary
124 Returns: the object put away in its put-away location
129 if _arguments
: raise TypeError, 'No optional args expected'
130 _arguments
['----'] = _object
133 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
134 _arguments
, _attributes
)
135 if _arguments
.has_key('errn'):
136 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
137 # XXXX Optionally decode result
138 if _arguments
.has_key('----'):
139 return _arguments
['----']
141 def reveal(self
, _object
, _attributes
={}, **_arguments
):
142 """reveal: Bring the specified object(s) into view
143 Required argument: the object to be made visible
144 Keyword argument _attributes: AppleEvent attribute dictionary
149 if _arguments
: raise TypeError, 'No optional args expected'
150 _arguments
['----'] = _object
153 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
154 _arguments
, _attributes
)
155 if _arguments
.has_key('errn'):
156 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
157 # XXXX Optionally decode result
158 if _arguments
.has_key('----'):
159 return _arguments
['----']
161 def update(self
, _object
, _attributes
={}, **_arguments
):
162 """update: Update the display of the specified object(s) to match their on-disk representation
163 Required argument: the item to update
164 Keyword argument _attributes: AppleEvent attribute dictionary
169 if _arguments
: raise TypeError, 'No optional args expected'
170 _arguments
['----'] = _object
173 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
174 _arguments
, _attributes
)
175 if _arguments
.has_key('errn'):
176 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
177 # XXXX Optionally decode result
178 if _arguments
.has_key('----'):
179 return _arguments
['----']
182 class item(aetools
.ComponentItem
):
183 """item - An item """
185 class name(aetools
.NProperty
):
186 """name - the name of the item """
189 class index(aetools
.NProperty
):
190 """index - the index in the front-to-back ordering within its container """
193 class id(aetools
.NProperty
):
194 """id - an id that identifies the item """
197 class container(aetools
.NProperty
):
198 """container - the container of the item """
201 class disk(aetools
.NProperty
):
202 """disk - the disk on which the item is stored """
205 class folder(aetools
.NProperty
):
206 """folder - the folder in which the item is stored """
209 class position(aetools
.NProperty
):
210 """position - the position of the item within its parent window (can only be set for an item in a window viewed as icons or buttons) """
213 class bounds(aetools
.NProperty
):
214 """bounds - the bounding rectangle of the item (can only be set for an item in a window viewed as icons or buttons) """
217 class label_index(aetools
.NProperty
):
218 """label index - the label of the item """
221 class kind(aetools
.NProperty
):
222 """kind - the kind of the item """
225 class description(aetools
.NProperty
):
226 """description - a description of the item """
229 class comment(aetools
.NProperty
):
230 """comment - the comment of the item, displayed in the ³Get Info² window """
233 class size(aetools
.NProperty
):
234 """size - the logical size of the item """
237 class physical_size(aetools
.NProperty
):
238 """physical size - the actual space used by the item on disk """
241 class creation_date(aetools
.NProperty
):
242 """creation date - the date on which the item was created """
245 class modification_date(aetools
.NProperty
):
246 """modification date - the date on which the item was last modified """
249 class icon(aetools
.NProperty
):
250 """icon - the icon bitmap of the item """
253 class selected(aetools
.NProperty
):
254 """selected - Is the item selected? """
257 class content_space(aetools
.NProperty
):
258 """content space - the window that would open if the item was opened """
261 class window(aetools
.NProperty
):
262 """window - the window that would open if the item was opened """
265 class information_window(aetools
.NProperty
):
266 """information window - the information window for the item """
275 'container' : container
,
278 'position' : position
,
280 'label_index' : label_index
,
282 'description' : description
,
285 'physical_size' : physical_size
,
286 'creation_date' : creation_date
,
287 'modification_date' : modification_date
,
289 'selected' : selected
,
290 'content_space' : content_space
,
292 'information_window' : information_window
,
298 # Indices of types declared in this module
300 _classdeclarations
= {
304 _propdeclarations
= {
305 'iwnd' : information_window
,
307 'asmo' : modification_date
,
308 'ascd' : creation_date
,
310 'labi' : label_index
,
314 'dwnd' : content_space
,
317 'dscr' : description
,
322 'phys' : physical_size
,
328 _compdeclarations
= {
331 _enumdeclarations
= {