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/doc/Text.py')
-rw-r--r--source/blender/python/api2_2x/doc/Text.py103
1 files changed, 99 insertions, 4 deletions
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