| 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_ics214 = (Fl_Group *)0; |
| 29 |
Fl_Tabs *tab_ics214_type = (Fl_Tabs *)0; |
| 30 |
Fl_Group *tab_214_1 = (Fl_Group *)0; |
| 31 |
Fl_Input2 *txt_214_incident = (Fl_Input2 *)0; |
| 32 |
Fl_Input2 *txt_214_date = (Fl_Input2 *)0; |
| 33 |
Fl_Input2 *txt_214_unit_name = (Fl_Input2 *)0; |
| 34 |
Fl_Input2 *txt_214_unit_leader = (Fl_Input2 *)0; |
| 35 |
Fl_Button *btn_214_date = (Fl_Button *)0; |
| 36 |
Fl_Input2 *txt_214_time = (Fl_Input2 *)0; |
| 37 |
Fl_Button *btn_214_time = (Fl_Button *)0; |
| 38 |
|
| 39 |
Fl_Input2 *txt_214_op_period = (Fl_Input2 *)0; |
| 40 |
Fl_Input2 *txt_214_prepared_by = (Fl_Input2 *)0; |
| 41 |
Fl_Group *tab_214_2 = (Fl_Group *)0; |
| 42 |
Fl_Input2 *txt_214_roster_name[16]={(Fl_Input2 *)0}; |
| 43 |
Fl_Input2 *txt_214_roster_position[16]={(Fl_Input2 *)0}; |
| 44 |
Fl_Input2 *txt_214_roster_home_base[16]={(Fl_Input2 *)0}; |
| 45 |
Fl_Group *tab_214_3 = (Fl_Group *)0; |
| 46 |
Fl_Input2 *txt_214_activity_time[16]={(Fl_Input2 *)0}; |
| 47 |
Fl_Input2 *txt_214_activity_event[16]={(Fl_Input2 *)0}; |
| 48 |
|
| 49 |
static void cb_btn_214_date(Fl_Button*, void*) { |
| 50 |
cb_214_set_date(); |
| 51 |
} |
| 52 |
|
| 53 |
static void cb_btn_214_time(Fl_Button*, void*) { |
| 54 |
cb_214_set_time(); |
| 55 |
} |
| 56 |
|
| 57 |
|
| 58 |
void create_ics214_tab() |
| 59 |
{ |
| 60 |
int Y = tab_top; |
| 61 |
tab_ics214 = new Fl_Group(0, Y, 570, 390); |
| 62 |
tab_ics214->align(FL_ALIGN_TOP); |
| 63 |
|
| 64 |
tab_ics214_type = new Fl_Tabs(0, Y, 570, 387); |
| 65 |
tab_ics214_type->selection_color((Fl_Color)246); |
| 66 |
|
| 67 |
tab_214_1 = new Fl_Group(0, Y+25, 570, 360, _("Incident")); |
| 68 |
{ |
| 69 |
Fl_Group* o = new Fl_Group(2, Y+32, 566, 170); |
| 70 |
o->box(FL_ENGRAVED_FRAME); |
| 71 |
o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); |
| 72 |
|
| 73 |
txt_214_incident = new Fl_Input2(135, Y+38, 425, 24, _("Incident Name")); |
| 74 |
txt_214_incident->tooltip(_("Incident name")); |
| 75 |
txt_214_incident->box(FL_DOWN_BOX); |
| 76 |
txt_214_incident->color((Fl_Color)FL_BACKGROUND2_COLOR); |
| 77 |
txt_214_incident->selection_color((Fl_Color)FL_SELECTION_COLOR); |
| 78 |
txt_214_incident->labeltype(FL_NORMAL_LABEL); |
| 79 |
txt_214_incident->labelfont(0); |
| 80 |
txt_214_incident->labelsize(14); |
| 81 |
txt_214_incident->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); |
| 82 |
txt_214_incident->align(FL_ALIGN_LEFT); |
| 83 |
txt_214_incident->callback(ics_changed); |
| 84 |
txt_214_incident->when(FL_WHEN_CHANGED); |
| 85 |
|
| 86 |
txt_214_date = new Fl_Input2(135, Y+65, 155, 24, _("Date Prepared")); |
| 87 |
txt_214_date->tooltip(_("Date prepared")); |
| 88 |
txt_214_date->box(FL_DOWN_BOX); |
| 89 |
txt_214_date->color((Fl_Color)FL_BACKGROUND2_COLOR); |
| 90 |
txt_214_date->selection_color((Fl_Color)FL_SELECTION_COLOR); |
| 91 |
txt_214_date->labeltype(FL_NORMAL_LABEL); |
| 92 |
txt_214_date->labelfont(0); |
| 93 |
txt_214_date->labelsize(14); |
| 94 |
txt_214_date->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); |
| 95 |
txt_214_date->align(FL_ALIGN_LEFT); |
| 96 |
txt_214_date->callback(ics_changed); |
| 97 |
txt_214_date->when(FL_WHEN_CHANGED); |
| 98 |
|
| 99 |
btn_214_date = new Fl_Button(294, Y+67, 20, 20, _("...")); |
| 100 |
btn_214_date->tooltip(_("Set today")); |
| 101 |
btn_214_date->callback((Fl_Callback*)cb_btn_214_date); |
| 102 |
|
| 103 |
txt_214_time = new Fl_Input2(135, Y+90, 103, 24, _("Time Prepared")); |
| 104 |
txt_214_time->tooltip(_("Time prepared")); |
| 105 |
txt_214_time->box(FL_DOWN_BOX); |
| 106 |
txt_214_time->color((Fl_Color)FL_BACKGROUND2_COLOR); |
| 107 |
txt_214_time->selection_color((Fl_Color)FL_SELECTION_COLOR); |
| 108 |
txt_214_time->labeltype(FL_NORMAL_LABEL); |
| 109 |
txt_214_time->labelfont(0); |
| 110 |
txt_214_time->labelsize(14); |
| 111 |
txt_214_time->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); |
| 112 |
txt_214_time->align(FL_ALIGN_LEFT); |
| 113 |
txt_214_time->callback(ics_changed); |
| 114 |
txt_214_time->when(FL_WHEN_CHANGED); |
| 115 |
|
| 116 |
btn_214_time = new Fl_Button(247, Y+92, 20, 20, _("...")); |
| 117 |
btn_214_time->tooltip(_("Set time now")); |
| 118 |
btn_214_time->callback((Fl_Callback*)cb_btn_214_time); |
| 119 |
|
| 120 |
txt_214_unit_name = new Fl_Input2(135, Y+115, 425, 24, _("Unit Name")); |
| 121 |
txt_214_unit_name->tooltip(_("Name / Designation")); |
| 122 |
txt_214_unit_name->box(FL_DOWN_BOX); |
| 123 |
txt_214_unit_name->color((Fl_Color)FL_BACKGROUND2_COLOR); |
| 124 |
txt_214_unit_name->selection_color((Fl_Color)FL_SELECTION_COLOR); |
| 125 |
txt_214_unit_name->labeltype(FL_NORMAL_LABEL); |
| 126 |
txt_214_unit_name->labelfont(0); |
| 127 |
txt_214_unit_name->labelsize(14); |
| 128 |
txt_214_unit_name->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); |
| 129 |
txt_214_unit_name->align(FL_ALIGN_LEFT); |
| 130 |
txt_214_unit_name->callback(ics_changed); |
| 131 |
txt_214_unit_name->when(FL_WHEN_CHANGED); |
| 132 |
|
| 133 |
txt_214_unit_leader = new Fl_Input2(135, Y+140, 425, 24, _("Unit leader")); |
| 134 |
txt_214_unit_leader->tooltip(_("Name and Position")); |
| 135 |
txt_214_unit_leader->box(FL_DOWN_BOX); |
| 136 |
txt_214_unit_leader->color((Fl_Color)FL_BACKGROUND2_COLOR); |
| 137 |
txt_214_unit_leader->selection_color((Fl_Color)FL_SELECTION_COLOR); |
| 138 |
txt_214_unit_leader->labeltype(FL_NORMAL_LABEL); |
| 139 |
txt_214_unit_leader->labelfont(0); |
| 140 |
txt_214_unit_leader->labelsize(14); |
| 141 |
txt_214_unit_leader->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); |
| 142 |
txt_214_unit_leader->align(FL_ALIGN_LEFT); |
| 143 |
txt_214_unit_leader->callback(ics_changed); |
| 144 |
txt_214_unit_leader->when(FL_WHEN_CHANGED); |
| 145 |
|
| 146 |
txt_214_op_period = new Fl_Input2(135, Y+165, 425, 24, _("Oper\' Period")); |
| 147 |
txt_214_op_period->tooltip(_("Date / Time")); |
| 148 |
txt_214_op_period->box(FL_DOWN_BOX); |
| 149 |
txt_214_op_period->color((Fl_Color)FL_BACKGROUND2_COLOR); |
| 150 |
txt_214_op_period->selection_color((Fl_Color)FL_SELECTION_COLOR); |
| 151 |
txt_214_op_period->labeltype(FL_NORMAL_LABEL); |
| 152 |
txt_214_op_period->labelfont(0); |
| 153 |
txt_214_op_period->labelsize(14); |
| 154 |
txt_214_op_period->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); |
| 155 |
txt_214_op_period->align(FL_ALIGN_LEFT); |
| 156 |
txt_214_op_period->callback(ics_changed); |
| 157 |
txt_214_op_period->when(FL_WHEN_CHANGED); |
| 158 |
|
| 159 |
o->end(); |
| 160 |
} |
| 161 |
|
| 162 |
{ |
| 163 |
Fl_Group* o = new Fl_Group(2, Y+203, 566, 35); |
| 164 |
o->box(FL_ENGRAVED_FRAME); |
| 165 |
|
| 166 |
txt_214_prepared_by = new Fl_Input2(135, Y+208, 425, 24, _("Prepared By")); |
| 167 |
txt_214_prepared_by->tooltip(_("Name and Position")); |
| 168 |
txt_214_prepared_by->box(FL_DOWN_BOX); |
| 169 |
txt_214_prepared_by->color((Fl_Color)FL_BACKGROUND2_COLOR); |
| 170 |
txt_214_prepared_by->selection_color((Fl_Color)FL_SELECTION_COLOR); |
| 171 |
txt_214_prepared_by->labeltype(FL_NORMAL_LABEL); |
| 172 |
txt_214_prepared_by->labelfont(0); |
| 173 |
txt_214_prepared_by->labelsize(14); |
| 174 |
txt_214_prepared_by->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); |
| 175 |
txt_214_prepared_by->align(FL_ALIGN_LEFT); |
| 176 |
txt_214_prepared_by->callback(ics_changed); |
| 177 |
txt_214_prepared_by->when(FL_WHEN_CHANGED); |
| 178 |
o->end(); |
| 179 |
} |
| 180 |
|
| 181 |
tab_214_1->end(); |
| 182 |
|
| 183 |
|
| 184 |
tab_214_2 = new Fl_Group(0, Y+25, 570, 360, _("Roster")); |
| 185 |
tab_214_2->hide(); |
| 186 |
|
| 187 |
Fl_Group *g1a = new Fl_Group(0, Y+32, 568, 353); |
| 188 |
g1a->box(FL_FLAT_BOX); |
| 189 |
|
| 190 |
Fl_Box* bx1a = new Fl_Box( |
| 191 |
5, Y+32, |
| 192 |
180, 20, _("Name")); |
| 193 |
bx1a->box(FL_THIN_DOWN_BOX); |
| 194 |
bx1a->color((Fl_Color)215); |
| 195 |
|
| 196 |
Fl_Box* bx2a = new Fl_Box( |
| 197 |
bx1a->x() + bx1a->w(), Y+32, |
| 198 |
180, 20, _("ICS Position")); |
| 199 |
bx2a->box(FL_THIN_DOWN_BOX); |
| 200 |
bx2a->color((Fl_Color)215); |
| 201 |
|
| 202 |
Fl_Box* bx3a = new Fl_Box( |
| 203 |
bx2a->x() + bx2a->w(), Y+32, |
| 204 |
180, 20, _("Home Base")); |
| 205 |
bx3a->box(FL_THIN_DOWN_BOX); |
| 206 |
bx3a->color((Fl_Color)215); |
| 207 |
|
| 208 |
Fl_Scroll* sc1 = new Fl_Scroll(5, Y+54, 560, 320); |
| 209 |
sc1->type(Fl_Scroll::VERTICAL_ALWAYS); |
| 210 |
sc1->box(FL_THIN_DOWN_BOX); |
| 211 |
for (int i = 0; i < 16; i++) { |
| 212 |
txt_214_roster_name[i] = new Fl_Input2(5, Y+54 + i*24, 180, 24); |
| 213 |
txt_214_roster_name[i]->tooltip(_("")); |
| 214 |
txt_214_roster_name[i]->callback(ics_changed); |
| 215 |
txt_214_roster_name[i]->when(FL_WHEN_CHANGED); |
| 216 |
|
| 217 |
txt_214_roster_position[i] = new Fl_Input2(186, Y+54 + i*24, 180, 24); |
| 218 |
txt_214_roster_position[i]->tooltip(_("")); |
| 219 |
txt_214_roster_position[i]->callback(ics_changed); |
| 220 |
txt_214_roster_position[i]->when(FL_WHEN_CHANGED); |
| 221 |
|
| 222 |
txt_214_roster_home_base[i] = new Fl_Input2(367, Y+54 + i*24, 180, 24); |
| 223 |
txt_214_roster_home_base[i]->tooltip(_("")); |
| 224 |
txt_214_roster_home_base[i]->callback(ics_changed); |
| 225 |
txt_214_roster_home_base[i]->when(FL_WHEN_CHANGED); |
| 226 |
} |
| 227 |
sc1->end(); |
| 228 |
g1a->end(); |
| 229 |
|
| 230 |
Fl_Group *g2a = new Fl_Group(568, Y+32, 1, 353); |
| 231 |
g2a->box(FL_FLAT_BOX); |
| 232 |
g2a->end(); |
| 233 |
|
| 234 |
tab_214_2->end(); |
| 235 |
tab_214_2->resizable(g2a); |
| 236 |
|
| 237 |
tab_214_3 = new Fl_Group(0, Y+25, 570, 360, _("Activity Log")); |
| 238 |
tab_214_3->hide(); |
| 239 |
|
| 240 |
Fl_Group *g1b = new Fl_Group(5, Y+32, 564, 353); |
| 241 |
g1b->box(FL_FLAT_BOX); |
| 242 |
|
| 243 |
Fl_Box* bx1b = new Fl_Box(5, Y+32, 100, 20, _("Time")); |
| 244 |
bx1b->box(FL_THIN_DOWN_BOX); |
| 245 |
bx1b->color((Fl_Color)215); |
| 246 |
|
| 247 |
Fl_Box* bx2b = new Fl_Box(bx1b->x() + bx1b->w(), Y+32, 440, 20, _("Major Events")); |
| 248 |
bx2b->box(FL_THIN_DOWN_BOX); |
| 249 |
bx2b->color((Fl_Color)215); |
| 250 |
|
| 251 |
Fl_Scroll* sc2 = new Fl_Scroll(4, Y+54, 560, 320); |
| 252 |
sc2->type(Fl_Scroll::VERTICAL_ALWAYS); |
| 253 |
sc2->box(FL_THIN_DOWN_BOX); |
| 254 |
for (int i = 0; i < 16; i++) { |
| 255 |
txt_214_activity_time[i] = new Fl_Input2(5, Y+54 + i*24, 100, 24); |
| 256 |
txt_214_activity_time[i]->tooltip(_("")); |
| 257 |
txt_214_activity_time[i]->callback(ics_changed); |
| 258 |
txt_214_activity_time[i]->when(FL_WHEN_CHANGED); |
| 259 |
|
| 260 |
txt_214_activity_event[i] = new Fl_Input2(106, Y+54 + i*24, 442, 24); |
| 261 |
txt_214_activity_event[i]->tooltip(_("")); |
| 262 |
txt_214_activity_event[i]->callback(ics_changed); |
| 263 |
txt_214_activity_event[i]->when(FL_WHEN_CHANGED); |
| 264 |
} |
| 265 |
sc2->end(); |
| 266 |
g1b->end(); |
| 267 |
|
| 268 |
Fl_Group *g2b = new Fl_Group(569, Y+32, 1, 353); |
| 269 |
g2b->box(FL_FLAT_BOX); |
| 270 |
g2b->end(); |
| 271 |
|
| 272 |
tab_214_3->end(); |
| 273 |
tab_214_3->resizable(g2b); |
| 274 |
|
| 275 |
tab_ics214_type->end(); |
| 276 |
Fl_Group::current()->resizable(tab_ics214_type); |
| 277 |
tab_ics214->end(); |
| 278 |
|
| 279 |
tab_ics214->hide(); |
| 280 |
} |