1 /*
2  *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
3  *
4  *  This program is free software; you can redistribute it and/or modify
5  *  it under the terms of the GNU General Public License as published by
6  *  the Free Software Foundation; either version 2 of the License, or
7  *  (at your option) any later version.
8  *
9  *  This program is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *  GNU Library General Public License for more details.
13  *
14  *  You should have received a copy of the GNU General Public License
15  *  along with this program; if not, write to the Free Software
16  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  */
18 
19 #ifndef	EDITORS_H
20 #define	EDITORS_H		1
21 
22 #include "common.h"
23 
24 #define CMND_NUM_FCOLS 6
25 #define CMND_NUM_ICOLS 4
26 #define GEOM_NUM_FCOLS 7
27 #define GEOM_NUM_ICOLS 2
28 
29 #define NEXT		TRUE
30 #define PREVIOUS	FALSE
31 
32 /* Editor actions that imply saving */
33 enum SAVE_ACTION
34 {
35   EDITOR_SAVE = 64,
36   EDITOR_NEW,
37   EDITOR_EDIT,
38   EDITOR_APPLY
39 };
40 
41 enum EDITOR_FUNC
42 {
43   /* General editor function actions */
44   EDITOR_DATA = 0,
45   EDITOR_TAGNUM,
46   EDITOR_CANCEL,
47   EDITOR_SEGPC,
48   EDITOR_RDBUTTON,
49   EDITOR_LOAD,
50 
51   /* Wire editor function actions */
52   WIRE_EDITOR_WLEN,
53   WIRE_EDITOR_RLEN,
54   WIRE_EDITOR_DIAN,
55   WIRE_EDITOR_RDIA,
56   WIRE_EDITOR_TAPR,
57 
58   /* Helix editor function actions */
59   HELIX_EDITOR_NTURN,
60   HELIX_EDITOR_LH,
61   HELIX_EDITOR_RH,
62   HELIX_EDITOR_LINKALL,
63   HELIX_EDITOR_LINKZO,
64   HELIX_EDITOR_LINKZHL,
65 
66   /* Patch editor actions */
67   PATCH_EDITOR_ARBT,
68   PATCH_EDITOR_RECT,
69   PATCH_EDITOR_TRIA,
70   PATCH_EDITOR_QUAD,
71   PATCH_EDITOR_SURF,
72   PATCH_EDITOR_SCCD,
73 
74   /* Reflect editor actions */
75   REFLECT_EDITOR_TOGGLE,
76 
77   /* Frequency editor actions */
78   FREQUENCY_EDITOR_FSTEP,
79 
80   /* General command function actions */
81   COMMAND_RDBUTTON,
82   COMMAND_CKBUTTON,
83 
84   /* Nearfield check buttons toggled */
85   NEARFIELD_NE_CKBUTTON,
86   NEARFIELD_NH_CKBUTTON
87 };
88 
89 /* Comment "card" columns */
90 enum CARDS
91 {
92   CMNT_COL_NAME = 0,
93   CMNT_COL_COMMENT,
94   CMNT_NUM_COLS
95 };
96 
97 /* Editor spinbuttons corresponding to int list columns */
98 enum SPIN_COL_I
99 {
100   SPIN_COL_I1 = 0,
101   SPIN_COL_I2,
102   SPIN_COL_I3,
103   SPIN_COL_I4
104 };
105 
106 /* Editor spinbuttons corresponding to float list columns */
107 enum SPIN_COL_F
108 {
109   SPIN_COL_F1 = 0,
110   SPIN_COL_F2,
111   SPIN_COL_F3,
112   SPIN_COL_F4,
113   SPIN_COL_F5,
114   SPIN_COL_F6,
115   SPIN_COL_F7
116 };
117 
118 /* Geometry data "card" columns */
119 enum GEOM_CARD
120 {
121   GEOM_COL_NAME = 0,
122   GEOM_COL_I1,
123   GEOM_COL_I2,
124   GEOM_COL_F1,
125   GEOM_COL_F2,
126   GEOM_COL_F3,
127   GEOM_COL_F4,
128   GEOM_COL_F5,
129   GEOM_COL_F6,
130   GEOM_COL_F7,
131   GEOM_NUM_COLS
132 };
133 
134 /* Control/Command "card" columns */
135 enum CMND_CARD
136 {
137   CMND_COL_NAME = 0,
138   CMND_COL_I1,
139   CMND_COL_I2,
140   CMND_COL_I3,
141   CMND_COL_I4,
142   CMND_COL_F1,
143   CMND_COL_F2,
144   CMND_COL_F3,
145   CMND_COL_F4,
146   CMND_COL_F5,
147   CMND_COL_F6,
148   CMND_NUM_COLS
149 };
150 
151 /* F1-F7 columns of GW & GC cards */
152 enum GW_COLS
153 {
154   WIRE_X1 = 0,
155   WIRE_Y1,
156   WIRE_Z1,
157   WIRE_X2,
158   WIRE_Y2,
159   WIRE_Z2,
160   WIRE_DIA,
161   WIRE_RLEN,
162   WIRE_DIA1,
163   WIRE_DIAN,
164   WIRE_RDIA,
165   WIRE_PCL,
166   WIRE_LEN,
167   WIRE_RES
168 };
169 
170 /* Patch types */
171 enum PATCH_TYPE
172 {
173   PATCH_ARBT = 0,
174   PATCH_RECT,
175   PATCH_TRIA,
176   PATCH_QUAD,
177   PATCH_SURF
178 };
179 
180 /* F1-F6 columns of SP & SC cards */
181 enum SP_COLS
182 {
183   PATCH_X1 = 0,
184   PATCH_Y1,
185   PATCH_Z1,
186   PATCH_X2,
187   PATCH_Y2,
188   PATCH_Z2,
189   UNUSED_F1,
190   PATCH_X3,
191   PATCH_Y3,
192   PATCH_Z3,
193   PATCH_X4,
194   PATCH_Y4,
195   PATCH_Z4,
196   UNUSED_F2
197 };
198 
199 /* GA card float data */
200 enum GA_CARD
201 {
202   ARC_RAD = 0,
203   ARC_END1,
204   ARC_END2,
205   ARC_DIA,
206   ARC_PCL,
207   ARC_RES
208 };
209 
210 /* GH card float data */
211 enum GH_CARD
212 {
213   HELIX_TSPACE = 0,
214   HELIX_LEN,
215   HELIX_RXZO,
216   HELIX_RYZO,
217   HELIX_RXZHL,
218   HELIX_RYZHL,
219   HELIX_DIA,
220   HELIX_PCL,
221   HELIX_NTURN,
222   HELIX_RES
223 };
224 
225 #endif
226 
227