1 // ----------------------------------------------------------------------------
2 // Copyright (C) 2014
3 //              David Freese, W1HKJ
4 //
5 // This file is part of flmsg
6 //
7 // flrig is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation; either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // flrig is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 // ----------------------------------------------------------------------------
20 
21 #include <FL/Fl_Hold_Browser.H>
22 
23 #include "gettext.h"
24 #include "status.h"
25 #include "util.h"
26 
27 #include "flmsg_dialog.h"
28 #include "flmsg.h"
29 #include "fileselect.h"
30 
31 Fl_Group	*tab_mars_ineei = (Fl_Group *)0;
32 Fl_Tabs		*tab_mars_ineei_type = (Fl_Tabs *)0;
33 
34 //----------------------------------------------------------------------
35 
36 Fl_Group	*tab_mars_ineei_1 = (Fl_Group *)0;
37 
38 Fl_Input2	*txt_mars_ineei_DE = (Fl_Input2 *)0;
39 Fl_Input2	*txt_mars_ineei_NBR = (Fl_Input2 *)0;
40 Fl_ListBox	*sel_mars_ineei_PREC = (Fl_ListBox *)0;
41 Fl_Input2	*txt_mars_ineei_DTG = (Fl_Input2 *)0;
42 Fl_Input2	*txt_mars_ineei_FMNAME = (Fl_Input2 *)0;
43 Fl_Input2	*txt_mars_ineei_FMCALL = (Fl_Input2 *)0;
44 Fl_Input2	*txt_mars_ineei_FMSTATE = (Fl_Input2 *)0;
45 Fl_Input2	*txt_mars_ineei_TOPOS = (Fl_Input2 *)0;
46 Fl_Input2	*txt_mars_ineei_TOCALL = (Fl_Input2 *)0;
47 Fl_Input2	*txt_mars_ineei_TOSTATE = (Fl_Input2 *)0;
48 Fl_Input2	*txt_mars_ineei_INFO1POS = (Fl_Input2 *)0;
49 Fl_Input2	*txt_mars_ineei_INFO1CALL = (Fl_Input2 *)0;
50 Fl_Input2	*txt_mars_ineei_INFO1STATE = (Fl_Input2 *)0;
51 Fl_Input2	*txt_mars_ineei_INFO2POS = (Fl_Input2 *)0;
52 Fl_Input2	*txt_mars_ineei_INFO2CALL = (Fl_Input2 *)0;
53 Fl_Input2	*txt_mars_ineei_INFO2STATE = (Fl_Input2 *)0;
54 Fl_Input2	*txt_mars_ineei_INFO3POS = (Fl_Input2 *)0;
55 Fl_Input2	*txt_mars_ineei_INFO3CALL = (Fl_Input2 *)0;
56 Fl_Input2	*txt_mars_ineei_INFO3STATE = (Fl_Input2 *)0;
57 Fl_Input2	*txt_mars_ineei_INFO4POS = (Fl_Input2 *)0;
58 Fl_Input2	*txt_mars_ineei_INFO4CALL = (Fl_Input2 *)0;
59 Fl_Input2	*txt_mars_ineei_INFO4STATE = (Fl_Input2 *)0;
60 Fl_Input2	*txt_mars_ineei_INFO5POS = (Fl_Input2 *)0;
61 Fl_Input2	*txt_mars_ineei_INFO5CALL = (Fl_Input2 *)0;
62 Fl_Input2	*txt_mars_ineei_INFO5STATE = (Fl_Input2 *)0;
63 Fl_Input2	*txt_mars_ineei_INFO6POS = (Fl_Input2 *)0;
64 Fl_Input2	*txt_mars_ineei_INFO6CALL = (Fl_Input2 *)0;
65 Fl_Input2	*txt_mars_ineei_INFO6STATE = (Fl_Input2 *)0;
66 Fl_Input2	*txt_mars_ineei_INFO7POS = (Fl_Input2 *)0;
67 Fl_Input2	*txt_mars_ineei_INFO7CALL = (Fl_Input2 *)0;
68 Fl_Input2	*txt_mars_ineei_INFO7STATE = (Fl_Input2 *)0;
69 Fl_Input2	*txt_mars_ineei_INFO8POS = (Fl_Input2 *)0;
70 Fl_Input2	*txt_mars_ineei_INFO8CALL = (Fl_Input2 *)0;
71 Fl_Input2	*txt_mars_ineei_INFO8STATE = (Fl_Input2 *)0;
72 Fl_Input2	*txt_mars_ineei_INFO9POS = (Fl_Input2 *)0;
73 Fl_Input2	*txt_mars_ineei_INFO9CALL = (Fl_Input2 *)0;
74 Fl_Input2	*txt_mars_ineei_INFO9STATE = (Fl_Input2 *)0;
75 Fl_Input2	*txt_mars_ineei_INFO10POS = (Fl_Input2 *)0;
76 Fl_Input2	*txt_mars_ineei_INFO10CALL = (Fl_Input2 *)0;
77 Fl_Input2	*txt_mars_ineei_INFO10STATE = (Fl_Input2 *)0;
78 Fl_Input2	*txt_mars_ineei_INCIDENT = (Fl_Input2 *)0;
79 
80 Fl_Button	*btn_mars_ineei_DE = (Fl_Button*)0;
81 Fl_Button	*btn_mars_ineei_DTG = (Fl_Button*)0;
82 Fl_Button	*btn_mars_ineei_pick_fm = (Fl_Button*)0;
83 Fl_Button	*btn_mars_ineei_pick_to = (Fl_Button*)0;
84 Fl_Button	*btn_mars_ineei_pick_INFO1 = (Fl_Button*)0;
85 Fl_Button	*btn_mars_ineei_pick_INFO2 = (Fl_Button*)0;
86 Fl_Button	*btn_mars_ineei_pick_INFO3 = (Fl_Button*)0;
87 Fl_Button	*btn_mars_ineei_pick_INFO4 = (Fl_Button*)0;
88 Fl_Button	*btn_mars_ineei_pick_INFO5 = (Fl_Button*)0;
89 Fl_Button	*btn_mars_ineei_pick_INFO6 = (Fl_Button*)0;
90 Fl_Button	*btn_mars_ineei_pick_INFO7 = (Fl_Button*)0;
91 Fl_Button	*btn_mars_ineei_pick_INFO8 = (Fl_Button*)0;
92 Fl_Button	*btn_mars_ineei_pick_INFO9 = (Fl_Button*)0;
93 Fl_Button	*btn_mars_ineei_pick_INFO10 = (Fl_Button*)0;
94 
95 //----------------------------------------------------------------------
96 
97 Fl_Group	*tab_mars_ineei_2 = (Fl_Group *)0;
98 
99 Fl_Input2	*txt_mars_ineei_REF = (Fl_Input2 *)0;
100 Fl_Input2	*txt_mars_ineei_STATE = (Fl_Input2 *)0;
101 Fl_Input2	*txt_mars_ineei_1A_INCIDENT = (Fl_Input2 *)0;
102 Fl_Input2	*txt_mars_ineei_1A_LOCATION = (Fl_Input2 *)0;
103 Fl_Input2	*txt_mars_ineei_1A_TIME = (Fl_Input2 *)0;
104 Fl_Input2	*txt_mars_ineei_1B_MEDFACSTS = (Fl_Input2 *)0;
105 Fl_Input2	*txt_mars_ineei_1C_TRNPSTS = (Fl_Input2 *)0;
106 Fl_Input2	*txt_mars_ineei_1D_DAMAGE = (Fl_Input2 *)0;
107 Fl_Input2	*txt_mars_ineei_1E_UTILSTS = (Fl_Input2 *)0;
108 Fl_Input2	*txt_mars_ineei_1F_COMMSTS = (Fl_Input2 *)0;
109 Fl_Input2	*txt_mars_ineei_1G_INFOSRC = (Fl_Input2 *)0;
110 Fl_Input2	*txt_mars_ineei_1G_INFOTIME = (Fl_Input2 *)0;
111 Fl_Input2	*txt_mars_ineei_1H_REMARKS = (Fl_Input2 *)0;
112 
113 //----------------------------------------------------------------------
114 
115 // widget callbacks & support
cb_btn_mars_ineei_DE(Fl_Widget * w,void * d)116 void cb_btn_mars_ineei_DE(Fl_Widget *w, void *d)
117 {
118 	txt_mars_ineei_DE->value(progStatus.my_call.c_str());
119 }
120 
cb_btn_mars_ineei_DTG(Fl_Widget * w,void * d)121 void cb_btn_mars_ineei_DTG(Fl_Widget *w, void *d)
122 {
123 	txt_mars_ineei_DTG->value(szMarsDateTime());
124 }
125 
cb_btn_mars_ineei_pick_fm(Fl_Widget * w,void * d)126 void cb_btn_mars_ineei_pick_fm(Fl_Widget *w, void *d)
127 {
128 	if (!get_mars_list_text()) return;
129 	txt_mars_ineei_FMCALL->value(mars_list_call.c_str());
130 	txt_mars_ineei_FMNAME->value(mars_list_lname.c_str());
131 	txt_mars_ineei_FMSTATE->value(mars_list_state.c_str());
132 }
133 
cb_btn_mars_ineei_pick_to(Fl_Widget * w,void * d)134 void cb_btn_mars_ineei_pick_to(Fl_Widget *w, void *d)
135 {
136 	if (!get_mars_list_text()) return;
137 	if (!mars_list_bcall.empty())
138 		txt_mars_ineei_TOCALL->value(mars_list_bcall.c_str());
139 	else
140 		txt_mars_ineei_TOCALL->value(mars_list_call.c_str());
141 	txt_mars_ineei_TOPOS->value(mars_list_position.c_str());
142 	txt_mars_ineei_TOSTATE->value(mars_list_state.c_str());
143 }
144 
cb_btn_mars_ineei_pick_INFO1(Fl_Widget * w,void * d)145 void cb_btn_mars_ineei_pick_INFO1(Fl_Widget *w, void *d)
146 {
147 	if (!get_mars_list_text()) return;
148 	if (!mars_list_bcall.empty())
149 		txt_mars_ineei_INFO1CALL->value(mars_list_bcall.c_str());
150 	else
151 		txt_mars_ineei_INFO1CALL->value(mars_list_call.c_str());
152 	txt_mars_ineei_INFO1POS->value(mars_list_position.c_str());
153 	txt_mars_ineei_INFO1STATE->value(mars_list_state.c_str());
154 }
155 
cb_btn_mars_ineei_pick_INFO2(Fl_Widget * w,void * d)156 void cb_btn_mars_ineei_pick_INFO2(Fl_Widget *w, void *d)
157 {
158 	if (!get_mars_list_text()) return;
159 	if (!mars_list_bcall.empty())
160 		txt_mars_ineei_INFO2CALL->value(mars_list_bcall.c_str());
161 	else
162 		txt_mars_ineei_INFO2CALL->value(mars_list_call.c_str());
163 	txt_mars_ineei_INFO2POS->value(mars_list_position.c_str());
164 	txt_mars_ineei_INFO2STATE->value(mars_list_state.c_str());
165 }
166 
cb_btn_mars_ineei_pick_INFO3(Fl_Widget * w,void * d)167 void cb_btn_mars_ineei_pick_INFO3(Fl_Widget *w, void *d)
168 {
169 	if (!get_mars_list_text()) return;
170 	if (!mars_list_bcall.empty())
171 		txt_mars_ineei_INFO3CALL->value(mars_list_bcall.c_str());
172 	else
173 		txt_mars_ineei_INFO3CALL->value(mars_list_call.c_str());
174 	txt_mars_ineei_INFO3POS->value(mars_list_position.c_str());
175 	txt_mars_ineei_INFO3STATE->value(mars_list_state.c_str());
176 }
177 
cb_btn_mars_ineei_pick_INFO4(Fl_Widget * w,void * d)178 void cb_btn_mars_ineei_pick_INFO4(Fl_Widget *w, void *d)
179 {
180 	if (!get_mars_list_text()) return;
181 	if (!mars_list_bcall.empty())
182 		txt_mars_ineei_INFO4CALL->value(mars_list_bcall.c_str());
183 	else
184 		txt_mars_ineei_INFO4CALL->value(mars_list_call.c_str());
185 	txt_mars_ineei_INFO4POS->value(mars_list_position.c_str());
186 	txt_mars_ineei_INFO4STATE->value(mars_list_state.c_str());
187 }
188 
cb_btn_mars_ineei_pick_INFO5(Fl_Widget * w,void * d)189 void cb_btn_mars_ineei_pick_INFO5(Fl_Widget *w, void *d)
190 {
191 	if (!get_mars_list_text()) return;
192 	if (!mars_list_bcall.empty())
193 		txt_mars_ineei_INFO5CALL->value(mars_list_bcall.c_str());
194 	else
195 		txt_mars_ineei_INFO5CALL->value(mars_list_call.c_str());
196 	txt_mars_ineei_INFO5POS->value(mars_list_position.c_str());
197 	txt_mars_ineei_INFO5STATE->value(mars_list_state.c_str());
198 }
199 
cb_btn_mars_ineei_pick_INFO6(Fl_Widget * w,void * d)200 void cb_btn_mars_ineei_pick_INFO6(Fl_Widget *w, void *d)
201 {
202 	if (!get_mars_list_text()) return;
203 	if (!mars_list_bcall.empty())
204 		txt_mars_ineei_INFO6CALL->value(mars_list_bcall.c_str());
205 	else
206 		txt_mars_ineei_INFO6CALL->value(mars_list_call.c_str());
207 	txt_mars_ineei_INFO6POS->value(mars_list_position.c_str());
208 	txt_mars_ineei_INFO6STATE->value(mars_list_state.c_str());
209 }
210 
cb_btn_mars_ineei_pick_INFO7(Fl_Widget * w,void * d)211 void cb_btn_mars_ineei_pick_INFO7(Fl_Widget *w, void *d)
212 {
213 	if (!get_mars_list_text()) return;
214 	if (!mars_list_bcall.empty())
215 		txt_mars_ineei_INFO7CALL->value(mars_list_bcall.c_str());
216 	else
217 		txt_mars_ineei_INFO7CALL->value(mars_list_call.c_str());
218 	txt_mars_ineei_INFO7POS->value(mars_list_position.c_str());
219 	txt_mars_ineei_INFO7STATE->value(mars_list_state.c_str());
220 }
221 
cb_btn_mars_ineei_pick_INFO8(Fl_Widget * w,void * d)222 void cb_btn_mars_ineei_pick_INFO8(Fl_Widget *w, void *d)
223 {
224 	if (!get_mars_list_text()) return;
225 	if (!mars_list_bcall.empty())
226 		txt_mars_ineei_INFO8CALL->value(mars_list_bcall.c_str());
227 	else
228 		txt_mars_ineei_INFO8CALL->value(mars_list_call.c_str());
229 	txt_mars_ineei_INFO8POS->value(mars_list_position.c_str());
230 	txt_mars_ineei_INFO8STATE->value(mars_list_state.c_str());
231 }
232 
cb_btn_mars_ineei_pick_INFO9(Fl_Widget * w,void * d)233 void cb_btn_mars_ineei_pick_INFO9(Fl_Widget *w, void *d)
234 {
235 	if (!get_mars_list_text()) return;
236 	if (!mars_list_bcall.empty())
237 		txt_mars_ineei_INFO9CALL->value(mars_list_bcall.c_str());
238 	else
239 		txt_mars_ineei_INFO9CALL->value(mars_list_call.c_str());
240 	txt_mars_ineei_INFO9POS->value(mars_list_position.c_str());
241 	txt_mars_ineei_INFO9STATE->value(mars_list_state.c_str());
242 }
243 
cb_btn_mars_ineei_pick_INFO10(Fl_Widget * w,void * d)244 void cb_btn_mars_ineei_pick_INFO10(Fl_Widget *w, void *d)
245 {
246 	if (!get_mars_list_text()) return;
247 	if (!mars_list_bcall.empty())
248 		txt_mars_ineei_INFO10CALL->value(mars_list_bcall.c_str());
249 	else
250 		txt_mars_ineei_INFO10CALL->value(mars_list_call.c_str());
251 	txt_mars_ineei_INFO10POS->value(mars_list_position.c_str());
252 	txt_mars_ineei_INFO10STATE->value(mars_list_state.c_str());
253 }
254 
255 //----------------------------------------------------------------------
256 
create_mars_ineei()257 void create_mars_ineei()
258 {
259 	int Y = tab_top;
260 	tab_mars_ineei = new Fl_Group(0, Y, 570, 390);
261 	tab_mars_ineei->align(FL_ALIGN_TOP);
262 
263 	tab_mars_ineei_type = new Fl_Tabs(0, Y+2, 570, 387);
264 	tab_mars_ineei_type->selection_color((Fl_Color)246);
265 
266 //-----------tab 1-------------
267 
268 	tab_mars_ineei_1 = new Fl_Group(0, Y+25, 570, 360, _("Header"));
269 
270 	Y += 36;
271 
272 	txt_mars_ineei_DE = new Fl_Input2(80, Y, 150, 20, _("DE"));
273 	txt_mars_ineei_DE->tooltip(_(""));
274 	txt_mars_ineei_DE->callback((Fl_Callback*)cb_mars_fl_input2);
275 	txt_mars_ineei_DE->when(FL_WHEN_CHANGED);
276 
277 	btn_mars_ineei_DE = new Fl_Button(232, Y, 30, 20, _("ME"));
278 	btn_mars_ineei_DE->callback((Fl_Callback*)cb_btn_mars_ineei_DE);
279 
280 	txt_mars_ineei_NBR = new Fl_Input2(350, Y, 150, 20, _("MSG NBR"));
281 	txt_mars_ineei_NBR->tooltip(_(""));
282 	txt_mars_ineei_NBR->callback((Fl_Callback*)cb_mars_fl_input2);
283 	txt_mars_ineei_NBR->when(FL_WHEN_CHANGED);
284 
285 	Y += 22;
286 	sel_mars_ineei_PREC = new Fl_ListBox(80, Y, 45, 20, _("PREC"));
287 	sel_mars_ineei_PREC->tooltip(
288 		_("R - Routine\nP - Priority\nO - Immediate\nZ - Flash"));
289 	sel_mars_ineei_PREC->add("R|P|O|Z");
290 	sel_mars_ineei_PREC->align(FL_ALIGN_LEFT);
291 	sel_mars_ineei_PREC->index(0);
292 
293 	txt_mars_ineei_DTG = new Fl_Input2(165, Y, 150, 20, _("DTG"));
294 	txt_mars_ineei_DTG->tooltip(_(""));
295 
296 	btn_mars_ineei_DTG = new Fl_Button(315, Y, 22, 20, _("..."));
297 	btn_mars_ineei_DTG->tooltip(_("Set Date/Time Group"));
298 	btn_mars_ineei_DTG->callback((Fl_Callback*)cb_btn_mars_ineei_DTG);
299 
300 	Y += 22;
301 	txt_mars_ineei_FMNAME = new Fl_Input2(80, Y, 150, 20, _("FM"));
302 	txt_mars_ineei_FMNAME->tooltip(_("Name"));
303 	txt_mars_ineei_FMNAME->callback((Fl_Callback*)cb_mars_fl_input2);
304 	txt_mars_ineei_FMNAME->when(FL_WHEN_CHANGED);
305 
306 	txt_mars_ineei_FMCALL = new Fl_Input2(232, Y, 150, 20, _(""));
307 	txt_mars_ineei_FMCALL->tooltip(_("Call"));
308 	txt_mars_ineei_FMCALL->callback((Fl_Callback*)cb_mars_fl_input2);
309 	txt_mars_ineei_FMCALL->when(FL_WHEN_CHANGED);
310 
311 	txt_mars_ineei_FMSTATE = new Fl_Input2(384, Y, 30, 20, _(""));
312 	txt_mars_ineei_FMSTATE->tooltip(_("State"));
313 	txt_mars_ineei_FMSTATE->callback((Fl_Callback*)cb_mars_fl_input2);
314 	txt_mars_ineei_FMSTATE->when(FL_WHEN_CHANGED);
315 
316 	btn_mars_ineei_pick_fm = new Fl_Button(416, Y, 30, 20, _("List"));
317 	btn_mars_ineei_pick_fm->tooltip(_("Select from list"));
318 	btn_mars_ineei_pick_fm->callback((Fl_Callback*)cb_btn_mars_ineei_pick_fm);
319 
320 	Y += 22;
321 	txt_mars_ineei_TOPOS = new Fl_Input2(80, Y, 150, 20, _("TO"));
322 	txt_mars_ineei_TOPOS->tooltip(_("Position"));
323 	txt_mars_ineei_TOPOS->callback((Fl_Callback*)cb_mars_fl_input2);
324 	txt_mars_ineei_TOPOS->when(FL_WHEN_CHANGED);
325 
326 	txt_mars_ineei_TOCALL = new Fl_Input2(232, Y, 150, 20, _(""));
327 	txt_mars_ineei_TOCALL->tooltip(_("Call"));
328 	txt_mars_ineei_TOCALL->callback((Fl_Callback*)cb_mars_fl_input2);
329 	txt_mars_ineei_TOCALL->when(FL_WHEN_CHANGED);
330 
331 	txt_mars_ineei_TOSTATE = new Fl_Input2(384, Y, 30, 20, _(""));
332 	txt_mars_ineei_TOSTATE->tooltip(_("State"));
333 	txt_mars_ineei_TOSTATE->callback((Fl_Callback*)cb_mars_fl_input2);
334 	txt_mars_ineei_TOSTATE->when(FL_WHEN_CHANGED);
335 
336 	btn_mars_ineei_pick_to = new Fl_Button(416, Y, 30, 20, _("List"));
337 	btn_mars_ineei_pick_to->tooltip(_("Select from list"));
338 	btn_mars_ineei_pick_to->callback((Fl_Callback*)cb_btn_mars_ineei_pick_to);
339 
340 	Y += 22;
341 	txt_mars_ineei_INFO1POS = new Fl_Input2(80, Y, 150, 20, _("INFO"));
342 	txt_mars_ineei_INFO1POS->tooltip(_("Position"));
343 	txt_mars_ineei_INFO1POS->callback((Fl_Callback*)cb_mars_fl_input2);
344 	txt_mars_ineei_INFO1POS->when(FL_WHEN_CHANGED);
345 
346 	txt_mars_ineei_INFO1CALL = new Fl_Input2(232, Y, 150, 20, _(""));
347 	txt_mars_ineei_INFO1CALL->tooltip(_("Call"));
348 	txt_mars_ineei_INFO1CALL->callback((Fl_Callback*)cb_mars_fl_input2);
349 	txt_mars_ineei_INFO1CALL->when(FL_WHEN_CHANGED);
350 
351 	txt_mars_ineei_INFO1STATE = new Fl_Input2(384, Y, 30, 20, _(""));
352 	txt_mars_ineei_INFO1STATE->tooltip(_("State"));
353 	txt_mars_ineei_INFO1STATE->callback((Fl_Callback*)cb_mars_fl_input2);
354 	txt_mars_ineei_INFO1STATE->when(FL_WHEN_CHANGED);
355 
356 	btn_mars_ineei_pick_INFO1 = new Fl_Button(416, Y, 30, 20, _("List"));
357 	btn_mars_ineei_pick_INFO1->tooltip(_("Select from list"));
358 	btn_mars_ineei_pick_INFO1->callback((Fl_Callback*)cb_btn_mars_ineei_pick_INFO1);
359 
360 	Y += 22;
361 	txt_mars_ineei_INFO2POS = new Fl_Input2(80, Y, 150, 20, _("INFO"));
362 	txt_mars_ineei_INFO2POS->tooltip(_("Position"));
363 	txt_mars_ineei_INFO2POS->callback((Fl_Callback*)cb_mars_fl_input2);
364 	txt_mars_ineei_INFO2POS->when(FL_WHEN_CHANGED);
365 
366 	txt_mars_ineei_INFO2CALL = new Fl_Input2(232, Y, 150, 20, _(""));
367 	txt_mars_ineei_INFO2CALL->tooltip(_("Call"));
368 	txt_mars_ineei_INFO2CALL->callback((Fl_Callback*)cb_mars_fl_input2);
369 	txt_mars_ineei_INFO2CALL->when(FL_WHEN_CHANGED);
370 
371 	txt_mars_ineei_INFO2STATE = new Fl_Input2(384, Y, 30, 20, _(""));
372 	txt_mars_ineei_INFO2STATE->tooltip(_("State"));
373 	txt_mars_ineei_INFO2STATE->callback((Fl_Callback*)cb_mars_fl_input2);
374 	txt_mars_ineei_INFO2STATE->when(FL_WHEN_CHANGED);
375 
376 	btn_mars_ineei_pick_INFO2 = new Fl_Button(416, Y, 30, 20, _("List"));
377 	btn_mars_ineei_pick_INFO2->tooltip(_("Select from list"));
378 	btn_mars_ineei_pick_INFO2->callback((Fl_Callback*)cb_btn_mars_ineei_pick_INFO2);
379 
380 	Y += 22;
381 	txt_mars_ineei_INFO3POS = new Fl_Input2(80, Y, 150, 20, _("INFO"));
382 	txt_mars_ineei_INFO3POS->tooltip(_("Position"));
383 	txt_mars_ineei_INFO3POS->callback((Fl_Callback*)cb_mars_fl_input2);
384 	txt_mars_ineei_INFO3POS->when(FL_WHEN_CHANGED);
385 
386 	txt_mars_ineei_INFO3CALL = new Fl_Input2(232, Y, 150, 20, _(""));
387 	txt_mars_ineei_INFO3CALL->tooltip(_("Call"));
388 	txt_mars_ineei_INFO3CALL->callback((Fl_Callback*)cb_mars_fl_input2);
389 	txt_mars_ineei_INFO3CALL->when(FL_WHEN_CHANGED);
390 
391 	txt_mars_ineei_INFO3STATE = new Fl_Input2(384, Y, 30, 20, _(""));
392 	txt_mars_ineei_INFO3STATE->tooltip(_("State"));
393 	txt_mars_ineei_INFO3STATE->callback((Fl_Callback*)cb_mars_fl_input2);
394 	txt_mars_ineei_INFO3STATE->when(FL_WHEN_CHANGED);
395 
396 	btn_mars_ineei_pick_INFO3 = new Fl_Button(416, Y, 30, 20, _("List"));
397 	btn_mars_ineei_pick_INFO3->tooltip(_("Select from list"));
398 	btn_mars_ineei_pick_INFO3->callback((Fl_Callback*)cb_btn_mars_ineei_pick_INFO3);
399 
400 	Y += 22;
401 	txt_mars_ineei_INFO4POS = new Fl_Input2(80, Y, 150, 20, _("INFO"));
402 	txt_mars_ineei_INFO4POS->tooltip(_("Position"));
403 	txt_mars_ineei_INFO4POS->callback((Fl_Callback*)cb_mars_fl_input2);
404 	txt_mars_ineei_INFO4POS->when(FL_WHEN_CHANGED);
405 
406 	txt_mars_ineei_INFO4CALL = new Fl_Input2(232, Y, 150, 20, _(""));
407 	txt_mars_ineei_INFO4CALL->tooltip(_("Call"));
408 	txt_mars_ineei_INFO4CALL->callback((Fl_Callback*)cb_mars_fl_input2);
409 	txt_mars_ineei_INFO4CALL->when(FL_WHEN_CHANGED);
410 
411 	txt_mars_ineei_INFO4STATE = new Fl_Input2(384, Y, 30, 20, _(""));
412 	txt_mars_ineei_INFO4STATE->tooltip(_("State"));
413 	txt_mars_ineei_INFO4STATE->callback((Fl_Callback*)cb_mars_fl_input2);
414 	txt_mars_ineei_INFO4STATE->when(FL_WHEN_CHANGED);
415 
416 	btn_mars_ineei_pick_INFO4 = new Fl_Button(416, Y, 30, 20, _("List"));
417 	btn_mars_ineei_pick_INFO4->tooltip(_("Select from list"));
418 	btn_mars_ineei_pick_INFO4->callback((Fl_Callback*)cb_btn_mars_ineei_pick_INFO4);
419 
420 	Y += 22;
421 	txt_mars_ineei_INFO5POS = new Fl_Input2(80, Y, 150, 20, _("INFO"));
422 	txt_mars_ineei_INFO5POS->tooltip(_("Position"));
423 	txt_mars_ineei_INFO5POS->callback((Fl_Callback*)cb_mars_fl_input2);
424 	txt_mars_ineei_INFO5POS->when(FL_WHEN_CHANGED);
425 
426 	txt_mars_ineei_INFO5CALL = new Fl_Input2(232, Y, 150, 20, _(""));
427 	txt_mars_ineei_INFO5CALL->tooltip(_("Call"));
428 	txt_mars_ineei_INFO5CALL->callback((Fl_Callback*)cb_mars_fl_input2);
429 	txt_mars_ineei_INFO5CALL->when(FL_WHEN_CHANGED);
430 
431 	txt_mars_ineei_INFO5STATE = new Fl_Input2(384, Y, 30, 20, _(""));
432 	txt_mars_ineei_INFO5STATE->tooltip(_("State"));
433 	txt_mars_ineei_INFO5STATE->callback((Fl_Callback*)cb_mars_fl_input2);
434 	txt_mars_ineei_INFO5STATE->when(FL_WHEN_CHANGED);
435 
436 	btn_mars_ineei_pick_INFO5 = new Fl_Button(416, Y, 30, 20, _("List"));
437 	btn_mars_ineei_pick_INFO5->tooltip(_("Select from list"));
438 	btn_mars_ineei_pick_INFO5->callback((Fl_Callback*)cb_btn_mars_ineei_pick_INFO5);
439 
440 	Y += 22;
441 	txt_mars_ineei_INFO6POS = new Fl_Input2(80, Y, 150, 20, _("INFO"));
442 	txt_mars_ineei_INFO6POS->tooltip(_("Position"));
443 	txt_mars_ineei_INFO6POS->callback((Fl_Callback*)cb_mars_fl_input2);
444 	txt_mars_ineei_INFO6POS->when(FL_WHEN_CHANGED);
445 
446 	txt_mars_ineei_INFO6CALL = new Fl_Input2(232, Y, 150, 20, _(""));
447 	txt_mars_ineei_INFO6CALL->tooltip(_("Call"));
448 	txt_mars_ineei_INFO6CALL->callback((Fl_Callback*)cb_mars_fl_input2);
449 	txt_mars_ineei_INFO6CALL->when(FL_WHEN_CHANGED);
450 
451 	txt_mars_ineei_INFO6STATE = new Fl_Input2(384, Y, 30, 20, _(""));
452 	txt_mars_ineei_INFO6STATE->tooltip(_("State"));
453 	txt_mars_ineei_INFO6STATE->callback((Fl_Callback*)cb_mars_fl_input2);
454 	txt_mars_ineei_INFO6STATE->when(FL_WHEN_CHANGED);
455 
456 	btn_mars_ineei_pick_INFO6 = new Fl_Button(416, Y, 30, 20, _("List"));
457 	btn_mars_ineei_pick_INFO6->tooltip(_("Select from list"));
458 	btn_mars_ineei_pick_INFO6->callback((Fl_Callback*)cb_btn_mars_ineei_pick_INFO6);
459 
460 	Y += 22;
461 	txt_mars_ineei_INFO7POS = new Fl_Input2(80, Y, 150, 20, _("INFO"));
462 	txt_mars_ineei_INFO7POS->tooltip(_("Position"));
463 	txt_mars_ineei_INFO7POS->callback((Fl_Callback*)cb_mars_fl_input2);
464 	txt_mars_ineei_INFO7POS->when(FL_WHEN_CHANGED);
465 
466 	txt_mars_ineei_INFO7CALL = new Fl_Input2(232, Y, 150, 20, _(""));
467 	txt_mars_ineei_INFO7CALL->tooltip(_("Call"));
468 	txt_mars_ineei_INFO7CALL->callback((Fl_Callback*)cb_mars_fl_input2);
469 	txt_mars_ineei_INFO7CALL->when(FL_WHEN_CHANGED);
470 
471 	txt_mars_ineei_INFO7STATE = new Fl_Input2(384, Y, 30, 20, _(""));
472 	txt_mars_ineei_INFO7STATE->tooltip(_("State"));
473 	txt_mars_ineei_INFO7STATE->callback((Fl_Callback*)cb_mars_fl_input2);
474 	txt_mars_ineei_INFO7STATE->when(FL_WHEN_CHANGED);
475 
476 	btn_mars_ineei_pick_INFO7 = new Fl_Button(416, Y, 30, 20, _("List"));
477 	btn_mars_ineei_pick_INFO7->tooltip(_("Select from list"));
478 	btn_mars_ineei_pick_INFO7->callback((Fl_Callback*)cb_btn_mars_ineei_pick_INFO7);
479 
480 	Y += 22;
481 	txt_mars_ineei_INFO8POS = new Fl_Input2(80, Y, 150, 20, _("INFO"));
482 	txt_mars_ineei_INFO8POS->tooltip(_("Position"));
483 	txt_mars_ineei_INFO8POS->callback((Fl_Callback*)cb_mars_fl_input2);
484 	txt_mars_ineei_INFO8POS->when(FL_WHEN_CHANGED);
485 
486 	txt_mars_ineei_INFO8CALL = new Fl_Input2(232, Y, 150, 20, _(""));
487 	txt_mars_ineei_INFO8CALL->tooltip(_("Call"));
488 	txt_mars_ineei_INFO8CALL->callback((Fl_Callback*)cb_mars_fl_input2);
489 	txt_mars_ineei_INFO8CALL->when(FL_WHEN_CHANGED);
490 
491 	txt_mars_ineei_INFO8STATE = new Fl_Input2(384, Y, 30, 20, _(""));
492 	txt_mars_ineei_INFO8STATE->tooltip(_("State"));
493 	txt_mars_ineei_INFO8STATE->callback((Fl_Callback*)cb_mars_fl_input2);
494 	txt_mars_ineei_INFO8STATE->when(FL_WHEN_CHANGED);
495 
496 	btn_mars_ineei_pick_INFO8 = new Fl_Button(416, Y, 30, 20, _("List"));
497 	btn_mars_ineei_pick_INFO8->tooltip(_("Select from list"));
498 	btn_mars_ineei_pick_INFO8->callback((Fl_Callback*)cb_btn_mars_ineei_pick_INFO8);
499 
500 	Y += 22;
501 	txt_mars_ineei_INFO9POS = new Fl_Input2(80, Y, 150, 20, _("INFO"));
502 	txt_mars_ineei_INFO9POS->tooltip(_("Position"));
503 	txt_mars_ineei_INFO9POS->callback((Fl_Callback*)cb_mars_fl_input2);
504 	txt_mars_ineei_INFO9POS->when(FL_WHEN_CHANGED);
505 
506 	txt_mars_ineei_INFO9CALL = new Fl_Input2(232, Y, 150, 20, _(""));
507 	txt_mars_ineei_INFO9CALL->tooltip(_("Call"));
508 	txt_mars_ineei_INFO9CALL->callback((Fl_Callback*)cb_mars_fl_input2);
509 	txt_mars_ineei_INFO9CALL->when(FL_WHEN_CHANGED);
510 
511 	txt_mars_ineei_INFO9STATE = new Fl_Input2(384, Y, 30, 20, _(""));
512 	txt_mars_ineei_INFO9STATE->tooltip(_("State"));
513 	txt_mars_ineei_INFO9STATE->callback((Fl_Callback*)cb_mars_fl_input2);
514 	txt_mars_ineei_INFO9STATE->when(FL_WHEN_CHANGED);
515 
516 	btn_mars_ineei_pick_INFO9 = new Fl_Button(416, Y, 30, 20, _("List"));
517 	btn_mars_ineei_pick_INFO9->tooltip(_("Select from list"));
518 	btn_mars_ineei_pick_INFO9->callback((Fl_Callback*)cb_btn_mars_ineei_pick_INFO9);
519 
520 	Y += 22;
521 	txt_mars_ineei_INFO10POS = new Fl_Input2(80, Y, 150, 20, _("INFO"));
522 	txt_mars_ineei_INFO10POS->tooltip(_("Position"));
523 	txt_mars_ineei_INFO10POS->callback((Fl_Callback*)cb_mars_fl_input2);
524 	txt_mars_ineei_INFO10POS->when(FL_WHEN_CHANGED);
525 
526 	txt_mars_ineei_INFO10CALL = new Fl_Input2(232, Y, 150, 20, _(""));
527 	txt_mars_ineei_INFO10CALL->tooltip(_("Call"));
528 	txt_mars_ineei_INFO10CALL->callback((Fl_Callback*)cb_mars_fl_input2);
529 	txt_mars_ineei_INFO10CALL->when(FL_WHEN_CHANGED);
530 
531 	txt_mars_ineei_INFO10STATE = new Fl_Input2(384, Y, 30, 20, _(""));
532 	txt_mars_ineei_INFO10STATE->tooltip(_("State"));
533 	txt_mars_ineei_INFO10STATE->callback((Fl_Callback*)cb_mars_fl_input2);
534 	txt_mars_ineei_INFO10STATE->when(FL_WHEN_CHANGED);
535 
536 	btn_mars_ineei_pick_INFO10 = new Fl_Button(416, Y, 30, 20, _("List"));
537 	btn_mars_ineei_pick_INFO10->tooltip(_("Select from list"));
538 	btn_mars_ineei_pick_INFO10->callback((Fl_Callback*)cb_btn_mars_ineei_pick_INFO10);
539 
540 	Y += 34;
541 	txt_mars_ineei_INCIDENT = new Fl_Input2(80, Y, 450, 20, _("INCIDENT"));
542 	txt_mars_ineei_INCIDENT->tooltip(_("Incident\nleave blank for normal ops"));
543 	txt_mars_ineei_INCIDENT->callback((Fl_Callback*)cb_mars_fl_input2);
544 	txt_mars_ineei_INCIDENT->when(FL_WHEN_CHANGED);
545 
546 	tab_mars_ineei_1->end();
547 
548 //-----------tab 2-------------
549 
550 	Y = tab_top;
551 	tab_mars_ineei_2 = new Fl_Group(0, Y+25, 570, 360, _("Body"));
552 
553 	Fl_Box *label = (Fl_Box *)0;
554 
555 	Y += 30;
556 	label = new Fl_Box(0, Y, 28, 20, "1.");
557 	label->box(FL_FLAT_BOX);
558 	label->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE);
559 
560 	txt_mars_ineei_REF = new Fl_Input2(80, Y, 160, 20, "REF");
561 	txt_mars_ineei_REF->tooltip("Use appropriate event identifier");
562 	txt_mars_ineei_REF->align(FL_ALIGN_LEFT);
563 	txt_mars_ineei_REF->callback((Fl_Callback*)cb_mars_fl_input2);
564 	txt_mars_ineei_REF->when(FL_WHEN_CHANGED);
565 
566 	txt_mars_ineei_STATE = new Fl_Input2(280, Y, 40, 20, "ST");
567 	txt_mars_ineei_STATE->tooltip("State");
568 	txt_mars_ineei_STATE->align(FL_ALIGN_LEFT);
569 	txt_mars_ineei_STATE->callback((Fl_Callback*)cb_mars_fl_input2);
570 	txt_mars_ineei_STATE->when(FL_WHEN_CHANGED);
571 
572 	Y += 22;
573 	label = new Fl_Box(0, Y, 28, 20, "A.");
574 	label->box(FL_FLAT_BOX);
575 	label->align(FL_ALIGN_RIGHT | FL_ALIGN_INSIDE);
576 
577 	txt_mars_ineei_1A_INCIDENT = new Fl_Input2(80, Y, 160, 20, "INC");
578 	txt_mars_ineei_1A_INCIDENT->tooltip("Incident");
579 	txt_mars_ineei_1A_INCIDENT->align(FL_ALIGN_LEFT);
580 	txt_mars_ineei_1A_INCIDENT->callback((Fl_Callback*)cb_mars_fl_input2);
581 	txt_mars_ineei_1A_INCIDENT->when(FL_WHEN_CHANGED);
582 
583 	txt_mars_ineei_1A_LOCATION = new Fl_Input2(280, Y, 160, 20, "LOC");
584 	txt_mars_ineei_1A_LOCATION->tooltip("Incident Location");
585 	txt_mars_ineei_1A_LOCATION->align(FL_ALIGN_LEFT);
586 	txt_mars_ineei_1A_LOCATION->callback((Fl_Callback*)cb_mars_fl_input2);
587 	txt_mars_ineei_1A_LOCATION->when(FL_WHEN_CHANGED);
588 
589 	txt_mars_ineei_1A_TIME = new Fl_Input2(480, Y, 80, 20, "TIME");
590 	txt_mars_ineei_1A_TIME->tooltip("Incident time");
591 	txt_mars_ineei_1A_TIME->align(FL_ALIGN_LEFT);
592 	txt_mars_ineei_1A_TIME->callback((Fl_Callback*)cb_mars_fl_input2);
593 	txt_mars_ineei_1A_TIME->when(FL_WHEN_CHANGED);
594 
595 	Y += 22;
596 	label = new Fl_Box(0, Y, 28, 20, "B.");
597 	label->box(FL_FLAT_BOX);
598 	label->align(FL_ALIGN_RIGHT | FL_ALIGN_INSIDE);
599 
600 	txt_mars_ineei_1B_MEDFACSTS = new Fl_Input2(80, Y, 480, 20, "MED");
601 	txt_mars_ineei_1B_MEDFACSTS->align(FL_ALIGN_LEFT);
602 	txt_mars_ineei_1B_MEDFACSTS->tooltip("Emergency Medical Facility Status");
603 	txt_mars_ineei_1B_MEDFACSTS->callback((Fl_Callback*)cb_mars_fl_input2);
604 	txt_mars_ineei_1B_MEDFACSTS->when(FL_WHEN_CHANGED);
605 
606 	Y += 22;
607 	label = new Fl_Box(0, Y, 28, 20, "C.");
608 	label->box(FL_FLAT_BOX);
609 	label->align(FL_ALIGN_RIGHT | FL_ALIGN_INSIDE);
610 
611 	txt_mars_ineei_1C_TRNPSTS = new Fl_Input2(80, Y, 480, 20, "TRNS");
612 	txt_mars_ineei_1C_TRNPSTS->align(FL_ALIGN_LEFT);
613 	txt_mars_ineei_1C_TRNPSTS->tooltip("Local Transportation Status");
614 	txt_mars_ineei_1C_TRNPSTS->callback((Fl_Callback*)cb_mars_fl_input2);
615 	txt_mars_ineei_1C_TRNPSTS->when(FL_WHEN_CHANGED);
616 
617 	Y += 22;
618 	label = new Fl_Box(0, Y, 28, 20, "D.");
619 	label->box(FL_FLAT_BOX);
620 	label->align(FL_ALIGN_RIGHT | FL_ALIGN_INSIDE);
621 
622 	txt_mars_ineei_1D_DAMAGE = new Fl_Input2(80, Y, 480, 20, "DMG");
623 	txt_mars_ineei_1D_DAMAGE->align(FL_ALIGN_LEFT);
624 	txt_mars_ineei_1D_DAMAGE->tooltip("General Damage Characteristics");
625 	txt_mars_ineei_1D_DAMAGE->callback((Fl_Callback*)cb_mars_fl_input2);
626 	txt_mars_ineei_1D_DAMAGE->when(FL_WHEN_CHANGED);
627 
628 	Y += 22;
629 	label = new Fl_Box(0, Y, 28, 20, "E.");
630 	label->box(FL_FLAT_BOX);
631 	label->align(FL_ALIGN_RIGHT | FL_ALIGN_INSIDE);
632 
633 	txt_mars_ineei_1E_UTILSTS = new Fl_Input2(80, Y, 480, 20, "UTIL");
634 	txt_mars_ineei_1E_UTILSTS->align(FL_ALIGN_LEFT);
635 	txt_mars_ineei_1E_UTILSTS->tooltip("Area Utulity Status");
636 	txt_mars_ineei_1E_UTILSTS->callback((Fl_Callback*)cb_mars_fl_input2);
637 	txt_mars_ineei_1E_UTILSTS->when(FL_WHEN_CHANGED);
638 
639 	Y += 22;
640 	label = new Fl_Box(0, Y, 28, 20, "F.");
641 	label->box(FL_FLAT_BOX);
642 	label->align(FL_ALIGN_RIGHT | FL_ALIGN_INSIDE);
643 
644 	txt_mars_ineei_1F_COMMSTS = new Fl_Input2(80, Y, 480, 20, "COMM");
645 	txt_mars_ineei_1F_COMMSTS->align(FL_ALIGN_LEFT);
646 	txt_mars_ineei_1F_COMMSTS->tooltip("Communication Status");
647 	txt_mars_ineei_1F_COMMSTS->callback((Fl_Callback*)cb_mars_fl_input2);
648 	txt_mars_ineei_1F_COMMSTS->when(FL_WHEN_CHANGED);
649 
650 	Y += 22;
651 	label = new Fl_Box(0, Y, 28, 20, "G.");
652 	label->box(FL_FLAT_BOX);
653 	label->align(FL_ALIGN_RIGHT | FL_ALIGN_INSIDE);
654 
655 	txt_mars_ineei_1G_INFOSRC = new Fl_Input2(80, Y, 360, 20, "INFO");
656 	txt_mars_ineei_1G_INFOSRC->align(FL_ALIGN_LEFT);
657 	txt_mars_ineei_1G_INFOSRC->tooltip("Information Source");
658 	txt_mars_ineei_1G_INFOSRC->callback((Fl_Callback*)cb_mars_fl_input2);
659 	txt_mars_ineei_1G_INFOSRC->when(FL_WHEN_CHANGED);
660 
661 	txt_mars_ineei_1G_INFOTIME = new Fl_Input2(480, Y, 80, 20, "TIME");
662 	txt_mars_ineei_1G_INFOTIME->align(FL_ALIGN_LEFT);
663 	txt_mars_ineei_1G_INFOTIME->tooltip("Information Time");
664 	txt_mars_ineei_1G_INFOTIME->callback((Fl_Callback*)cb_mars_fl_input2);
665 	txt_mars_ineei_1G_INFOTIME->when(FL_WHEN_CHANGED);
666 
667 	Y += 22;
668 	label = new Fl_Box(0, Y+20, 28, 20, "H.");
669 	label->box(FL_FLAT_BOX);
670 	label->align(FL_ALIGN_RIGHT | FL_ALIGN_INSIDE);
671 
672 	txt_mars_ineei_1H_REMARKS = new Fl_Input2(28, Y+20, 560 - 28, 130, "Remarks");
673 	txt_mars_ineei_1H_REMARKS->type(4);
674 	txt_mars_ineei_1H_REMARKS->align(FL_ALIGN_TOP_LEFT);
675 	txt_mars_ineei_1H_REMARKS->tooltip("enter remarks");
676 	txt_mars_ineei_1H_REMARKS->callback((Fl_Callback*)cb_mars_fl_input2);
677 	txt_mars_ineei_1H_REMARKS->when(FL_WHEN_CHANGED);
678 
679 	tab_mars_ineei_2->end();
680 
681 //	tab_mars_type->end();
682 
683 	tab_mars_ineei->end();
684 
685 	tab_mars_ineei->hide();
686 };
687 
688