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 "gettext.h"
22 #include "status.h"
23 #include "util.h"
24
25 #include "flmsg_dialog.h"
26 #include "flmsg.h"
27
28 Fl_Tabs *tabs_msg_type = (Fl_Tabs *)0;
29
30 Fl_Group *tab_ics213 = (Fl_Group *)0;
31 Fl_Tabs *tab_ics213_type = (Fl_Tabs *)0;
32 Fl_Group *tab_213_originator = (Fl_Group *)0;
33 Fl_Input2 *txt_213_inc = (Fl_Input2 *)0;
34 Fl_Input2 *txt_213_to = (Fl_Input2 *)0;
35 Fl_Input2 *txt_213_p1 = (Fl_Input2 *)0;
36 Fl_Input2 *txt_213_fm = (Fl_Input2 *)0;
37 Fl_Input2 *txt_213_p2 = (Fl_Input2 *)0;
38 Fl_Input2 *txt_213_subj = (Fl_Input2 *)0;
39 Fl_DateInput *txt_213_d1 = (Fl_DateInput *)0;
40 Fl_Button *btn_213_date1 = (Fl_Button *)0;
41 Fl_Input2 *txt_213_t1 = (Fl_Input2 *)0;
42 Fl_Button *btn_213_time1 = (Fl_Button *)0;
43 FTextEdit *txt_213_msg = (FTextEdit *)0;
44 Fl_Input2 *txt_213_s1 = (Fl_Input2 *)0;
45 Fl_Input2 *txt_213_p3 = (Fl_Input2 *)0;
46 Fl_Group *tab_213_responder = (Fl_Group *)0;
47 Fl_Input2 *txt_213_s2 = (Fl_Input2 *)0;
48 Fl_DateInput *txt_213_d2 = (Fl_DateInput *)0;
49 Fl_Input2 *txt_213_t2 = (Fl_Input2 *)0;
50 Fl_Button *btn_213_time2 = (Fl_Button *)0;
51 FTextEdit *txt_213_reply = (FTextEdit *)0;
52 Fl_Input2 *txt_213_p4 = (Fl_Input2 *)0;
53 Fl_Button *btn_213_date2 = (Fl_Button *)0;
54
cb_btn_213_date1(Fl_Button *,void *)55 static void cb_btn_213_date1(Fl_Button*, void*) {
56 cb_SetDate1();
57 }
58
cb_btn_213_time1(Fl_Button *,void *)59 static void cb_btn_213_time1(Fl_Button*, void*) {
60 cb_SetTime1();
61 }
62
cb_btn_213_time2(Fl_Button *,void *)63 static void cb_btn_213_time2(Fl_Button*, void*) {
64 cb_SetTime2();
65 }
66
cb_btn_213_date2(Fl_Button *,void *)67 static void cb_btn_213_date2(Fl_Button*, void*) {
68 cb_SetDate2();
69 }
70
create_ics213_tab()71 void create_ics213_tab()
72 {
73 int Y = tab_top;
74 tab_ics213 = new Fl_Group(0, Y, 570, 390);
75 tab_ics213->align(FL_ALIGN_TOP);
76
77 tab_ics213_type = new Fl_Tabs(0, Y, 570, 387);
78 tab_ics213_type->selection_color((Fl_Color)246);
79
80 tab_213_originator = new Fl_Group(0, Y+25, 570, 360, _("Originator"));
81
82 txt_213_inc = new Fl_Input2(40, Y+40, 522, 24, _("Inc:"));
83 txt_213_inc->tooltip(_("Incident (optional)"));
84 txt_213_inc->box(FL_DOWN_BOX);
85 txt_213_inc->color((Fl_Color)FL_BACKGROUND2_COLOR);
86 txt_213_inc->selection_color((Fl_Color)FL_SELECTION_COLOR);
87 txt_213_inc->labeltype(FL_NORMAL_LABEL);
88 txt_213_inc->labelfont(0);
89 txt_213_inc->labelsize(14);
90 txt_213_inc->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
91 txt_213_inc->align(FL_ALIGN_LEFT);
92 txt_213_inc->callback(ics_changed);
93 txt_213_inc->when(FL_WHEN_CHANGED);
94
95 txt_213_to = new Fl_Input2(40, Y+66, 242, 24, _("To"));
96 txt_213_to->tooltip(_("Addressee"));
97 txt_213_to->box(FL_DOWN_BOX);
98 txt_213_to->color((Fl_Color)FL_BACKGROUND2_COLOR);
99 txt_213_to->selection_color((Fl_Color)FL_SELECTION_COLOR);
100 txt_213_to->labeltype(FL_NORMAL_LABEL);
101 txt_213_to->labelfont(0);
102 txt_213_to->labelsize(14);
103 txt_213_to->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
104 txt_213_to->align(FL_ALIGN_LEFT);
105 txt_213_to->callback(ics_changed);
106 txt_213_to->when(FL_WHEN_CHANGED);
107
108 txt_213_p1 = new Fl_Input2(321, Y+66, 242, 24, _("Pos."));
109 txt_213_p1->tooltip(_("Position of addressee"));
110 txt_213_p1->box(FL_DOWN_BOX);
111 txt_213_p1->color((Fl_Color)FL_BACKGROUND2_COLOR);
112 txt_213_p1->selection_color((Fl_Color)FL_SELECTION_COLOR);
113 txt_213_p1->labeltype(FL_NORMAL_LABEL);
114 txt_213_p1->labelfont(0);
115 txt_213_p1->labelsize(14);
116 txt_213_p1->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
117 txt_213_p1->align(FL_ALIGN_LEFT);
118 txt_213_p1->callback(ics_changed);
119 txt_213_p1->when(FL_WHEN_CHANGED);
120
121 txt_213_fm = new Fl_Input2(40, Y+92, 242, 24, _("Fm"));
122 txt_213_fm->tooltip(_("Originator"));
123 txt_213_fm->box(FL_DOWN_BOX);
124 txt_213_fm->color((Fl_Color)FL_BACKGROUND2_COLOR);
125 txt_213_fm->selection_color((Fl_Color)FL_SELECTION_COLOR);
126 txt_213_fm->labeltype(FL_NORMAL_LABEL);
127 txt_213_fm->labelfont(0);
128 txt_213_fm->labelsize(14);
129 txt_213_fm->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
130 txt_213_fm->align(FL_ALIGN_LEFT);
131 txt_213_fm->callback(ics_changed);
132 txt_213_fm->when(FL_WHEN_CHANGED);
133
134 txt_213_p2 = new Fl_Input2(321, Y+92, 242, 24, _("Pos."));
135 txt_213_p2->tooltip(_("Position of originator"));
136 txt_213_p2->box(FL_DOWN_BOX);
137 txt_213_p2->color((Fl_Color)FL_BACKGROUND2_COLOR);
138 txt_213_p2->selection_color((Fl_Color)FL_SELECTION_COLOR);
139 txt_213_p2->labeltype(FL_NORMAL_LABEL);
140 txt_213_p2->labelfont(0);
141 txt_213_p2->labelsize(14);
142 txt_213_p2->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
143 txt_213_p2->align(FL_ALIGN_LEFT);
144 txt_213_p2->callback(ics_changed);
145 txt_213_p2->when(FL_WHEN_CHANGED);
146
147 txt_213_subj = new Fl_Input2(40, Y+118, 522, 24, _("Sub."));
148 txt_213_subj->tooltip(_("Subject"));
149 txt_213_subj->box(FL_DOWN_BOX);
150 txt_213_subj->color((Fl_Color)FL_BACKGROUND2_COLOR);
151 txt_213_subj->selection_color((Fl_Color)FL_SELECTION_COLOR);
152 txt_213_subj->labeltype(FL_NORMAL_LABEL);
153 txt_213_subj->labelfont(0);
154 txt_213_subj->labelsize(14);
155 txt_213_subj->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
156 txt_213_subj->align(FL_ALIGN_LEFT);
157 txt_213_subj->callback(ics_changed);
158 txt_213_subj->when(FL_WHEN_CHANGED);
159
160 txt_213_d1 = new Fl_DateInput(232, Y+144, 125, 24, _("Date"));
161 txt_213_d1->tooltip(_("Date of origination"));
162 txt_213_d1->box(FL_DOWN_BOX);
163 txt_213_d1->color((Fl_Color)FL_BACKGROUND2_COLOR);
164 txt_213_d1->selection_color((Fl_Color)FL_SELECTION_COLOR);
165 txt_213_d1->labeltype(FL_NORMAL_LABEL);
166 txt_213_d1->labelfont(0);
167 txt_213_d1->labelsize(14);
168 txt_213_d1->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
169 txt_213_d1->align(FL_ALIGN_LEFT);
170 txt_213_d1->when(FL_WHEN_CHANGED);
171 txt_213_d1->callback(ics_changed);
172 txt_213_d1->format(1);
173
174 btn_213_date1 = new Fl_Button(365, Y+146, 20, 20, _("..."));
175 btn_213_date1->tooltip(_("Set today"));
176 btn_213_date1->callback((Fl_Callback*)cb_btn_213_date1);
177
178 txt_213_t1 = new Fl_Input2(430, Y+144, 103, 24, _("Time"));
179 txt_213_t1->tooltip(_("Time of origination"));
180 txt_213_t1->box(FL_DOWN_BOX);
181 txt_213_t1->color((Fl_Color)FL_BACKGROUND2_COLOR);
182 txt_213_t1->selection_color((Fl_Color)FL_SELECTION_COLOR);
183 txt_213_t1->labeltype(FL_NORMAL_LABEL);
184 txt_213_t1->labelfont(0);
185 txt_213_t1->labelsize(14);
186 txt_213_t1->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
187 txt_213_t1->align(FL_ALIGN_LEFT);
188 txt_213_t1->callback(ics_changed);
189 txt_213_t1->when(FL_WHEN_CHANGED);
190
191 btn_213_time1 = new Fl_Button(540, Y+146, 20, 20, _("..."));
192 btn_213_time1->tooltip(_("Set time now"));
193 btn_213_time1->callback((Fl_Callback*)cb_btn_213_time1);
194
195 txt_213_msg = new FTextEdit(5, Y+170, 562, 174, _("Message:"));
196 txt_213_msg->box(FL_DOWN_FRAME);
197 txt_213_msg->color((Fl_Color)FL_BACKGROUND2_COLOR);
198 txt_213_msg->selection_color((Fl_Color)FL_SELECTION_COLOR);
199 txt_213_msg->labeltype(FL_NORMAL_LABEL);
200 txt_213_msg->labelfont(0);
201 txt_213_msg->labelsize(14);
202 txt_213_msg->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
203 txt_213_msg->align(FL_ALIGN_TOP_LEFT);
204 txt_213_msg->callback(ics_changed);
205 txt_213_msg->when(FL_WHEN_CHANGED);
206
207 Fl_Group::current()->resizable(txt_213_msg);
208
209 txt_213_s1 = new Fl_Input2(50, Y+351, 230, 24, _("App'd"));
210 txt_213_s1->tooltip(_("Name of approver"));
211 txt_213_s1->box(FL_DOWN_BOX);
212 txt_213_s1->color((Fl_Color)FL_BACKGROUND2_COLOR);
213 txt_213_s1->selection_color((Fl_Color)FL_SELECTION_COLOR);
214 txt_213_s1->labeltype(FL_NORMAL_LABEL);
215 txt_213_s1->labelfont(0);
216 txt_213_s1->labelsize(14);
217 txt_213_s1->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
218 txt_213_s1->align(FL_ALIGN_LEFT);
219 txt_213_s1->callback(ics_changed);
220 txt_213_s1->when(FL_WHEN_CHANGED);
221
222 txt_213_p3 = new Fl_Input2(316, Y+351, 247, 24, _("Pos."));
223 txt_213_p3->tooltip(_("Position of approver"));
224 txt_213_p3->box(FL_DOWN_BOX);
225 txt_213_p3->color((Fl_Color)FL_BACKGROUND2_COLOR);
226 txt_213_p3->selection_color((Fl_Color)FL_SELECTION_COLOR);
227 txt_213_p3->labeltype(FL_NORMAL_LABEL);
228 txt_213_p3->labelfont(0);
229 txt_213_p3->labelsize(14);
230 txt_213_p3->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
231 txt_213_p3->align(FL_ALIGN_LEFT);
232 txt_213_p3->callback(ics_changed);
233 txt_213_p3->when(FL_WHEN_CHANGED);
234
235 tab_213_originator->end();
236
237 tab_213_responder = new Fl_Group(0, Y+25, 570, 360, _("Responder"));
238 tab_213_responder->hide();
239
240 txt_213_d2 = new Fl_DateInput(240, Y+42, 126, 24, _("Date"));
241 txt_213_d2->tooltip(_("Reply Date"));
242 txt_213_d2->box(FL_DOWN_BOX);
243 txt_213_d2->color((Fl_Color)FL_BACKGROUND2_COLOR);
244 txt_213_d2->selection_color((Fl_Color)FL_SELECTION_COLOR);
245 txt_213_d2->labeltype(FL_NORMAL_LABEL);
246 txt_213_d2->labelfont(0);
247 txt_213_d2->labelsize(14);
248 txt_213_d2->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
249 txt_213_d2->align(FL_ALIGN_LEFT);
250 txt_213_d2->callback(ics_changed);
251 txt_213_d2->when(FL_WHEN_CHANGED);
252 txt_213_d2->format(1);
253
254 btn_213_date2 = new Fl_Button(367, Y+44, 20, 20, _("..."));
255 btn_213_date2->tooltip(_("Today"));
256 btn_213_date2->callback((Fl_Callback*)cb_btn_213_date2);
257
258 txt_213_t2 = new Fl_Input2(434, Y+42, 103, 24, _("Time"));
259 txt_213_t2->tooltip(_("Reply Time"));
260 txt_213_t2->box(FL_DOWN_BOX);
261 txt_213_t2->color((Fl_Color)FL_BACKGROUND2_COLOR);
262 txt_213_t2->selection_color((Fl_Color)FL_SELECTION_COLOR);
263 txt_213_t2->labeltype(FL_NORMAL_LABEL);
264 txt_213_t2->labelfont(0);
265 txt_213_t2->labelsize(14);
266 txt_213_t2->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
267 txt_213_t2->align(FL_ALIGN_LEFT);
268 txt_213_t2->callback(ics_changed);
269 txt_213_t2->when(FL_WHEN_CHANGED);
270
271 btn_213_time2 = new Fl_Button(540, Y+44, 20, 20, _("..."));
272 btn_213_time2->tooltip(_("Now"));
273 btn_213_time2->callback((Fl_Callback*)cb_btn_213_time2);
274
275 txt_213_reply = new FTextEdit(5, Y+72, 562, 275, _("Reply"));
276 txt_213_reply->box(FL_DOWN_FRAME);
277 txt_213_reply->color((Fl_Color)FL_BACKGROUND2_COLOR);
278 txt_213_reply->selection_color((Fl_Color)FL_SELECTION_COLOR);
279 txt_213_reply->labeltype(FL_NORMAL_LABEL);
280 txt_213_reply->labelfont(0);
281 txt_213_reply->labelsize(14);
282 txt_213_reply->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
283 txt_213_reply->align(FL_ALIGN_TOP_LEFT);
284 txt_213_reply->callback(ics_changed);
285 txt_213_reply->when(FL_WHEN_CHANGED);
286
287 txt_213_s2 = new Fl_Input2(50, Y+351, 236, 24, _("Name"));
288 txt_213_s2->tooltip(_("Name of responder"));
289 txt_213_s2->box(FL_DOWN_BOX);
290 txt_213_s2->color((Fl_Color)FL_BACKGROUND2_COLOR);
291 txt_213_s2->selection_color((Fl_Color)FL_SELECTION_COLOR);
292 txt_213_s2->labeltype(FL_NORMAL_LABEL);
293 txt_213_s2->labelfont(0);
294 txt_213_s2->labelsize(14);
295 txt_213_s2->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
296 txt_213_s2->align(FL_ALIGN_LEFT);
297 txt_213_s2->callback(ics_changed);
298 txt_213_s2->when(FL_WHEN_CHANGED);
299
300 txt_213_p4 = new Fl_Input2(323, Y+351, 242, 24, _("Pos."));
301 txt_213_p4->tooltip(_("Position of responder"));
302 txt_213_p4->box(FL_DOWN_BOX);
303 txt_213_p4->color((Fl_Color)FL_BACKGROUND2_COLOR);
304 txt_213_p4->selection_color((Fl_Color)FL_SELECTION_COLOR);
305 txt_213_p4->labeltype(FL_NORMAL_LABEL);
306 txt_213_p4->labelfont(0);
307 txt_213_p4->labelsize(14);
308 txt_213_p4->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
309 txt_213_p4->align(FL_ALIGN_LEFT);
310 txt_213_p4->callback(ics_changed);
311 txt_213_p4->when(FL_WHEN_CHANGED);
312
313 tab_213_responder->end();
314 Fl_Group::current()->resizable(tab_213_responder);
315
316 tab_ics213_type->end();
317 Fl_Group::current()->resizable(tab_ics213_type);
318
319 tab_ics213->end();
320
321 tab_ics213->hide();
322 }
323