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:
Diffstat (limited to 'source/blender/python/api2_2x')
-rw-r--r--source/blender/python/api2_2x/Text.c401
-rw-r--r--source/blender/python/api2_2x/Text.h2
-rw-r--r--source/blender/python/api2_2x/doc/Draw.py8
-rw-r--r--source/blender/python/api2_2x/doc/Text.py103
4 files changed, 489 insertions, 25 deletions
diff --git a/source/blender/python/api2_2x/Text.c b/source/blender/python/api2_2x/Text.c
index 308ad094c7b..a76a6f56224 100644
--- a/source/blender/python/api2_2x/Text.c
+++ b/source/blender/python/api2_2x/Text.c
@@ -34,9 +34,13 @@
#include "BKE_global.h"
#include "BKE_main.h"
#include "BIF_drawtext.h"
+#include "BIF_screen.h"
#include "BKE_text.h"
+#include "BKE_suggestions.h"
#include "BLI_blenlib.h"
+#include "DNA_screen_types.h"
#include "DNA_space_types.h"
+#include "MEM_guardedalloc.h"
#include "gen_utils.h"
#include "gen_library.h"
#include "../BPY_extern.h"
@@ -90,9 +94,20 @@ struct PyMethodDef M_Text_methods[] = {
static PyObject *Text_getFilename( BPy_Text * self );
static PyObject *Text_getNLines( BPy_Text * self );
static PyObject *Text_clear( BPy_Text * self );
+static PyObject *Text_reset( BPy_Text * self );
+static PyObject *Text_readline( BPy_Text * self );
static PyObject *Text_write( BPy_Text * self, PyObject * value );
+static PyObject *Text_insert( BPy_Text * self, PyObject * value );
+static PyObject *Text_delete( BPy_Text * self, PyObject * value );
static PyObject *Text_set( BPy_Text * self, PyObject * args );
-static PyObject *Text_asLines( BPy_Text * self );
+static PyObject *Text_asLines( BPy_Text * self, PyObject * args );
+static PyObject *Text_getCursorPos( BPy_Text * self );
+static PyObject *Text_setCursorPos( BPy_Text * self, PyObject * args );
+static PyObject *Text_getSelectPos( BPy_Text * self );
+static PyObject *Text_setSelectPos( BPy_Text * self, PyObject * args );
+static PyObject *Text_markSelection( BPy_Text * self, PyObject * args );
+static PyObject *Text_suggest( BPy_Text * self, PyObject * args );
+static PyObject *Text_showDocs( BPy_Text * self, PyObject * args );
/*****************************************************************************/
/* Python BPy_Text methods table: */
@@ -109,12 +124,34 @@ static PyMethodDef BPy_Text_methods[] = {
"(str) - Change Text Object name"},
{"clear", ( PyCFunction ) Text_clear, METH_NOARGS,
"() - Clear Text buffer"},
+ {"reset", ( PyCFunction ) Text_reset, METH_NOARGS,
+ "() - Moves the IO pointer back to the start of the Text buffer for reading"},
+ {"readline", ( PyCFunction ) Text_readline, METH_NOARGS,
+ "() - Reads a line of text from the buffer and returns it incrementing the internal IO pointer."},
{"write", ( PyCFunction ) Text_write, METH_O,
"(line) - Append string 'str' to Text buffer"},
+ {"insert", ( PyCFunction ) Text_insert, METH_O,
+ "(line) - Insert string 'str' to Text buffer at cursor location"},
+ {"delete", ( PyCFunction ) Text_delete, METH_O,
+ "(chars) - Deletes a number of characters to the left (chars<0) or right (chars>0)"},
{"set", ( PyCFunction ) Text_set, METH_VARARGS,
"(name, val) - Set attribute 'name' to value 'val'"},
- {"asLines", ( PyCFunction ) Text_asLines, METH_NOARGS,
- "() - Return text buffer as a list of lines"},
+ {"asLines", ( PyCFunction ) Text_asLines, METH_VARARGS,
+ "(start=0, end=nlines) - Return text buffer as a list of lines between start and end"},
+ {"getCursorPos", ( PyCFunction ) Text_getCursorPos, METH_NOARGS,
+ "() - Return cursor position as (row, col) tuple"},
+ {"setCursorPos", ( PyCFunction ) Text_setCursorPos, METH_VARARGS,
+ "(row, col) - Set the cursor position to (row, col)"},
+ {"getSelectPos", ( PyCFunction ) Text_getSelectPos, METH_NOARGS,
+ "() - Return the selection cursor position as (row, col) tuple"},
+ {"setSelectPos", ( PyCFunction ) Text_setSelectPos, METH_VARARGS,
+ "(row, col) - Set the selection cursor position to (row, col)"},
+ {"markSelection", ( PyCFunction ) Text_markSelection, METH_VARARGS,
+ "(group, (r, g, b), flags) - Places a marker over the current selection. Group: number > 0, flags: TMARK_TEMP, TMARK_EDITALL, etc."},
+ {"suggest", ( PyCFunction ) Text_suggest, METH_VARARGS,
+ "(list, prefix='') - Presents a list of suggestions. List is of strings, or tuples. Tuples must be of the form (name, type) where type is one of 'm', 'v', 'f', 'k' for module, variable, function and keyword respectively or '?' for other types"},
+ {"showDocs", ( PyCFunction ) Text_showDocs, METH_VARARGS,
+ "(docs) - Documentation string"},
{NULL, NULL, 0, NULL}
};
@@ -302,7 +339,7 @@ static PyObject *M_Text_unlink( PyObject * self, PyObject * args )
/*****************************************************************************/
PyObject *Text_Init( void )
{
- PyObject *submodule;
+ PyObject *submodule, *dict;
if( PyType_Ready( &Text_Type ) < 0 )
return NULL;
@@ -310,6 +347,19 @@ PyObject *Text_Init( void )
submodule =
Py_InitModule3( "Blender.Text", M_Text_methods, M_Text_doc );
+ dict = PyModule_GetDict( submodule );
+
+#define EXPP_ADDCONST(x) \
+ EXPP_dict_set_item_str(dict, #x, PyInt_FromLong(x))
+
+ /* So, for example:
+ * EXPP_ADDCONST(LEFTMOUSE) becomes
+ * EXPP_dict_set_item_str(dict, "LEFTMOUSE", PyInt_FromLong(LEFTMOUSE))
+ */
+
+ EXPP_ADDCONST( TMARK_TEMP );
+ EXPP_ADDCONST( TMARK_EDITALL );
+
return ( submodule );
}
@@ -327,6 +377,8 @@ PyObject *Text_CreatePyObject( Text * txt )
"couldn't create BPy_Text PyObject" );
pytxt->text = txt;
+ pytxt->iol = NULL;
+ pytxt->ioc = -1;
return ( PyObject * ) pytxt;
}
@@ -376,23 +428,47 @@ static PyObject *Text_clear( BPy_Text * self)
Py_RETURN_NONE;
}
-static PyObject *Text_set( BPy_Text * self, PyObject * args )
+static PyObject *Text_reset( BPy_Text * self )
{
- int ival;
- char *attr;
+ self->iol = NULL;
+ self->ioc = -1;
- if( !PyArg_ParseTuple( args, "si", &attr, &ival ) )
- return EXPP_ReturnPyObjError( PyExc_TypeError,
- "expected a string and an int as arguments" );
+ Py_RETURN_NONE;
+}
- if( strcmp( "follow_cursor", attr ) == 0 ) {
- if( ival )
- self->text->flags |= EXPP_TEXT_MODE_FOLLOW;
- else
- self->text->flags &= EXPP_TEXT_MODE_FOLLOW;
+static PyObject *Text_readline( BPy_Text * self )
+{
+ PyObject *tmpstr;
+
+ if( !self->text )
+ return EXPP_ReturnPyObjError( PyExc_RuntimeError,
+ "This object isn't linked to a Blender Text Object" );
+
+ /* Reset */
+ if (!self->iol && self->ioc == -1) {
+ self->iol = self->text->lines.first;
+ self->ioc = 0;
}
- Py_RETURN_NONE;
+ if (!self->iol) {
+ PyErr_SetString( PyExc_StopIteration, "End of buffer reached" );
+ return PyString_FromString( "" );
+ }
+
+ if (self->ioc > self->iol->len) {
+ self->iol = NULL;
+ return EXPP_ReturnPyObjError( PyExc_RuntimeError,
+ "Line length exceeded, text may have changed while reading" );
+ }
+
+ tmpstr = PyString_FromString( self->iol->line + self->ioc );
+ if (self->iol->next)
+ PyString_ConcatAndDel( &tmpstr, PyString_FromString("\n") );
+
+ self->iol = self->iol->next;
+ self->ioc = 0;
+
+ return tmpstr;
}
static PyObject *Text_write( BPy_Text * self, PyObject * value )
@@ -413,35 +489,324 @@ static PyObject *Text_write( BPy_Text * self, PyObject * value )
txt_move_eof( self->text, 0 );
txt_set_undostate( oldstate );
+ Text_reset( self );
+
+ Py_RETURN_NONE;
+}
+
+static PyObject *Text_insert( BPy_Text * self, PyObject * value )
+{
+ char *str = PyString_AsString(value);
+ int oldstate;
+
+ if( !self->text )
+ return EXPP_ReturnPyObjError( PyExc_RuntimeError,
+ "This object isn't linked to a Blender Text Object" );
+
+ if( !str )
+ return EXPP_ReturnPyObjError( PyExc_TypeError,
+ "expected string argument" );
+
+ oldstate = txt_get_undostate( );
+ txt_insert_buf( self->text, str );
+ txt_set_undostate( oldstate );
+
+ Text_reset( self );
+
+ Py_RETURN_NONE;
+}
+
+static PyObject *Text_delete( BPy_Text * self, PyObject * value )
+{
+ int num = PyInt_AsLong(value);
+ int oldstate;
+
+ if( !self->text )
+ return EXPP_ReturnPyObjError( PyExc_RuntimeError,
+ "This object isn't linked to a Blender Text Object" );
+
+ if( !num )
+ return EXPP_ReturnPyObjError( PyExc_TypeError,
+ "expected non-zero int argument" );
+
+ oldstate = txt_get_undostate( );
+ while (num<0) {
+ txt_backspace_char(self->text);
+ num++;
+ }
+ while (num>0) {
+ txt_delete_char(self->text);
+ num--;
+ }
+ txt_set_undostate( oldstate );
+
+ Text_reset( self );
+
+ Py_RETURN_NONE;
+}
+
+static PyObject *Text_set( BPy_Text * self, PyObject * args )
+{
+ int ival;
+ char *attr;
+
+ if( !PyArg_ParseTuple( args, "si", &attr, &ival ) )
+ return EXPP_ReturnPyObjError( PyExc_TypeError,
+ "expected a string and an int as arguments" );
+
+ if( strcmp( "follow_cursor", attr ) == 0 ) {
+ if( ival )
+ self->text->flags |= EXPP_TEXT_MODE_FOLLOW;
+ else
+ self->text->flags &= EXPP_TEXT_MODE_FOLLOW;
+ }
+
Py_RETURN_NONE;
}
-static PyObject *Text_asLines( BPy_Text * self )
+static PyObject *Text_asLines( BPy_Text * self, PyObject * args )
{
TextLine *line;
PyObject *list, *tmpstr;
+ int start=0, end=-1, i;
if( !self->text )
return EXPP_ReturnPyObjError( PyExc_RuntimeError,
"This object isn't linked to a Blender Text Object" );
+ if( !PyArg_ParseTuple( args, "|ii", &start, &end ) )
+ return EXPP_ReturnPyObjError( PyExc_TypeError,
+ "expected upto two optional ints as arguments" );
+
+ if (start<0)
+ start=0;
+
line = self->text->lines.first;
+ for (i = 0; i < start && line->next; i++)
+ line= line->next;
+
list = PyList_New( 0 );
if( !list )
return EXPP_ReturnPyObjError( PyExc_MemoryError,
"couldn't create PyList" );
- while( line ) {
+ while( line && (i < end || end == -1) ) {
tmpstr = PyString_FromString( line->line );
PyList_Append( list, tmpstr );
Py_DECREF(tmpstr);
line = line->next;
+ i++;
}
return list;
}
+static PyObject *Text_getCursorPos( BPy_Text * self )
+{
+ Text *text;
+ TextLine *linep;
+ int row, col;
+
+ text = self->text;
+ if( !text )
+ return EXPP_ReturnPyObjError( PyExc_RuntimeError,
+ "This object isn't linked to a Blender Text Object" );
+
+ for (row=0,linep=text->lines.first; linep!=text->curl; linep=linep->next)
+ row++;
+ col= text->curc;
+
+ return Py_BuildValue( "ii", row, col );
+}
+
+static PyObject *Text_setCursorPos( BPy_Text * self, PyObject * args )
+{
+ int row, col;
+ SpaceText *st;
+
+ if (!self->text)
+ return EXPP_ReturnPyObjError(PyExc_RuntimeError,
+ "This object isn't linked to a Blender Text Object");
+
+ if (!PyArg_ParseTuple(args, "ii", &row, &col))
+ return EXPP_ReturnPyObjError(PyExc_TypeError,
+ "expected two ints as arguments.");
+ if (row<0) row=0;
+ if (col<0) col=0;
+
+ txt_move_to(self->text, row, col, 0);
+
+ if (curarea->spacetype == SPACE_TEXT && (st=curarea->spacedata.first))
+ pop_space_text(st);
+
+ Py_RETURN_NONE;
+}
+
+static PyObject *Text_getSelectPos( BPy_Text * self )
+{
+ Text *text;
+ TextLine *linep;
+ int row, col;
+
+ text = self->text;
+ if( !text )
+ return EXPP_ReturnPyObjError( PyExc_RuntimeError,
+ "This object isn't linked to a Blender Text Object" );
+
+ for (row=0,linep=text->lines.first; linep!=text->sell; linep=linep->next)
+ row++;
+ col= text->selc;
+
+ return Py_BuildValue( "ii", row, col );
+}
+
+static PyObject *Text_setSelectPos( BPy_Text * self, PyObject * args )
+{
+ int row, col;
+ SpaceText *st;
+
+ if (!self->text)
+ return EXPP_ReturnPyObjError(PyExc_RuntimeError,
+ "This object isn't linked to a Blender Text Object");
+
+ if (!PyArg_ParseTuple(args, "ii", &row, &col))
+ return EXPP_ReturnPyObjError(PyExc_TypeError,
+ "expected two ints as arguments.");
+ if (row<0) row=0;
+ if (col<0) col=0;
+
+ txt_move_to(self->text, row, col, 1);
+
+ if (curarea->spacetype == SPACE_TEXT && (st=curarea->spacedata.first))
+ pop_space_text(st);
+
+ Py_RETURN_NONE;
+}
+
+static PyObject *Text_markSelection( BPy_Text * self, PyObject * args )
+{
+ int group = 0, flags = 0,r, g, b;
+ Text *text;
+ char color[4];
+
+ text = self->text;
+ if (!text)
+ return EXPP_ReturnPyObjError(PyExc_RuntimeError,
+ "This object isn't linked to a Blender Text Object");
+
+ if (!PyArg_ParseTuple(args, "i(iii)i", &group, &r, &g, &b, &flags))
+ return EXPP_ReturnPyObjError(PyExc_TypeError,
+ "expected int, 3-tuple of ints and int as arguments.");
+
+ if (text->curl != text->sell)
+ return EXPP_ReturnPyObjError(PyExc_RuntimeError,
+ "Cannot mark multi-line selection.");
+
+ color[0] = (char) (r&0xFF);
+ color[1] = (char) (g&0xFF);
+ color[2] = (char) (b&0xFF);
+ color[3] = 255;
+
+ group &= 0xFFFF;
+
+ txt_add_marker(text, text->curl, text->curc, text->selc, color, group, flags);
+
+ Py_RETURN_NONE;
+}
+
+static PyObject *Text_suggest( BPy_Text * self, PyObject * args )
+{
+ PyObject *item = NULL, *tup1 = NULL, *tup2 = NULL;
+ PyObject *list = NULL, *resl = NULL;
+ int list_len, i;
+ char *prefix = NULL, *name, type;
+ SpaceText *st;
+
+ if (!self->text)
+ return EXPP_ReturnPyObjError(PyExc_RuntimeError,
+ "This object isn't linked to a Blender Text Object");
+
+ /* Parse args for a list of strings/tuples */
+ if (!PyArg_ParseTuple(args, "O!|s", &PyList_Type, &list, &prefix))
+ return EXPP_ReturnPyObjError(PyExc_TypeError,
+ "expected list of strings or tuples followed by an optional string");
+
+ if (curarea->spacetype != SPACE_TEXT)
+ return EXPP_ReturnPyObjError(PyExc_RuntimeError,
+ "Active space type is not text");
+
+ st = curarea->spacedata.first;
+ if (!st || !st->text)
+ return EXPP_ReturnPyObjError(PyExc_RuntimeError,
+ "Active text area has no Text object");
+
+ texttool_suggest_clear();
+ texttool_text_set_active(st->text);
+ list_len = PyList_Size(list);
+
+ for (i = 0; i < list_len; i++) {
+ item = PyList_GetItem(list, i);
+
+ if (PyString_Check(item)) {
+ name = PyString_AsString(item);
+ type = '?';
+ } else if (PyTuple_Check(item) && PyTuple_GET_SIZE(item) == 2) {
+ tup1 = PyTuple_GetItem(item, 0);
+ tup2 = PyTuple_GetItem(item, 1);
+ if (PyString_Check(tup1) && PyString_Check(tup2)) {
+ name = PyString_AsString(tup1);
+ type = PyString_AsString(tup2)[0];
+ } else
+ return EXPP_ReturnPyObjError(PyExc_AttributeError,
+ "list must contain tuples of two strings only: (name, type)" );
+ } else
+ return EXPP_ReturnPyObjError(PyExc_AttributeError,
+ "list must contain only individual strings or tuples of size 2" );
+
+ if (!strlen(name) || (type!='m' && type!='v' && type!='f' && type!='k' && type!='?'))
+ return EXPP_ReturnPyObjError(PyExc_AttributeError,
+ "names must be non-empty and types in ['m', 'v', 'f', 'k', '?']" );
+
+ texttool_suggest_add(name, type);
+ }
+ if (!prefix)
+ prefix = "";
+ texttool_suggest_prefix(prefix);
+ scrarea_queue_redraw(curarea);
+
+ Py_RETURN_NONE;
+}
+
+static PyObject *Text_showDocs( BPy_Text * self, PyObject * args )
+{
+ char *docs;
+ SpaceText *st;
+
+ if (!self->text)
+ return EXPP_ReturnPyObjError(PyExc_RuntimeError,
+ "This object isn't linked to a Blender Text Object");
+
+ if (!PyArg_ParseTuple(args, "s", &docs))
+ return EXPP_ReturnPyObjError( PyExc_TypeError,
+ "expected a string as argument" );
+
+ if (curarea->spacetype != SPACE_TEXT)
+ return EXPP_ReturnPyObjError(PyExc_RuntimeError,
+ "Active space type is not text");
+
+ st = curarea->spacedata.first;
+ if (!st || !st->text)
+ return EXPP_ReturnPyObjError(PyExc_RuntimeError,
+ "Active text area has no Text object");
+
+ texttool_text_set_active(st->text);
+ texttool_docs_show(docs);
+ scrarea_queue_redraw(curarea);
+
+ Py_RETURN_NONE;
+}
+
/*****************************************************************************/
/* Function: Text_compare */
/* Description: This is a callback function for the BPy_Text type. It */
diff --git a/source/blender/python/api2_2x/Text.h b/source/blender/python/api2_2x/Text.h
index 0c5e2607f03..73943ddb9cd 100644
--- a/source/blender/python/api2_2x/Text.h
+++ b/source/blender/python/api2_2x/Text.h
@@ -41,6 +41,8 @@ extern PyTypeObject Text_Type;
typedef struct {
PyObject_HEAD
Text * text; /* libdata must be second */
+ TextLine * iol; /* current line being read or NULL if reset */
+ int ioc; /* character offset in line being read */
} BPy_Text;
PyObject *Text_Init( void );
diff --git a/source/blender/python/api2_2x/doc/Draw.py b/source/blender/python/api2_2x/doc/Draw.py
index 18234754315..97e22797902 100644
--- a/source/blender/python/api2_2x/doc/Draw.py
+++ b/source/blender/python/api2_2x/doc/Draw.py
@@ -357,12 +357,14 @@ def PupTreeMenu( menu ):
"""
Create a popup menu tree.
- Each item in the list is a menu item - (str, event), separator - None or submenu - (str, [...]).
+ Each item in the list is: a menu item - (str, event); a separator - None;
+ or submenu - (str, [...]).
- Submenus list uses the same syntax as the menu list.
+ Submenus list uses the same syntax as the menu list. To add a title to the
+ main menu, end the first entry str with '%t' - the event is ignored.
Example::
- result = Draw.PupTreeMenu( [ ("Menu Item 1", 10), ("Menu Item 2", 12), ("SubMenu", [("Menu Item 3", 100), ("MenuItem4", 101) ] ) ] )
+ result = Draw.PupTreeMenu( [ ("Title%t", 0), ("Menu Item 1", 10), ("Menu Item 2", 12), ("SubMenu", [("Menu Item 3", 100), ("MenuItem4", 101) ] ) ] )
@type menu: string
@param menu: A menu list
diff --git a/source/blender/python/api2_2x/doc/Text.py b/source/blender/python/api2_2x/doc/Text.py
index 98ecb664b71..022205573aa 100644
--- a/source/blender/python/api2_2x/doc/Text.py
+++ b/source/blender/python/api2_2x/doc/Text.py
@@ -100,6 +100,19 @@ class Text:
Clear this Text object: its buffer becomes empty.
"""
+ def reset():
+ """
+ Reset the read IO pointer to the start of the buffer.
+ """
+
+ def readline():
+ """
+ Reads a line of text from the buffer from the current IO pointer
+ position to the end of the line. If the text has changed since the last
+ read, reset() *must* be called.
+ @rtype: string
+ """
+
def set(attribute, value):
"""
Set this Text's attributes.
@@ -118,12 +131,94 @@ class Text:
@param data: The string to append to the text buffer.
"""
- def asLines():
+ def insert(data):
"""
- Retrieve the contents of this Text buffer as a list of strings.
+ Inserts a string into this Text buffer at the cursor.
+ @type data: string
+ @param data: The string to insert into the text buffer.
+ """
+
+ def asLines(start=0, end=-1):
+ """
+ Retrieve the contents of this Text buffer as a list of strings between
+ the start and end lines specified. If end < 0 all lines from start will
+ be included.
+ @type start int
+ @param start: Optional index of first line of the span to return
+ @type end int
+ @param end: Optional index of the line to which the span is taken or
+ -1 to include all lines from start
@rtype: list of strings
- @return: A list of strings, one for each line in the buffer
+ @return: A list of strings, one for each line in the buffer between
+ start and end.
+ """
+
+ def getCursorPos():
+ """
+ Retrieve the position of the cursor in this Text buffer.
+ @rtype: (int, int)
+ @return: A pair (row, col) indexing the line and character of the
+ cursor.
+ """
+
+ def setCursorPos(row, col):
+ """
+ Set the position of the cursor in this Text buffer. Any selection will
+ be cleared. Use setSelectPos to extend a selection from the point
+ specified here.
+ @type row: int
+ @param row: The index of the line in which to position the cursor.
+ @type col: int
+ @param col: The index of the character within the line to position the
+ cursor.
+ """
+
+ def getSelectPos():
+ """
+ Retrieve the position of the selection cursor in this Text buffer.
+ @rtype: (int, int)
+ @return: A pair (row, col) indexing the line and character of the
+ selection cursor.
+ """
+
+ def setSelectPos(row, col):
+ """
+ Set the position of the selection cursor in this Text buffer. This
+ method should be called after setCursorPos to extend the selection to
+ the specified point.
+ @type row: int
+ @param row: The index of the line in which to position the cursor.
+ @type col: int
+ @param col: The index of the character within the line to position the
+ cursor.
+ """
+
+ def suggest(list, prefix=''):
+ """
+ Suggest a list of names. If list is a list of tuples (name, type) the
+ list will be formatted to syntax-highlight each entry type. Types must
+ be strings in the list ['m', 'f', 'v', 'k', '?']. It is recommended that
+ the list be sorted, case-insensitively by name.
+
+ @type list: list of tuples or strings
+ @param list: List of pair-tuples of the form (name, type) where name is
+ the suggested name and type is one of 'm' (module or class), 'f'
+ (function or method), 'v' (variable), 'k' (keyword), '?' (other).
+ Lists of plain strings are also accepted where the type is always
+ '?'.
+ @type prefix: string
+ @param prefix: The optional prefix used to limit what is suggested from
+ the list. This is usually whatever precedes the cursor so that
+ backspace will update it.
+ """
+
+ def showDocs(docs):
+ """
+ Displays a word-wrapped message box containing the specified
+ documentation when this Text object is visible.
+ @type docs: string
+ @param docs: The documentation string to display.
"""
import id_generics
-Text.__doc__ += id_generics.attributes \ No newline at end of file
+Text.__doc__ += id_generics.attributes