Blender
V3.3
|
#include <Python.h>
#include "DNA_text_types.h"
#include "MEM_guardedalloc.h"
#include "WM_api.h"
#include "BKE_text.h"
#include "bpy_capi_utils.h"
#include "bpy_rna.h"
#include "bpy_rna_text.h"
Go to the source code of this file.
Classes | |
struct | TextRegion |
Macros | |
#define | PY_SSIZE_T_CLEAN |
Typedefs | |
Data structures. | |
typedef struct TextRegion | TextRegion |
Text Editor Get / Set region text API | |
PyMethodDef | BPY_rna_region_as_string_method_def |
PyMethodDef | BPY_rna_region_from_string_method_def |
PyDoc_STRVAR (bpy_rna_region_as_string_doc, ".. method:: region_as_string(range=None)\n" "\n" " :arg range: The region of text to be returned, " "defaulting to the selection when no range is passed.\n" " Each int pair represents a line and column: " "((start_line, start_column), (end_line, end_column))\n" " The values match Python's slicing logic " "(negative values count backwards from the end, the end value is not inclusive).\n" " :type range: Two pairs of ints\n" " :return: The specified region as a string.\n" " :rtype: str.\n") | |
static PyObject * | bpy_rna_region_as_string (PyObject *self, PyObject *args, PyObject *kwds) |
PyDoc_STRVAR (bpy_rna_region_from_string_doc, ".. method:: region_from_string(body, range=None)\n" "\n" " :arg body: The text to be inserted.\n" " :type body: str\n" " :arg range: The region of text to be returned, " "defaulting to the selection when no range is passed.\n" " Each int pair represents a line and column: " "((start_line, start_column), (end_line, end_column))\n" " The values match Python's slicing logic " "(negative values count backwards from the end, the end value is not inclusive).\n" " :type range: Two pairs of ints\n") | |
static PyObject * | bpy_rna_region_from_string (PyObject *self, PyObject *args, PyObject *kwds) |
This file extends the text editor with C/Python API methods and attributes.
Definition in file bpy_rna_text.c.
#define PY_SSIZE_T_CLEAN |
Definition at line 9 of file bpy_rna_text.c.
typedef struct TextRegion TextRegion |
Struct representing a selection which is extracted from Python arguments.
|
static |
Definition at line 58 of file bpy_rna_text.c.
References TextRegion::curc, TextRegion::curl, PointerRNA::data, MEM_freeN, NULL, BPy_StructRNA::ptr, TextRegion::selc, TextRegion::sell, txt_has_sel(), txt_sel_set(), and txt_sel_to_buf().
|
static |
Definition at line 112 of file bpy_rna_text.c.
References TextRegion::curc, TextRegion::curl, PointerRNA::data, NA_EDITED, NC_TEXT, NULL, BPy_StructRNA::ptr, TextRegion::selc, TextRegion::sell, txt_insert_buf(), txt_sel_set(), and WM_main_add_notifier().
PyDoc_STRVAR | ( | bpy_rna_region_as_string_doc | , |
".. method:: region_as_string(range=None)\n" "\n" " :arg range: The region of text to be | returned, | ||
" "defaulting to the selection when no range is passed.\n" " Each int pair represents a line and column:" "((start_line, start_column),(end_line, end_column))\n" " The values match Python 's slicing logic " "(negative values count backwards from the end, the end value is not inclusive).\n" " :type range:Two pairs of ints\n" " :return:The specified region as a string.\n" " :rtype:str.\n" | |||
) |
PyDoc_STRVAR | ( | bpy_rna_region_from_string_doc | , |
".. method:: region_from_string(body, range=None)\n" "\n" " :arg body: The text to be inserted.\n" " :type body: str\n" " :arg range: The region of text to be | returned, | ||
" "defaulting to the selection when no range is passed.\n" " Each int pair represents a line and column:" "((start_line, start_column),(end_line, end_column))\n" " The values match Python 's slicing logic " "(negative values count backwards from the end, the end value is not inclusive).\n" " :type range:Two pairs of ints\n" | |||
) |
PyMethodDef BPY_rna_region_as_string_method_def |
Definition at line 93 of file bpy_rna_text.c.
Referenced by BPY_rna_types_extend_capi().
PyMethodDef BPY_rna_region_from_string_method_def |
Definition at line 155 of file bpy_rna_text.c.
Referenced by BPY_rna_types_extend_capi().