1 /*
2    Copyright (C) 2002 Kai Sterker <kai.sterker@gmail.com>
3    Part of the Adonthell Project  <http://adonthell.nongnu.org>
4 
5    Dlgedit is free software; you can redistribute it and/or modify
6    it under the terms of the GNU General Public License as published by
7    the Free Software Foundation; either version 2 of the License, or
8    (at your option) any later version.
9 
10    Dlgedit is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13    GNU General Public License for more details.
14 
15    You should have received a copy of the GNU General Public License
16    along with Dlgedit.  If not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 /**
20  * @file dlg_types.h
21  *
22  * @author Kai Sterker
23  * @brief Typedefs and Enumerations used throughout dlgedit
24  */
25 
26 #ifndef DLG_TYPES_H
27 #define DLG_TYPES_H
28 
29 /**
30  * The type of a given DlgNode.
31  */
32 enum node_type
33 {
34     PLAYER          = 1,
35     NPC             = 2,
36     LINK            = 3,
37     MOVER           = 4,
38     NARRATOR        = 5,
39     MODULE          = 6
40 };
41 
42 /**
43  * Specifies which node to retrieve.
44  */
45 enum query_type
46 {
47     FIRST           = 0,
48     NEXT            = 1,
49     PREV            = 2,
50     LAST            = 3,
51     CURRENT         = 4
52 };
53 
54 /**
55  * Defines the state of an individual node, but also that of the whole program.
56  */
57 enum mode_type
58 {
59     IDLE            = 0,
60     NODE_SELECTED   = 1,
61     NODE_HILIGHTED  = 2,
62     NODE_DRAGGED    = 3,
63     L10N_PREVIEW    = 4,
64     NUM_MODES       = 5
65 };
66 
67 /**
68  * A few predefined colors for drawing operations
69  */
70 enum
71 {
72     GC_BLACK        = 0,
73     GC_GREY         = 1,
74     GC_WHITE        = 2,
75     GC_DARK_RED     = 3,
76     GC_RED          = 4,
77     GC_DARK_GREEN   = 5,
78     GC_GREEN        = 6,
79     GC_ORANGE       = 7,
80     GC_DARK_BLUE    = 8,
81     GC_BLUE         = 9,
82     MAX_GC          = 10
83 };
84 
85 /**
86  * Talking names for the different file menu items.
87  */
88 enum menu_item
89 {
90     SAVE            = 0,
91     SAVE_AS         = 1,
92     CLOSE           = 2,
93     SETTINGS        = 3,
94     FUNCTIONS       = 4,
95     COMPILE         = 5,
96     PREVIEW         = 6,
97     RUN             = 7,
98     REVERT          = 8,
99     MAX_ITEM        = 9
100 };
101 
102 /**
103  * Defines for the various parts of a dialogue source file.
104  */
105 enum
106 {
107     LOAD_CIRCLE     = 1,
108     LOAD_ARROW      = 2,
109     LOAD_END        = 3,
110     LOAD_TYPE       = 4,
111     LOAD_PREV       = 5,
112     LOAD_NEXT       = 6,
113     LOAD_LINK       = 7,
114     LOAD_POS        = 8,
115     LOAD_NOTE       = 9,
116     LOAD_TEXT       = 10,
117     LOAD_COND       = 11,
118     LOAD_VARS       = 12,
119     LOAD_FUNC       = 13,
120     LOAD_ACT        = 14,
121     LOAD_NAME       = 15,
122     LOAD_RACE       = 16,
123     LOAD_GENDER     = 17,
124     LOAD_NPC        = 18,
125     LOAD_STR        = 19,
126     LOAD_NUM        = 20,
127     LOAD_IMPORTS    = 21,
128     LOAD_CTOR       = 22,
129     LOAD_DTOR       = 23,
130     LOAD_PROJECT    = 24,
131     LOAD_LOOP       = 25,
132     LOAD_FILE       = 26,
133     LOAD_BASE_DIR   = 27,
134     LOAD_MODULE     = 28,
135     LOAD_ID         = 29,
136     LOAD_UNKNOWN    = 30
137 };
138 
139 /**
140  * The size of a DlgCircle.
141  */
142 #define CIRCLE_DIAMETER 20
143 #define CIRCLE_RADIUS 10
144 
145 /**
146  * File extension of dialogue source files.
147  */
148 #define FILE_EXT ".adlg"
149 
150 #endif // DLG_TYPES_H
151