Blender V5.3
DNA_text_types.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
10
11#pragma once
12
13#include "BLI_enum_flags.hh"
14
15#include "DNA_ID.h"
16#include "DNA_listBase.h"
17
18namespace blender {
19
21enum eText_Flag : int {
23 TXT_ISDIRTY = 1 << 0,
25 TXT_ISMEM = 1 << 2,
27 TXT_ISEXT = 1 << 3,
29 TXT_ISSCRIPT = 1 << 4,
30
31 TXT_FLAG_UNUSED_8 = 1 << 8, /* cleared */
32 TXT_FLAG_UNUSED_9 = 1 << 9, /* cleared */
33
36};
38
39struct TextLine {
40 struct TextLine *next = nullptr, *prev = nullptr;
41
42 char *line = nullptr;
44 char *format = nullptr;
45 int len = 0;
46 char _pad0[4] = {};
47};
48
49struct Text {
50#ifdef __cplusplus
52 static constexpr ID_Type id_type = ID_TXT;
53#endif
54
56
57 void *_pad1 = nullptr;
58
65 char *filepath = nullptr;
66
70 void *compiled = nullptr;
71
73 char _pad0[4] = {};
74
75 ListBaseT<TextLine> lines = {nullptr, nullptr};
76 TextLine *curl = nullptr, *sell = nullptr;
77 int curc = 0, selc = 0;
78
79 double mtime = 0;
80};
81
82#define TXT_TABSIZE 4
83
84} // namespace blender
#define ENUM_OPERATORS(_enum_type)
ID and Library types, which are fundamental for SDNA.
These structs are the foundation for all linked lists in the library system.
BMesh Iterators.
@ TXT_FLAG_UNUSED_9
@ TXT_FLAG_UNUSED_8
struct TextLine * prev
struct TextLine * next
eText_Flag flags
TextLine * sell
TextLine * curl
ListBaseT< TextLine > lines