Blender V4.3
bpy_rna_text.cc File Reference
#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)
 

Detailed Description

This file extends the text editor with C/Python API methods and attributes.

Definition in file bpy_rna_text.cc.

Macro Definition Documentation

◆ PY_SSIZE_T_CLEAN

#define PY_SSIZE_T_CLEAN

Definition at line 11 of file bpy_rna_text.cc.

Function Documentation

◆ bpy_rna_region_as_string()

static PyObject * bpy_rna_region_as_string ( PyObject * self,
PyObject * args,
PyObject * kwds )
static

◆ bpy_rna_region_from_string()

static PyObject * bpy_rna_region_from_string ( PyObject * self,
PyObject * args,
PyObject * kwds )
static

◆ PyDoc_STRVAR() [1/2]

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() [2/2]

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] )

Variable Documentation

◆ BPY_rna_region_as_string_method_def

PyMethodDef BPY_rna_region_as_string_method_def
Initial value:
= {
"region_as_string",
METH_VARARGS | METH_KEYWORDS,
bpy_rna_region_as_string_doc,
}
static PyObject * bpy_rna_region_as_string(PyObject *self, PyObject *args, PyObject *kwds)

Definition at line 103 of file bpy_rna_text.cc.

Referenced by BPY_rna_types_extend_capi().

◆ BPY_rna_region_from_string_method_def

PyMethodDef BPY_rna_region_from_string_method_def
Initial value:
= {
"region_from_string",
METH_VARARGS | METH_KEYWORDS,
bpy_rna_region_from_string_doc,
}
static PyObject * bpy_rna_region_from_string(PyObject *self, PyObject *args, PyObject *kwds)

Definition at line 178 of file bpy_rna_text.cc.

Referenced by BPY_rna_types_extend_capi().