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:
authorWillian Padovani Germano <wpgermano@gmail.com>2003-09-20 07:40:16 +0400
committerWillian Padovani Germano <wpgermano@gmail.com>2003-09-20 07:40:16 +0400
commitc0303d78b4c25a095208d33a7d809ebb3db79404 (patch)
tree050c46f3e310c9b7a04e0ce7403216b8b061f698 /source/blender/python/api2_2x/Draw.h
parent7a510b7240b6441fdbcc43b98b13a2c3127e0b0a (diff)
Exppython:
- Object: implemented getBoundBox and makeDisplayList methods - NMesh and Object: small internal changes for nicer behavior - Draw: added function PupMenu - Docs: updated for the additions above Auto build tiny fix: added the imbuf include dir to source/creator/Makefile.am
Diffstat (limited to 'source/blender/python/api2_2x/Draw.h')
-rw-r--r--source/blender/python/api2_2x/Draw.h23
1 files changed, 18 insertions, 5 deletions
diff --git a/source/blender/python/api2_2x/Draw.h b/source/blender/python/api2_2x/Draw.h
index c84cc91ff58..3fbac1de12e 100644
--- a/source/blender/python/api2_2x/Draw.h
+++ b/source/blender/python/api2_2x/Draw.h
@@ -123,8 +123,9 @@ static void exit_pydraw(SpaceText *st);
static void exec_callback(SpaceText *st, PyObject *callback, PyObject *args);
void BPY_spacetext_do_pywin_draw(SpaceText *st);
static void spacetext_do_pywin_buttons(SpaceText *st, unsigned short event);
-void BPY_spacetext_do_pywin_event(SpaceText *st, unsigned short event, short val);
-int BPY_spacetext_is_pywin(SpaceText *st);
+void BPY_spacetext_do_pywin_event(SpaceText *st,
+ unsigned short event, short val);
+int BPY_spacetext_is_pywin(SpaceText *sc);
static char Method_Exit_doc[] =
"() - Exit the windowing interface";
@@ -278,6 +279,20 @@ NEW! - This function now returns the width of the drawn string.";
static PyObject *Method_GetStringWidth (PyObject *self, PyObject *args);
static PyObject *Method_Text (PyObject *self, PyObject *args);
+static char Method_PupMenu_doc[] =
+"(string, maxrow = None) - Display a pop-up menu at the screen.\n\
+The contents of the pop-up are specified through the 'string' argument,\n\
+like with Draw.Menu.\n\
+'maxrow' is an optional int to control how many rows the pop-up should have.\n\
+Options are followed by a format code and separated\n\
+by the '|' (pipe) character.\n\
+Valid format codes are\n\
+ %t - The option should be used as the title\n\
+ %xN - The option should set the integer N in the button value.\n\n\
+Ex: Draw.PupMenu('OK?%t|QUIT BLENDER') # should be familiar ...";
+
+static PyObject *Method_PupMenu (PyObject *self, PyObject *args);
+
#define _MethodDef(func, prefix) \
{#func, prefix##_##func, METH_VARARGS, prefix##_##func##_doc}
@@ -296,11 +311,9 @@ static struct PyMethodDef Draw_methods[] = {
MethodDef(Scrollbar),
MethodDef(Number),
MethodDef(String),
-
MethodDef(GetStringWidth),
-
MethodDef(Text),
-
+ MethodDef(PupMenu),
MethodDef(Exit),
MethodDef(Redraw),
MethodDef(Draw),