| 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_Group *tab_ics205a = (Fl_Group *)0; |
| 29 |
Fl_Tabs *tab_ics205a_type = (Fl_Tabs *)0; |
| 30 |
Fl_Group *tab_205a_1 = (Fl_Group *)0; |
| 31 |
Fl_Input2 *txt_205a_incident = (Fl_Input2 *)0; |
| 32 |
Fl_Input2 *txt_205a_date_fm = (Fl_Input2 *)0; |
| 33 |
Fl_Button *btn_205a_date_fm = (Fl_Button *)0; |
| 34 |
Fl_Input2 *txt_205a_date_to = (Fl_Input2 *)0; |
| 35 |
Fl_Button *btn_205a_date_to = (Fl_Button *)0; |
| 36 |
Fl_Input2 *txt_205a_time_fm = (Fl_Input2 *)0; |
| 37 |
Fl_Button *btn_205a_time_fm = (Fl_Button *)0; |
| 38 |
Fl_Input2 *txt_205a_time_to = (Fl_Input2 *)0; |
| 39 |
Fl_Button *btn_205a_time_to = (Fl_Button *)0; |
| 40 |
|
| 41 |
Fl_Input2 *txt_205a_prepared_by = (Fl_Input2 *)0; |
| 42 |
Fl_Input2 *txt_205a_preparer_position = (Fl_Input2 *)0; |
| 43 |
Fl_Input2 *txt_205a_preparer_date_time = (Fl_Input2 *)0; |
| 44 |
|
| 45 |
Fl_Group *tab_205a_2 = (Fl_Group *)0; |
| 46 |
Fl_Input2 *txt_205a_comm_group[32] = {(Fl_Input2 *)0}; |
| 47 |
Fl_Input2 *txt_205a_comm_position[32] = {(Fl_Input2 *)0}; |
| 48 |
Fl_Input2 *txt_205a_comm_name[32] = {(Fl_Input2 *)0}; |
| 49 |
Fl_Input2 *txt_205a_comm_info[32] = {(Fl_Input2 *)0}; |
| 50 |
|
| 51 |
void create_ics205a_tab() |
| 52 |
{ |
| 53 |
int Y = tab_top; |
| 54 |
|
| 55 |
tab_ics205a = new Fl_Group(0, Y, 570, 390); |
| 56 |
tab_ics205a->align(FL_ALIGN_TOP); |
| 57 |
|
| 58 |
tab_ics205a_type = new Fl_Tabs(0, Y+2, 570, 387); |
| 59 |
tab_ics205a_type->selection_color((Fl_Color)246); |
| 60 |
|
| 61 |
tab_205a_1 = new Fl_Group(0, Y+25, 570, 360, _("Incident")); |
| 62 |
{ |
| 63 |
Fl_Group* o = new Fl_Group(2, Y+32, 566, 135); |
| 64 |
o->box(FL_ENGRAVED_FRAME); |
| 65 |
o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); |
| 66 |
|
| 67 |
txt_205a_incident = new Fl_Input2(135, Y+38, 425, 24, _("Incident Name")); |
| 68 |
txt_205a_incident->tooltip(_("Incident name")); |
| 69 |
txt_205a_incident->box(FL_DOWN_BOX); |
| 70 |
txt_205a_incident->color((Fl_Color)FL_BACKGROUND2_COLOR); |
| 71 |
txt_205a_incident->selection_color((Fl_Color)FL_SELECTION_COLOR); |
| 72 |
txt_205a_incident->labeltype(FL_NORMAL_LABEL); |
| 73 |
txt_205a_incident->labelfont(0); |
| 74 |
txt_205a_incident->labelsize(14); |
| 75 |
txt_205a_incident->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); |
| 76 |
txt_205a_incident->align(FL_ALIGN_LEFT); |
| 77 |
txt_205a_incident->callback(ics_changed); |
| 78 |
txt_205a_incident->when(FL_WHEN_CHANGED); |
| 79 |
|
| 80 |
txt_205a_date_fm = new Fl_Input2(135, Y+65, 155, 24, _("From date")); |
| 81 |
txt_205a_date_fm->tooltip(_("Starting date")); |
| 82 |
txt_205a_date_fm->box(FL_DOWN_BOX); |
| 83 |
txt_205a_date_fm->color((Fl_Color)FL_BACKGROUND2_COLOR); |
| 84 |
txt_205a_date_fm->selection_color((Fl_Color)FL_SELECTION_COLOR); |
| 85 |
txt_205a_date_fm->labeltype(FL_NORMAL_LABEL); |
| 86 |
txt_205a_date_fm->labelfont(0); |
| 87 |
txt_205a_date_fm->labelsize(14); |
| 88 |
txt_205a_date_fm->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); |
| 89 |
txt_205a_date_fm->align(FL_ALIGN_LEFT); |
| 90 |
txt_205a_date_fm->callback(ics_changed); |
| 91 |
txt_205a_date_fm->when(FL_WHEN_CHANGED); |
| 92 |
|
| 93 |
btn_205a_date_fm = new Fl_Button(294, Y+67, 20, 20, _("...")); |
| 94 |
btn_205a_date_fm->tooltip(_("Set today")); |
| 95 |
btn_205a_date_fm->callback((Fl_Callback*)cb_205a_set_date_fm); |
| 96 |
|
| 97 |
txt_205a_time_fm = new Fl_Input2(135, Y+90, 103, 24, _("From time")); |
| 98 |
txt_205a_time_fm->tooltip(_("Starting time")); |
| 99 |
txt_205a_time_fm->box(FL_DOWN_BOX); |
| 100 |
txt_205a_time_fm->color((Fl_Color)FL_BACKGROUND2_COLOR); |
| 101 |
txt_205a_time_fm->selection_color((Fl_Color)FL_SELECTION_COLOR); |
| 102 |
txt_205a_time_fm->labeltype(FL_NORMAL_LABEL); |
| 103 |
txt_205a_time_fm->labelfont(0); |
| 104 |
txt_205a_time_fm->labelsize(14); |
| 105 |
txt_205a_time_fm->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); |
| 106 |
txt_205a_time_fm->align(FL_ALIGN_LEFT); |
| 107 |
txt_205a_time_fm->callback(ics_changed); |
| 108 |
txt_205a_time_fm->when(FL_WHEN_CHANGED); |
| 109 |
|
| 110 |
btn_205a_time_fm = new Fl_Button(247, Y+92, 20, 20, _("...")); |
| 111 |
btn_205a_time_fm->tooltip(_("Set time now")); |
| 112 |
btn_205a_time_fm->callback((Fl_Callback*)cb_205a_set_time_fm); |
| 113 |
|
| 114 |
txt_205a_date_to = new Fl_Input2(135, Y+115, 155, 24, _("To date")); |
| 115 |
txt_205a_date_to->tooltip(_("Ending date")); |
| 116 |
txt_205a_date_to->box(FL_DOWN_BOX); |
| 117 |
txt_205a_date_to->color((Fl_Color)FL_BACKGROUND2_COLOR); |
| 118 |
txt_205a_date_to->selection_color((Fl_Color)FL_SELECTION_COLOR); |
| 119 |
txt_205a_date_to->labeltype(FL_NORMAL_LABEL); |
| 120 |
txt_205a_date_to->labelfont(0); |
| 121 |
txt_205a_date_to->labelsize(14); |
| 122 |
txt_205a_date_to->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); |
| 123 |
txt_205a_date_to->align(FL_ALIGN_LEFT); |
| 124 |
txt_205a_date_to->callback(ics_changed); |
| 125 |
txt_205a_date_to->when(FL_WHEN_CHANGED); |
| 126 |
|
| 127 |
btn_205a_date_to = new Fl_Button(294, Y+117, 20, 20, _("...")); |
| 128 |
btn_205a_date_to->tooltip(_("Set today")); |
| 129 |
btn_205a_date_to->callback((Fl_Callback*)cb_205a_set_date_to); |
| 130 |
|
| 131 |
txt_205a_time_to = new Fl_Input2(135, Y+140, 103, 24, _("To time")); |
| 132 |
txt_205a_time_to->tooltip(_("Ending time")); |
| 133 |
txt_205a_time_to->box(FL_DOWN_BOX); |
| 134 |
txt_205a_time_to->color((Fl_Color)FL_BACKGROUND2_COLOR); |
| 135 |
txt_205a_time_to->selection_color((Fl_Color)FL_SELECTION_COLOR); |
| 136 |
txt_205a_time_to->labeltype(FL_NORMAL_LABEL); |
| 137 |
txt_205a_time_to->labelfont(0); |
| 138 |
txt_205a_time_to->labelsize(14); |
| 139 |
txt_205a_time_to->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); |
| 140 |
txt_205a_time_to->align(FL_ALIGN_LEFT); |
| 141 |
txt_205a_time_to->callback(ics_changed); |
| 142 |
txt_205a_time_to->when(FL_WHEN_CHANGED); |
| 143 |
|
| 144 |
btn_205a_time_to = new Fl_Button(247, Y+142, 20, 20, _("...")); |
| 145 |
btn_205a_time_to->tooltip(_("Set time now")); |
| 146 |
btn_205a_time_to->callback((Fl_Callback*)cb_205a_set_time_to); |
| 147 |
|
| 148 |
o->end(); |
| 149 |
} // Fl_Group* o |
| 150 |
|
| 151 |
{ |
| 152 |
Fl_Group* o = new Fl_Group(2, Y+167, 566, 80); |
| 153 |
o->box(FL_ENGRAVED_FRAME); |
| 154 |
|
| 155 |
txt_205a_prepared_by = new Fl_Input2(135, Y+170, 425, 24, _("Prepared by")); |
| 156 |
txt_205a_prepared_by->tooltip(_("Name of preparer")); |
| 157 |
txt_205a_prepared_by->box(FL_DOWN_BOX); |
| 158 |
txt_205a_prepared_by->color((Fl_Color)FL_BACKGROUND2_COLOR); |
| 159 |
txt_205a_prepared_by->selection_color((Fl_Color)FL_SELECTION_COLOR); |
| 160 |
txt_205a_prepared_by->labeltype(FL_NORMAL_LABEL); |
| 161 |
txt_205a_prepared_by->labelfont(0); |
| 162 |
txt_205a_prepared_by->labelsize(14); |
| 163 |
txt_205a_prepared_by->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); |
| 164 |
txt_205a_prepared_by->align(FL_ALIGN_LEFT); |
| 165 |
txt_205a_prepared_by->callback(ics_changed); |
| 166 |
txt_205a_prepared_by->when(FL_WHEN_CHANGED); |
| 167 |
|
| 168 |
txt_205a_preparer_position = new Fl_Input2(135, Y+195, 425, 24, _("Position")); |
| 169 |
txt_205a_preparer_position->tooltip(_("Preparer's Position")); |
| 170 |
txt_205a_preparer_position->box(FL_DOWN_BOX); |
| 171 |
txt_205a_preparer_position->color((Fl_Color)FL_BACKGROUND2_COLOR); |
| 172 |
txt_205a_preparer_position->selection_color((Fl_Color)FL_SELECTION_COLOR); |
| 173 |
txt_205a_preparer_position->labeltype(FL_NORMAL_LABEL); |
| 174 |
txt_205a_preparer_position->labelfont(0); |
| 175 |
txt_205a_preparer_position->labelsize(14); |
| 176 |
txt_205a_preparer_position->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); |
| 177 |
txt_205a_preparer_position->align(FL_ALIGN_LEFT); |
| 178 |
txt_205a_preparer_position->callback(ics_changed); |
| 179 |
txt_205a_preparer_position->when(FL_WHEN_CHANGED); |
| 180 |
|
| 181 |
txt_205a_preparer_date_time = new Fl_Input2(135, Y+220, 425, 24, _("Date/Time")); |
| 182 |
txt_205a_preparer_date_time->tooltip(_("Date / Time")); |
| 183 |
txt_205a_preparer_date_time->box(FL_DOWN_BOX); |
| 184 |
txt_205a_preparer_date_time->color((Fl_Color)FL_BACKGROUND2_COLOR); |
| 185 |
txt_205a_preparer_date_time->selection_color((Fl_Color)FL_SELECTION_COLOR); |
| 186 |
txt_205a_preparer_date_time->labeltype(FL_NORMAL_LABEL); |
| 187 |
txt_205a_preparer_date_time->labelfont(0); |
| 188 |
txt_205a_preparer_date_time->labelsize(14); |
| 189 |
txt_205a_preparer_date_time->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); |
| 190 |
txt_205a_preparer_date_time->align(FL_ALIGN_LEFT); |
| 191 |
txt_205a_preparer_date_time->callback(ics_changed); |
| 192 |
txt_205a_preparer_date_time->when(FL_WHEN_CHANGED); |
| 193 |
|
| 194 |
o->end(); |
| 195 |
} // Fl_Group* o |
| 196 |
|
| 197 |
tab_205a_1->end(); |
| 198 |
|
| 199 |
tab_205a_2 = new Fl_Group(0, Y+25, 570, 360, _("Basic Info")); |
| 200 |
tab_205a_2->hide(); |
| 201 |
|
| 202 |
Fl_Group *g1 = new Fl_Group(5, Y+28, 560, 340); |
| 203 |
g1->box(FL_FLAT_BOX); |
| 204 |
|
| 205 |
Fl_Box* bx1 = new Fl_Box(5, Y+28, 120, 20, _("Assignment")); |
| 206 |
bx1->box(FL_DOWN_BOX); |
| 207 |
bx1->color((Fl_Color)215); |
| 208 |
|
| 209 |
Fl_Box* bx2 = new Fl_Box(bx1->x() + bx1->w(), Y+28, 150, 20, _("Name")); |
| 210 |
bx2->box(FL_DOWN_BOX); |
| 211 |
bx2->color((Fl_Color)215); |
| 212 |
|
| 213 |
Fl_Box* bx3 = new Fl_Box(bx2->x() + bx2->w(), Y+28, 270, 20, _("Method of Contact")); |
| 214 |
bx3->box(FL_DOWN_BOX); |
| 215 |
bx3->color((Fl_Color)215); |
| 216 |
|
| 217 |
Fl_Scroll* sc = new Fl_Scroll(4, Y+48, 560, 320); |
| 218 |
sc->type(2); |
| 219 |
sc->box(FL_DOWN_BOX); |
| 220 |
sc->color((Fl_Color)215); |
| 221 |
for (int i = 0; i < 32; i++) { |
| 222 |
|
| 223 |
txt_205a_comm_position[i] = new Fl_Input2(5, Y+50 + i*24, 120, 24); |
| 224 |
txt_205a_comm_position[i]->tooltip(_("")); |
| 225 |
txt_205a_comm_position[i]->box(FL_DOWN_BOX); |
| 226 |
txt_205a_comm_position[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); |
| 227 |
txt_205a_comm_position[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); |
| 228 |
txt_205a_comm_position[i]->labeltype(FL_NORMAL_LABEL); |
| 229 |
txt_205a_comm_position[i]->labelfont(0); |
| 230 |
txt_205a_comm_position[i]->labelsize(14); |
| 231 |
txt_205a_comm_position[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); |
| 232 |
txt_205a_comm_position[i]->align(FL_ALIGN_CENTER); |
| 233 |
txt_205a_comm_position[i]->callback(ics_changed); |
| 234 |
txt_205a_comm_position[i]->when(FL_WHEN_CHANGED); |
| 235 |
|
| 236 |
txt_205a_comm_name[i] = new Fl_Input2(126, Y+50 + i*24, 150, 24); |
| 237 |
txt_205a_comm_name[i]->tooltip(_("")); |
| 238 |
txt_205a_comm_name[i]->box(FL_DOWN_BOX); |
| 239 |
txt_205a_comm_name[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); |
| 240 |
txt_205a_comm_name[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); |
| 241 |
txt_205a_comm_name[i]->labeltype(FL_NORMAL_LABEL); |
| 242 |
txt_205a_comm_name[i]->labelfont(0); |
| 243 |
txt_205a_comm_name[i]->labelsize(14); |
| 244 |
txt_205a_comm_name[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); |
| 245 |
txt_205a_comm_name[i]->align(FL_ALIGN_CENTER); |
| 246 |
txt_205a_comm_name[i]->callback(ics_changed); |
| 247 |
txt_205a_comm_name[i]->when(FL_WHEN_CHANGED); |
| 248 |
|
| 249 |
txt_205a_comm_info[i] = new Fl_Input2(277, Y+50 + i*24, 270, 24); |
| 250 |
txt_205a_comm_info[i]->tooltip(_("")); |
| 251 |
txt_205a_comm_info[i]->box(FL_DOWN_BOX); |
| 252 |
txt_205a_comm_info[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); |
| 253 |
txt_205a_comm_info[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); |
| 254 |
txt_205a_comm_info[i]->labeltype(FL_NORMAL_LABEL); |
| 255 |
txt_205a_comm_info[i]->labelfont(0); |
| 256 |
txt_205a_comm_info[i]->labelsize(14); |
| 257 |
txt_205a_comm_info[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); |
| 258 |
txt_205a_comm_info[i]->align(FL_ALIGN_CENTER); |
| 259 |
txt_205a_comm_info[i]->callback(ics_changed); |
| 260 |
txt_205a_comm_info[i]->when(FL_WHEN_CHANGED); |
| 261 |
} |
| 262 |
sc->end(); |
| 263 |
g1->end(); |
| 264 |
Fl_Group *g2 = new Fl_Group(565, Y+32, 1, 350); |
| 265 |
g2->box(FL_FLAT_BOX); |
| 266 |
g2->end(); |
| 267 |
|
| 268 |
tab_205a_2->end(); |
| 269 |
tab_205a_2->resizable(g2); |
| 270 |
|
| 271 |
tab_ics205a_type->end(); |
| 272 |
Fl_Group::current()->resizable(tab_ics205a_type); |
| 273 |
tab_ics205a->end(); |
| 274 |
|
| 275 |
tab_ics205a->hide(); |
| 276 |
} |