|
Blender V4.3
|
#include <Python.h>#include "MEM_guardedalloc.h"#include "WM_api.hh"#include "BKE_text.h"#include "../generic/python_compat.hh"#include "bpy_rna.hh"#include "bpy_rna_text.hh"Go to the source code of this file.
Classes | |
| struct | TextRegion |
Macros | |
| #define | PY_SSIZE_T_CLEAN |
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: tuple[tuple[int, int], tuple[int, int]]\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: tuple[tuple[int, int], tuple[int, int]]\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.cc.
| #define PY_SSIZE_T_CLEAN |
Definition at line 11 of file bpy_rna_text.cc.
|
static |
Definition at line 61 of file bpy_rna_text.cc.
References PointerRNA::data, MEM_freeN(), BPy_StructRNA::ptr, PY_ARG_PARSER_HEAD_COMPAT, self, txt_has_sel(), txt_sel_set(), and txt_sel_to_buf().
|
static |
Definition at line 128 of file bpy_rna_text.cc.
References PointerRNA::data, NA_EDITED, NC_TEXT, BPy_StructRNA::ptr, PY_ARG_PARSER_HEAD_COMPAT, self, 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:tuple | [tuple[int, int], | ||
| tuple]\n" " :return:The specified region as a string.\n" " :rtype:str.\n" | [int, int] ) |
| 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:tuple | [tuple[int, int], | ||
| tuple]\n" | [int, int] ) |
| PyMethodDef BPY_rna_region_as_string_method_def |
Definition at line 103 of file bpy_rna_text.cc.
Referenced by BPY_rna_types_extend_capi().
| PyMethodDef BPY_rna_region_from_string_method_def |
Definition at line 178 of file bpy_rna_text.cc.
Referenced by BPY_rna_types_extend_capi().