Added 'list_only' option (and modified 'run()' to respect it).
[python/dscho.git] / Mac / Modules / menu / menuedit.py
blob8e7d12b4186630f66874c13a39322fabde08cc05
1 f = Function(void, 'OpenDeskAcc',
2 (Str255, 'name', InMode),
4 functions.append(f)
6 f = Function(MenuHandle, 'as_Menu',
7 (Handle, 'h', InMode))
8 functions.append(f)
10 as_resource_body = """
11 return ResObj_New((Handle)_self->ob_itself);
12 """
14 f = ManualGenerator("as_Resource", as_resource_body)
15 f.docstring = lambda : "Return this Menu as a Resource"
17 methods.append(f)
19 # The following have "Mac" prepended to their names in the include file
20 # since UH 3.1, sigh...
21 f = Function(MenuHandle, 'GetMenu',
22 (short, 'resourceID', InMode),
24 functions.append(f)
26 f = Method(void, 'AppendMenu',
27 (MenuHandle, 'menu', InMode),
28 (ConstStr255Param, 'data', InMode),
30 methods.append(f)
32 f = Method(void, 'InsertMenu',
33 (MenuHandle, 'theMenu', InMode),
34 (short, 'beforeID', InMode),
36 methods.append(f)
38 f = Function(void, 'DeleteMenu',
39 (short, 'menuID', InMode),
41 functions.append(f)
43 f = Method(void, 'InsertMenuItem',
44 (MenuHandle, 'theMenu', InMode),
45 (ConstStr255Param, 'itemString', InMode),
46 (short, 'afterItem', InMode),
48 methods.append(f)
50 f = Function(void, 'DrawMenuBar',
52 functions.append(f)