Mercurial > cpython-lru_cache-weakref
annotate Mac/Lib/lib-scriptpackages/Finder/Window_classes.py @ 25838:8540887bcec6 2.2
Backport of 2.183:
Fix memory leak in add_subclass() found by NealN with valgrind.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Fri, 18 Oct 2002 13:42:21 +0000 |
| parents | ec2a5559e769 |
| children | a9f2567c2f83 |
| rev | line source |
|---|---|
| 14082 | 1 """Suite Window classes: Classes representing windows |
| 2 Level 1, version 1 | |
| 3 | |
| 23269 | 4 Generated from Moes:Systeemmap:Finder |
| 14082 | 5 AETE/AEUT resource version 0/144, language 0, script 0 |
| 6 """ | |
| 7 | |
| 8 import aetools | |
| 9 import MacOS | |
| 10 | |
| 11 _code = 'fndr' | |
| 12 | |
| 13 class Window_classes_Events: | |
| 14 | |
| 15 pass | |
| 16 | |
| 17 | |
| 18 class window(aetools.ComponentItem): | |
| 19 """window - A window """ | |
| 20 want = 'cwin' | |
| 21 class position(aetools.NProperty): | |
| 22 """position - the upper left position of the window """ | |
| 23 which = 'posn' | |
| 24 want = 'QDpt' | |
| 25 class bounds(aetools.NProperty): | |
| 26 """bounds - the boundary rectangle for the window """ | |
| 27 which = 'pbnd' | |
| 28 want = 'qdrt' | |
| 29 class titled(aetools.NProperty): | |
| 30 """titled - Does the window have a title bar? """ | |
| 31 which = 'ptit' | |
| 32 want = 'bool' | |
| 33 class name(aetools.NProperty): | |
| 34 """name - the name of the window """ | |
| 35 which = 'pnam' | |
| 36 want = 'itxt' | |
| 37 class index(aetools.NProperty): | |
| 38 """index - the number of the window in the front-to-back layer ordering """ | |
| 39 which = 'pidx' | |
| 40 want = 'long' | |
| 41 class closeable(aetools.NProperty): | |
| 42 """closeable - Does the window have a close box? """ | |
| 43 which = 'hclb' | |
| 44 want = 'bool' | |
| 45 class floating(aetools.NProperty): | |
| 46 """floating - Does the window have a title bar? """ | |
| 47 which = 'isfl' | |
| 48 want = 'bool' | |
| 49 class modal(aetools.NProperty): | |
| 50 """modal - Is the window modal? """ | |
| 51 which = 'pmod' | |
| 52 want = 'bool' | |
| 23269 | 53 class resizable(aetools.NProperty): |
| 54 """resizable - Is the window resizable? """ | |
| 55 which = 'prsz' | |
| 56 want = 'bool' | |
| 14082 | 57 class zoomable(aetools.NProperty): |
| 58 """zoomable - Is the window zoomable? """ | |
| 59 which = 'iszm' | |
| 60 want = 'bool' | |
| 61 class zoomed(aetools.NProperty): | |
| 62 """zoomed - Is the window zoomed? """ | |
| 63 which = 'pzum' | |
| 64 want = 'bool' | |
| 65 class zoomed_full_size(aetools.NProperty): | |
| 66 """zoomed full size - Is the window zoomed to the full size of the screen? (can only be set, not read, and only applies to open non-pop-up windows) """ | |
| 67 which = 'zumf' | |
| 68 want = 'bool' | |
| 69 class visible(aetools.NProperty): | |
| 70 """visible - Is the window visible (always true for open Finder windows)? """ | |
| 71 which = 'pvis' | |
| 72 want = 'bool' | |
| 73 class popup(aetools.NProperty): | |
| 74 """popup - Is the window is a pop-up window? (only applies to open container windows in the Finder and can only be set when the Finder is the front application) """ | |
| 75 which = 'drwr' | |
| 76 want = 'bool' | |
| 77 class pulled_open(aetools.NProperty): | |
| 78 """pulled open - Is the window pulled open (only applies to pop-up windows and can only be set when the Finder is the front application)? """ | |
| 79 which = 'pull' | |
| 80 want = 'bool' | |
| 81 class collapsed(aetools.NProperty): | |
| 82 """collapsed - Is the window collapsed (only applies to open non-pop-up windows)? """ | |
| 83 which = 'wshd' | |
| 84 want = 'bool' | |
| 85 | |
| 86 windows = window | |
| 87 | |
| 88 class container_window(aetools.ComponentItem): | |
| 89 """container window - A window that contains items """ | |
| 90 want = 'cwnd' | |
| 91 class _3c_Inheritance_3e_(aetools.NProperty): | |
| 92 """<Inheritance> - inherits some of its properties from the window class """ | |
| 93 which = 'c@#^' | |
| 94 want = 'cwin' | |
| 95 class container(aetools.NProperty): | |
| 96 """container - the container from which the window was opened """ | |
| 97 which = 'ctnr' | |
| 98 want = 'obj ' | |
| 99 class item(aetools.NProperty): | |
| 100 """item - the item from which the window was opened (always returns something) """ | |
| 101 which = 'cobj' | |
| 102 want = 'obj ' | |
| 103 class has_custom_view_settings(aetools.NProperty): | |
| 104 """has custom view settings - Does the folder have custom view settings or is it using the default global settings? """ | |
| 105 which = 'cuss' | |
| 106 want = 'bool' | |
| 107 class view(aetools.NProperty): | |
| 108 """view - the current view for the window (icon, name, date, etc.) """ | |
| 109 which = 'pvew' | |
| 110 want = 'long' | |
| 111 class previous_list_view(aetools.NProperty): | |
| 112 """previous list view - the last non-icon view (by name, by date, etc.) selected for the container (forgotten as soon as the window is closed and only available when the window is open) """ | |
| 113 which = 'svew' | |
| 114 want = 'enum' | |
| 115 class button_view_arrangement(aetools.NProperty): | |
| 116 """button view arrangement - the property by which to keep icons arranged within a button view window """ | |
| 117 which = 'barr' | |
| 118 want = 'earr' | |
| 119 class spatial_view_arrangement(aetools.NProperty): | |
| 120 """spatial view arrangement - the property by which to keep icons arranged within a spatial view window """ | |
| 121 which = 'iarr' | |
| 122 want = 'earr' | |
| 123 class sort_direction(aetools.NProperty): | |
| 124 """sort direction - The direction in which the window is sorted """ | |
| 125 which = 'sord' | |
| 126 want = 'sodr' | |
| 127 class calculates_folder_sizes(aetools.NProperty): | |
| 128 """calculates folder sizes - Are folder sizes calculated and displayed in the window? (does not apply to suitcase windows) """ | |
| 129 which = 'sfsz' | |
| 130 want = 'bool' | |
| 131 class shows_comments(aetools.NProperty): | |
| 132 """shows comments - Are comments displayed in the window? (does not apply to suitcases) """ | |
| 133 which = 'scom' | |
| 134 want = 'bool' | |
| 135 class shows_creation_date(aetools.NProperty): | |
| 136 """shows creation date - Are creation dates displayed in the window? """ | |
| 137 which = 'scda' | |
| 138 want = 'bool' | |
| 139 class shows_kind(aetools.NProperty): | |
| 140 """shows kind - Are document kinds displayed in the window? """ | |
| 141 which = 'sknd' | |
| 142 want = 'bool' | |
| 143 class shows_label(aetools.NProperty): | |
| 144 """shows label - Are labels displayed in the window? """ | |
| 145 which = 'slbl' | |
| 146 want = 'bool' | |
| 147 class shows_modification_date(aetools.NProperty): | |
| 148 """shows modification date - Are modification dates displayed in the window? """ | |
| 149 which = 'sdat' | |
| 150 want = 'bool' | |
| 151 class shows_size(aetools.NProperty): | |
| 152 """shows size - Are file sizes displayed in the window? """ | |
| 153 which = 'ssiz' | |
| 154 want = 'bool' | |
| 155 class shows_version(aetools.NProperty): | |
| 156 """shows version - Are file versions displayed in the window? (does not apply to suitcase windows) """ | |
| 157 which = 'svrs' | |
| 158 want = 'bool' | |
| 159 class uses_relative_dates(aetools.NProperty): | |
| 160 """uses relative dates - Are relative dates (e.g., today, yesterday) shown in the window? """ | |
| 161 which = 'urdt' | |
| 162 want = 'bool' | |
| 163 | |
| 164 container_windows = container_window | |
| 165 | |
| 166 class information_window(aetools.ComponentItem): | |
|
17845
fb31c33761c9
Fixed macroman<->latin1 conversion. Some chars don't
Jack Jansen <jack.jansen@cwi.nl>
parents:
14124
diff
changeset
|
167 """information window - An information window (opened by –Get Info”) """ |
| 14082 | 168 want = 'iwnd' |
| 169 class current_panel(aetools.NProperty): | |
| 170 """current panel - the current panel in the information window """ | |
| 171 which = 'panl' | |
| 172 want = 'ipnl' | |
| 173 class comment(aetools.NProperty): | |
| 174 """comment - the comment """ | |
| 175 which = 'comt' | |
| 176 want = 'itxt' | |
| 177 class size(aetools.NProperty): | |
| 178 """size - the logical size of the item """ | |
| 179 which = 'ptsz' | |
| 180 want = 'long' | |
| 181 class physical_size(aetools.NProperty): | |
| 182 """physical size - the actual space used by the item on disk """ | |
| 183 which = 'phys' | |
| 184 want = 'long' | |
| 185 class creation_date(aetools.NProperty): | |
| 186 """creation date - the date on which the item was created """ | |
| 187 which = 'ascd' | |
| 188 want = 'ldt ' | |
| 189 class modification_date(aetools.NProperty): | |
| 190 """modification date - the date on which the item was last modified """ | |
| 191 which = 'asmo' | |
| 192 want = 'ldt ' | |
| 193 class suggested_size(aetools.NProperty): | |
| 194 """suggested size - the memory size with which the developer recommends the application be launched """ | |
| 195 which = 'sprt' | |
| 196 want = 'long' | |
| 197 class minimum_size(aetools.NProperty): | |
| 198 """minimum size - the smallest memory size with which the application can be launched (only applies to information windows for applications) """ | |
| 199 which = 'mprt' | |
| 200 want = 'long' | |
| 201 class preferred_size(aetools.NProperty): | |
| 202 """preferred size - the memory size with which the application will be launched (only applies to information windows for applications) """ | |
| 203 which = 'appt' | |
| 204 want = 'long' | |
| 205 class icon(aetools.NProperty): | |
| 206 """icon - the icon bitmap of the item """ | |
| 207 which = 'iimg' | |
| 208 want = 'ifam' | |
| 209 class locked(aetools.NProperty): | |
| 210 """locked - Is the item locked (applies only to file and application information windows)? """ | |
| 211 which = 'aslk' | |
| 212 want = 'bool' | |
| 213 class stationery(aetools.NProperty): | |
| 214 """stationery - Is the item a stationery pad? """ | |
| 215 which = 'pspd' | |
| 216 want = 'bool' | |
| 217 class warns_before_emptying(aetools.NProperty): | |
| 218 """warns before emptying - Display a dialog when emptying the trash (only valid for trash info window)? """ | |
| 219 which = 'warn' | |
| 220 want = 'bool' | |
| 221 class product_version(aetools.NProperty): | |
|
17845
fb31c33761c9
Fixed macroman<->latin1 conversion. Some chars don't
Jack Jansen <jack.jansen@cwi.nl>
parents:
14124
diff
changeset
|
222 """product version - the version of the product (visible at the top of the –Get Info” window) """ |
| 14082 | 223 which = 'ver2' |
| 224 want = 'itxt' | |
| 225 class version(aetools.NProperty): | |
|
17845
fb31c33761c9
Fixed macroman<->latin1 conversion. Some chars don't
Jack Jansen <jack.jansen@cwi.nl>
parents:
14124
diff
changeset
|
226 """version - the version of the file (visible at the bottom of the –Get Info” window) """ |
| 14082 | 227 which = 'vers' |
| 228 want = 'itxt' | |
| 229 | |
| 230 information_windows = information_window | |
| 231 | |
| 23269 | 232 class view_options_window(aetools.ComponentItem): |
| 233 """view options window - A View Options window """ | |
| 234 want = 'vwnd' | |
| 235 | |
| 236 view_options_windows = view_options_window | |
| 237 | |
| 14082 | 238 class preferences_window(aetools.ComponentItem): |
| 239 """preferences window - The Finder Preferences window """ | |
| 240 want = 'pwnd' | |
| 241 | |
| 242 class clipping_window(aetools.ComponentItem): | |
| 243 """clipping window - The window containing a clipping """ | |
| 244 want = 'lwnd' | |
| 245 | |
| 246 clipping_windows = clipping_window | |
| 247 | |
| 248 class content_space(aetools.ComponentItem): | |
|
17845
fb31c33761c9
Fixed macroman<->latin1 conversion. Some chars don't
Jack Jansen <jack.jansen@cwi.nl>
parents:
14124
diff
changeset
|
249 """content space - All windows, including the desktop window (–Window” does not include the desktop window) """ |
| 14082 | 250 want = 'dwnd' |
| 251 | |
| 252 content_spaces = content_space | |
| 253 window._propdict = { | |
| 254 'position' : position, | |
| 255 'bounds' : bounds, | |
| 256 'titled' : titled, | |
| 257 'name' : name, | |
| 258 'index' : index, | |
| 259 'closeable' : closeable, | |
| 260 'floating' : floating, | |
| 261 'modal' : modal, | |
| 262 'resizable' : resizable, | |
| 263 'zoomable' : zoomable, | |
| 264 'zoomed' : zoomed, | |
| 265 'zoomed_full_size' : zoomed_full_size, | |
| 266 'visible' : visible, | |
| 267 'popup' : popup, | |
| 268 'pulled_open' : pulled_open, | |
| 269 'collapsed' : collapsed, | |
| 270 } | |
| 271 window._elemdict = { | |
| 272 } | |
| 273 container_window._propdict = { | |
| 274 '_3c_Inheritance_3e_' : _3c_Inheritance_3e_, | |
| 275 'container' : container, | |
| 276 'item' : item, | |
| 277 'has_custom_view_settings' : has_custom_view_settings, | |
| 278 'view' : view, | |
| 279 'previous_list_view' : previous_list_view, | |
| 280 'button_view_arrangement' : button_view_arrangement, | |
| 281 'spatial_view_arrangement' : spatial_view_arrangement, | |
| 282 'sort_direction' : sort_direction, | |
| 283 'calculates_folder_sizes' : calculates_folder_sizes, | |
| 284 'shows_comments' : shows_comments, | |
| 285 'shows_creation_date' : shows_creation_date, | |
| 286 'shows_kind' : shows_kind, | |
| 287 'shows_label' : shows_label, | |
| 288 'shows_modification_date' : shows_modification_date, | |
| 289 'shows_size' : shows_size, | |
| 290 'shows_version' : shows_version, | |
| 291 'uses_relative_dates' : uses_relative_dates, | |
| 292 } | |
| 293 container_window._elemdict = { | |
| 294 } | |
| 295 information_window._propdict = { | |
| 296 '_3c_Inheritance_3e_' : _3c_Inheritance_3e_, | |
| 297 'item' : item, | |
| 298 'current_panel' : current_panel, | |
| 299 'comment' : comment, | |
| 300 'size' : size, | |
| 301 'physical_size' : physical_size, | |
| 302 'creation_date' : creation_date, | |
| 303 'modification_date' : modification_date, | |
| 304 'suggested_size' : suggested_size, | |
| 305 'minimum_size' : minimum_size, | |
| 306 'preferred_size' : preferred_size, | |
| 307 'icon' : icon, | |
| 308 'locked' : locked, | |
| 309 'stationery' : stationery, | |
| 310 'warns_before_emptying' : warns_before_emptying, | |
| 311 'product_version' : product_version, | |
| 312 'version' : version, | |
| 313 } | |
| 314 information_window._elemdict = { | |
| 315 } | |
| 23269 | 316 view_options_window._propdict = { |
| 317 '_3c_Inheritance_3e_' : _3c_Inheritance_3e_, | |
| 318 'item' : item, | |
| 319 } | |
| 320 view_options_window._elemdict = { | |
| 321 } | |
| 14082 | 322 preferences_window._propdict = { |
| 323 '_3c_Inheritance_3e_' : _3c_Inheritance_3e_, | |
| 324 'current_panel' : current_panel, | |
| 325 } | |
| 326 preferences_window._elemdict = { | |
| 327 } | |
| 328 clipping_window._propdict = { | |
| 329 '_3c_Inheritance_3e_' : _3c_Inheritance_3e_, | |
| 330 } | |
| 331 clipping_window._elemdict = { | |
| 332 } | |
| 333 content_space._propdict = { | |
| 334 } | |
| 335 content_space._elemdict = { | |
| 336 } | |
| 337 | |
| 338 # | |
| 339 # Indices of types declared in this module | |
| 340 # | |
| 341 _classdeclarations = { | |
| 23269 | 342 'pwnd' : preferences_window, |
| 343 'vwnd' : view_options_window, | |
| 344 'cwin' : window, | |
| 345 'cwnd' : container_window, | |
| 14082 | 346 'dwnd' : content_space, |
| 347 'iwnd' : information_window, | |
| 348 'lwnd' : clipping_window, | |
| 349 } | |
| 350 | |
| 351 _propdeclarations = { | |
| 23269 | 352 'prsz' : resizable, |
| 353 'barr' : button_view_arrangement, | |
| 354 'pzum' : zoomed, | |
| 355 'iarr' : spatial_view_arrangement, | |
| 356 'hclb' : closeable, | |
| 357 'c@#^' : _3c_Inheritance_3e_, | |
| 358 'ver2' : product_version, | |
| 359 'sfsz' : calculates_folder_sizes, | |
| 360 'sprt' : suggested_size, | |
| 361 'zumf' : zoomed_full_size, | |
| 362 'urdt' : uses_relative_dates, | |
| 363 'panl' : current_panel, | |
| 364 'pmod' : modal, | |
| 365 'pspd' : stationery, | |
| 366 'scom' : shows_comments, | |
| 367 'appt' : preferred_size, | |
| 368 'aslk' : locked, | |
| 369 'pbnd' : bounds, | |
| 370 'iimg' : icon, | |
| 371 'mprt' : minimum_size, | |
| 372 'pnam' : name, | |
| 373 'ssiz' : shows_size, | |
| 374 'asmo' : modification_date, | |
| 375 'cobj' : item, | |
| 376 'ptit' : titled, | |
| 377 'posn' : position, | |
| 378 'cuss' : has_custom_view_settings, | |
| 379 'phys' : physical_size, | |
| 380 'sknd' : shows_kind, | |
| 381 'svrs' : shows_version, | |
| 382 'svew' : previous_list_view, | |
| 383 'comt' : comment, | |
| 384 'iszm' : zoomable, | |
| 385 'sord' : sort_direction, | |
| 386 'ascd' : creation_date, | |
| 387 'ctnr' : container, | |
| 388 'wshd' : collapsed, | |
| 389 'slbl' : shows_label, | |
| 390 'pull' : pulled_open, | |
| 391 'ptsz' : size, | |
| 392 'pvis' : visible, | |
| 14082 | 393 'pidx' : index, |
| 23269 | 394 'isfl' : floating, |
| 395 'warn' : warns_before_emptying, | |
| 396 'drwr' : popup, | |
| 397 'sdat' : shows_modification_date, | |
| 398 'pvew' : view, | |
| 14082 | 399 'scda' : shows_creation_date, |
| 400 'vers' : version, | |
| 401 } | |
| 402 | |
| 403 _compdeclarations = { | |
| 404 } | |
| 405 | |
| 406 _enumdeclarations = { | |
| 407 } |
