2
* blenlib/DNA_text_types.h (mar-2001 nzc)
4
* $Id: DNA_text_types.h 16330 2008-09-01 14:04:22Z quorn $
6
* ***** BEGIN GPL LICENSE BLOCK *****
8
* This program is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU General Public License
10
* as published by the Free Software Foundation; either version 2
11
* of the License, or (at your option) any later version.
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
18
* You should have received a copy of the GNU General Public License
19
* along with this program; if not, write to the Free Software Foundation,
20
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
23
* All rights reserved.
25
* The Original Code is: all of this file.
27
* Contributor(s): none yet.
29
* ***** END GPL LICENSE BLOCK *****
31
#ifndef DNA_TEXT_TYPES_H
32
#define DNA_TEXT_TYPES_H
34
#include "DNA_listBase.h"
37
typedef struct TextLine {
38
struct TextLine *next, *prev;
41
char *format; /* may be NULL if syntax is off or not yet formatted */
42
int len, blen; /* blen unused */
45
typedef struct TextMarker {
46
struct TextMarker *next, *prev;
48
int lineno, start, end, pad1; /* line number and start/end character indices */
50
int group, flags; /* see BKE_text.h for flag defines */
51
char color[4], pad[4]; /* draw color of the marker */
62
TextLine *curl, *sell;
67
int undo_pos, undo_len;
76
#define TXT_INIT_UNDO 1024
77
#define TXT_MAX_UNDO (TXT_INIT_UNDO*TXT_INIT_UNDO)
80
#define TXT_ISDIRTY 0x0001
81
#define TXT_ISTMP 0x0002
82
#define TXT_ISMEM 0x0004
83
#define TXT_ISEXT 0x0008
84
#define TXT_ISSCRIPT 0x0010 /* used by space handler scriptlinks */
85
#define TXT_READONLY 0x0100
86
#define TXT_FOLLOW 0x0200 /* always follow cursor (console) */
88
/* format continuation flags */
89
#define TXT_NOCONT 0x00 /* no continuation */
90
#define TXT_SNGQUOTSTR 0x01 /* single quotes */
91
#define TXT_DBLQUOTSTR 0x02 /* double quotes */
92
#define TXT_TRISTR 0x04 /* triplets of quotes: """ or ''' */
93
#define TXT_SNGTRISTR 0x05 /*(TXT_TRISTR | TXT_SNGQUOTSTR)*/
94
#define TXT_DBLTRISTR 0x06 /*(TXT_TRISTR | TXT_DBLQUOTSTR)*/