Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2008-02-15 19:08:41 +0300
committerCampbell Barton <ideasman42@gmail.com>2008-02-15 19:08:41 +0300
commit11c926b57501d37dd7ac5fe1a313d598912962ca (patch)
treec048fe4d0b8f79e4811514ad3ffbee1aa92a711e /source/blender/python/api2_2x/doc
parent5e9457b5e2450a6d45393b88454ac51710d12cf5 (diff)
Python api addition PupTreeMenu() - for apricot
Diffstat (limited to 'source/blender/python/api2_2x/doc')
-rw-r--r--source/blender/python/api2_2x/doc/Draw.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/doc/Draw.py b/source/blender/python/api2_2x/doc/Draw.py
index 9b6f29b6b51..9d4f2372462 100644
--- a/source/blender/python/api2_2x/doc/Draw.py
+++ b/source/blender/python/api2_2x/doc/Draw.py
@@ -353,6 +353,23 @@ def PupMenu(name, maxrow = None):
@return: the chosen entry number or -1 if none was chosen.
"""
+def PupTreeMenu( menu ):
+ """
+ Create a popup menu tree.
+
+ Each item in the list is a menu item - (str, event), separator - None or submenu - (str, [...]).
+
+ Submenus list uses the same syntax as the menu list.
+
+ Example::
+ result = Draw.PupTreeMenu( [ ("Menu Item 1", 10), ("Menu Item 2", 12), ("SubMenu", [("Menu Item 3", 100), ("MenuItem4", 101) ] ) ] )
+
+ @type menu: string
+ @param menu: A menu list
+ @rtype: int
+ @return: the chosen entry number or -1 if none was chosen.
+ """
+
def PupIntInput(text, default, min, max):
"""
Create an integer number input pop-up.