~diresu/blender/blender-command-port

« back to all changes in this revision

Viewing changes to source/blender/makesdna/DNA_text_types.h

  • Committer: theeth
  • Date: 2008-10-14 16:52:04 UTC
  • Revision ID: vcs-imports@canonical.com-20081014165204-r32w2gm6s0osvdhn
copy back trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * blenlib/DNA_text_types.h (mar-2001 nzc)
 
3
 *      
 
4
 * $Id: DNA_text_types.h 16330 2008-09-01 14:04:22Z quorn $ 
 
5
 *
 
6
 * ***** BEGIN GPL LICENSE BLOCK *****
 
7
 *
 
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.
 
12
 *
 
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.
 
17
 *
 
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.
 
21
 *
 
22
 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
 
23
 * All rights reserved.
 
24
 *
 
25
 * The Original Code is: all of this file.
 
26
 *
 
27
 * Contributor(s): none yet.
 
28
 *
 
29
 * ***** END GPL LICENSE BLOCK *****
 
30
 */
 
31
#ifndef DNA_TEXT_TYPES_H
 
32
#define DNA_TEXT_TYPES_H
 
33
 
 
34
#include "DNA_listBase.h"
 
35
#include "DNA_ID.h"
 
36
 
 
37
typedef struct TextLine {
 
38
        struct TextLine *next, *prev;
 
39
 
 
40
        char *line;
 
41
        char *format; /* may be NULL if syntax is off or not yet formatted */
 
42
        int len, blen; /* blen unused */
 
43
} TextLine;
 
44
 
 
45
typedef struct TextMarker {
 
46
        struct TextMarker *next, *prev;
 
47
 
 
48
        int lineno, start, end, pad1; /* line number and start/end character indices */
 
49
        
 
50
        int group, flags; /* see BKE_text.h for flag defines */
 
51
        char color[4], pad[4]; /* draw color of the marker */
 
52
} TextMarker;
 
53
 
 
54
typedef struct Text {
 
55
        ID id;
 
56
        
 
57
        char *name;
 
58
 
 
59
        int flags, nlines;
 
60
        
 
61
        ListBase lines;
 
62
        TextLine *curl, *sell;
 
63
        int curc, selc;
 
64
        ListBase markers;
 
65
        
 
66
        char *undo_buf;
 
67
        int undo_pos, undo_len;
 
68
        
 
69
        void *compiled;
 
70
        double mtime;
 
71
} Text;
 
72
 
 
73
 
 
74
#define TXT_OFFSET 35
 
75
#define TXT_TABSIZE     4
 
76
#define TXT_INIT_UNDO 1024
 
77
#define TXT_MAX_UNDO    (TXT_INIT_UNDO*TXT_INIT_UNDO)
 
78
 
 
79
/* text flags */
 
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) */
 
87
 
 
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)*/
 
95
 
 
96
#endif