# data file for the Fltk User Interface Designer (fluid)
version 1.0110 
i18n_type 1 
i18n_include "gettext.h" 
i18n_function _ 
header_name {.h} 
code_name {.cxx}
decl {\#include <config.h>} {} 

decl {\#include <FL/Fl_Tooltip.H>} {} 

decl {\#include <FL/filename.H>} {} 

decl {\#include "main.h"} {} 

decl {\#include "fl_digi.h"} {} 

decl {\#include "dl_fldigi.h"} {} 

decl {\#include "dl_fldigi_gps.h"} {} 

decl {\#include "soundconf.h"} {} 

decl {\#include "globals.h"} {public
} 

decl {\#include "modem.h"} {public
} 

decl {\#include "configuration.h"} {public
} 

decl {\#include "combo.h"} {public
} 

decl {\#include "colorsfonts.h"} {} 

decl {\#include "waterfall.h"} {} 

decl {\#include "rigxml.h"} {} 

decl {\#include "lookupcall.h"} {} 

decl {\#include "icons.h"} {} 

decl {\#include "Viewer.h"} {} 

decl {\#include "pskrep.h"} {global
} 

decl {\#include "flinput2.h"} {public
} 

decl {\#include "flslider2.h"} {public
} 

decl {\#include "flmisc.h"} {public
} 

decl {\#include "logsupport.h"} {} 

decl {\#include "notify.h"} {} 

decl {\#include "debug.h"} {} 

decl {\#if USE_HAMLIB
  \#include "hamlib.h"
\#endif} {} 

decl {Fl_Double_Window *dlgConfig;} {public
} 

decl {Mode_Browser* mode_browser;} {public
} 

Function {set_qrz_buttons(Fl_Button* b)} {open return_type void
} {
  code {Fl_Button* qrzb[] = { btnQRZnotavailable, btnQRZcdrom, btnQRZonline,
                              btnQRZsub, btnHamcall, btnHAMCALLonline,
                              btnCALLOOK};

for (size_t i = 0; i < sizeof(qrzb)/sizeof(*qrzb); i++)
	qrzb[i]->value(b == qrzb[i]);} {}
} 

Function {ConfigureDialog()} {open
} {
  code {static const char szShifts[]  = "23|85|160|170|182|200|240|350|425|600|_850|Custom";
static const char szBauds[]  = "45|45.45|50|56|75|100|110|150|200|300|600|1200";
static const char szSelBits[] = "5 (baudot)|7 (ascii)|8 (ascii)";
static const char szParity[]  = "none|even|odd|zero|one";
static const char szStopBits[] = "1|1.5|2";
static const char szOliviaTones[] = "2|4|8|16|32|64|128|256";
static const char szOliviaBandwidth[] = "125|250|500|1000|2000";
static const char szContestiaTones[] = "2|4|8|16|32|64|128|256";
static const char szContestiaBandwidth[] = "125|250|500|1000|2000";
static const char szBaudRates[] = "300|600|1200|2400|4800|9600|19200|38400|57600|115200|230400|460800";
static const char szProsigns[] = "~|%|&|+|=|{|}|<|>|[|]| ";} {}
  Fl_Window {} {
    label {Fldigi configuration} open
    xywh {740 84 500 400} type Double color 45 selection_color 51 labelsize 18 align 80 non_modal visible
  } {
    Fl_Tabs tabsConfigure {open
      xywh {-3 0 520 435} color 50 selection_color 50
    } {
      Fl_Group tabOperator {
        label Operator
        callback {progdefaults.changed = true;} open
        tooltip {Operator information} xywh {0 25 500 345} when 1 hide
      } {
        Fl_Group {} {
          label Station open
          xywh {5 35 490 275} box ENGRAVED_FRAME align 21
        } {
          Fl_Input inpMyCallsign {
            label {Callsign:}
            callback {if (progdefaults.THORsecText.empty()) {
progdefaults.THORsecText = o->value();
progdefaults.THORsecText.append(" ");
txtTHORSecondary->value(progdefaults.THORsecText.c_str());
}
if (progdefaults.secText.empty()) {
progdefaults.secText = o->value();
progdefaults.secText.append(" ");
txtSecondary->value(progdefaults.secText.c_str());
}
progdefaults.myCall = o->value();
update_main_title();
notify_change_callsign();
progdefaults.changed = true;}
            tooltip {Operators callsign} xywh {110 64 110 24}
            code0 {inpMyCallsign->labelsize(FL_NORMAL_SIZE);}
            class Fl_Input2
          }
          Fl_Input inpMyName {
            label {Name:}
            callback {progdefaults.myName = o->value();
progdefaults.changed = true;}
            tooltip {Operators name} xywh {290 64 140 24}
            code0 {inpMyName->labelsize(FL_NORMAL_SIZE);}
            class Fl_Input2
          }
          Fl_Input inpMyQth {
            label {QTH:}
            callback {progdefaults.myQth = o->value();
progdefaults.changed = true;}
            tooltip {Operators QTH} xywh {110 98 320 24}
            code0 {inpMyQth->labelsize(FL_NORMAL_SIZE);}
            class Fl_Input2
          }
          Fl_Input inpMyLocator {
            label {Locator:}
            callback {progdefaults.myLocator = o->value();
progdefaults.changed = true;}
            tooltip {Maidenhead locator as in EM64qv} xywh {110 133 85 24}
            code0 {inpMyLocator->labelsize(FL_NORMAL_SIZE);}
            class Fl_Input2
          }
          Fl_Input inpMyAntenna {
            label {Antenna:}
            callback {progdefaults.myAntenna = o->value();
progdefaults.changed = true;}
            tooltip {Short description of antenna} xywh {110 172 320 24}
            code0 {inpMyAntenna->labelsize(FL_NORMAL_SIZE);}
            class Fl_Input2
          }
          Fl_Input MyRadio {
            label {Radio:}
            callback {progdefaults.myRadio = o->value();
progdefaults.changed = true;}
            xywh {115 205 320 25}
            code0 {o->value(progdefaults.myRadio.c_str());}
          }
          Fl_Input MyLat {
            label {Lat (DD):}
            callback {progdefaults.myLat = o->value();
progdefaults.changed = true;}
            tooltip {DD.DDDD} xywh {110 240 320 25}
            code0 {o->value(progdefaults.myLat.c_str());}
          }
          Fl_Input MyLon {
            label {Long (DD):}
            callback {progdefaults.myLon = o->value();
progdefaults.changed = true;}
            tooltip {DD.DDDD} xywh {110 275 320 25}
            code0 {o->value(progdefaults.myLon.c_str());}
          }
        }
        Fl_Group grpNoise {
          label {Test Signal - Do NOT use with transmitter} open
          xywh {5 203 490 165} box ENGRAVED_FRAME align 21 hide
        } {
          Fl_Check_Button btnNoiseOn {
            label {Noise on}
            callback {progdefaults.noise = o->value();}
            xywh {43 241 70 15} down_box DOWN_BOX
            code0 {o->value(progdefaults.noise);}
          }
          Fl_Counter noiseDB {
            label dB
            callback {progdefaults.s2n = o->value();}
            xywh {40 279 89 21} type Simple align 4 minimum -18 maximum 60 step 1 value 20
            code0 {o->value(progdefaults.s2n);}
            class Fl_Counter2
          }
        }
      }
      Fl_Group tabUI {
        label UI
        xywh {-3 25 508 345} hide
      } {
        Fl_Tabs tabsUI {open
          xywh {-3 25 503 345} selection_color 50
        } {
          Fl_Group tabUserInterface {
            label General open
            xywh {0 50 500 320}
          } {
            Fl_Group {} {open
              xywh {5 60 490 301} box ENGRAVED_FRAME
            } {
              Fl_Check_Button btnShowTooltips {
                label {Show tooltips}
                callback {progdefaults.tooltips = o->value();
Fl_Tooltip::enable(progdefaults.tooltips);
progdefaults.changed = true;}
                tooltip {Enable / disable tooltips} xywh {15 70 120 20} down_box DOWN_BOX value 1
                code0 {o->value(progdefaults.tooltips);}
              }
              Fl_Check_Button chkMenuIcons {
                label {Show menu icons}
                callback {progdefaults.menuicons = o->value();
toggle_icon_labels();
progdefaults.changed = true;}
                tooltip {Enable / disable icons on menus} xywh {15 100 150 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.menuicons);}
              }
              Fl_Choice mnuScheme {
                label {UI scheme}
                callback {progdefaults.ui_scheme = o->text();
    Fl::scheme(progdefaults.ui_scheme.c_str());

    progdefaults.changed = true;} open
                tooltip {Change application look and feel} xywh {250 70 80 20} down_box BORDER_BOX align 8
                code0 {mnuScheme->add("base");}
                code1 {mnuScheme->add("gtk+");}
                code2 {mnuScheme->add("plastic");}
                code3 {mnuScheme->value(mnuScheme->find_item(progdefaults.ui_scheme.c_str()));}
              } {}
              Fl_Button bVisibleModes {
                label {Visible modes}
                callback {mode_browser->label(o->label());
mode_browser->callback(toggle_visible_modes);
mode_browser->show(&progdefaults.visible_modes);
progdefaults.changed = true;}
                xywh {250 100 120 20}
              }
              Fl_Group {} {
                label {Text Capture} open
                xywh {9 277 481 80} align 21
              } {
                Fl_Check_Button btnRXClicks {
                  label {Double-click on RX text enters QSO data}
                  callback {progdefaults.rxtext_clicks_qso_data = o->value();
progdefaults.changed = true;}
                  tooltip {Enable if you cannot use the middle mouse button} xywh {125 314 305 20} down_box DOWN_BOX
                  code0 {o->value(progdefaults.rxtext_clicks_qso_data);}
                }
                Fl_Check_Button btnRXTooltips {
                  label {Show callsign tooltips in received text}
                  callback {progdefaults.rxtext_tooltips = o->value();
progdefaults.changed = true;}
                  tooltip {Popup info after a 2 second hover on a callsign} xywh {125 336 282 20} down_box DOWN_BOX
                  code0 {o->value(progdefaults.rxtext_tooltips);}
                }
                Fl_Input inpNonword {
                  label {Word delimiters}
                  callback {progdefaults.nonwordchars = o->value();
progdefaults.changed = true;}
                  tooltip {RX text QSO data entry is bounded by the non-word characters
defined here. Tab and newline are automatically included.} xywh {125 285 75 24} align 8 textfont 4
                  code0 {o->value(progdefaults.nonwordchars.c_str());}
                  code1 {o->labelsize(FL_NORMAL_SIZE);}
                  class Fl_Input2
                }
              }
            }
            Fl_Group {} {
              label {QSO logging} open
              xywh {8 130 484 146} box ENGRAVED_FRAME align 21
            } {
              Fl_Check_Button btnNagMe {
                label {Prompt to save log}
                callback {progdefaults.NagMe=o->value();
progdefaults.changed = true;}
                tooltip {Bug me about saving log entries} xywh {125 139 155 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.NagMe);}
              }
              Fl_Check_Button btnClearOnSave {
                label {Clear on save}
                callback {progdefaults.ClearOnSave=o->value();
progdefaults.changed = true;}
                tooltip {Clear log entries after saving or using macro <LOG>} xywh {125 164 125 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.ClearOnSave);}
              }
              Fl_Check_Button btnAutoFillQSO {
                label {Auto-fill Country and Azimuth}
                callback {progdefaults.autofill_qso_fields = o->value();
progdefaults.changed = true;}
                tooltip {Fill in Country / Azimuth using cty.dat information} xywh {125 189 225 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.autofill_qso_fields);}
              }
              Fl_Check_Button btnCallUpperCase {
                label {Convert callsign field to upper case}
                callback {progdefaults.calluppercase = o->value();
progdefaults.changed = true;}
                tooltip {Force callsign field to UPPERCASE} xywh {125 214 282 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.calluppercase);}
              }
              Fl_Input inpMyPower {
                label {Transmit Power}
                callback {progdefaults.mytxpower = o->value();
progdefaults.changed = true;}
                tooltip {Tx power used for logbook entries} xywh {125 240 50 24} align 8
                code0 {o->value(progdefaults.mytxpower.c_str());}
                code1 {o->labelsize(FL_NORMAL_SIZE);}
                class Fl_Input2
              }
            }
          }
          Fl_Group tabContest {
            label Contest
            xywh {0 50 500 320} hide
          } {
            Fl_Group {} {
              label Exchanges open
              xywh {5 60 490 80} box ENGRAVED_FRAME align 21
            } {
              Fl_Box lblSend {
                label {Send:}
                xywh {37 95 55 20}
              }
              Fl_Input inpSend1 {
                label {Exchange Out}
                callback {progdefaults.myXchg=o->value();
progdefaults.changed = true;}
                tooltip {free form exchange} xywh {95 95 140 20} align 1
                code0 {o->value(progdefaults.myXchg.c_str());}
                code1 {inpSend1->labelsize(FL_NORMAL_SIZE);}
                class Fl_Input2
              }
              Fl_Check_Button btn599 {
                label {RST always 599}
                callback {progdefaults.fixed599 = o->value();
progdefaults.changed = true;}
                tooltip {Force RST in/out to 599} xywh {310 80 130 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.fixed599);}
              }
              Fl_Check_Button btnCutNbrs {
                label {Send CW cut numbers}
                callback {progdefaults.cutnbrs=o->value();
progdefaults.changed = true;}
                tooltip {0 = T; 9 = N} xywh {310 110 180 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.cutnbrs);}
              }
            }
            Fl_Group {} {
              label {Serial number} open
              xywh {5 150 490 65} box ENGRAVED_FRAME align 21
            } {
              Fl_Check_Button btnUseLeadingZeros {
                label {Use leading zeros}
                callback {progdefaults.UseLeadingZeros = o->value();
progdefaults.changed = true;}
                tooltip {Insert leading zeros into Xmtd serial number} xywh {26 176 154 20} down_box DOWN_BOX value 1
              }
              Fl_Value_Input nbrContestStart {
                label Start
                callback {progdefaults.ContestStart = (int)o->value();
progdefaults.changed = true;}
                tooltip {Starting number} xywh {221 176 45 20} align 1 maximum 10000 step 1
                code0 {o->value(progdefaults.ContestStart);}
                class Fl_Value_Input2
              }
              Fl_Value_Input nbrContestDigits {
                label Digits
                callback {progdefaults.ContestDigits = (int)o->value();
progdefaults.changed = true;}
                tooltip {Number of digits in serial number} xywh {303 175 45 20} align 1 minimum 1 maximum 5 step 1 value 3
                class Fl_Value_Input2
              }
              Fl_Button btnResetSerNbr {
                label Reset
                callback {cb_ResetSerNbr();}
                tooltip {Initialize the QSO logging fields} xywh {395 176 70 20}
              }
            }
            Fl_Group {} {
              label {Duplicate check, CALL plus} open
              xywh {5 225 490 130} box ENGRAVED_FRAME align 21
            } {
              Fl_Light_Button btnDupCheckOn {
                label {On/Off}
                callback {progdefaults.EnableDupCheck = o->value();
progdefaults.changed = true;}
                tooltip {Check for duplicates} xywh {15 255 74 20} selection_color 2
                code0 {o->value(progdefaults.EnableDupCheck);}
              }
              Fl_Check_Button btnDupBand {
                label Band
                callback {progdefaults.dupband = o->value();
progdefaults.changed = true;}
                tooltip {Bands must match} xywh {156 255 70 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.dupband);}
              }
              Fl_Check_Button btnDupMode {
                label Mode
                callback {progdefaults.dupmode = o->value();
progdefaults.changed = true;}
                tooltip {Mode must match} xywh {276 255 70 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.dupmode);}
              }
              Fl_Check_Button btnDupState {
                label State
                callback {progdefaults.dupstate = o->value();
progdefaults.changed = true;}
                tooltip {State must match} xywh {395 255 70 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.dupstate);}
              }
              Fl_Check_Button btnDupXchg1 {
                label {Exchange In}
                callback {progdefaults.dupxchg1 = o->value();
progdefaults.changed = true;}
                tooltip {free form 1 must match} xywh {156 283 105 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.dupxchg1);}
              }
              Fl_Check_Button btnDupTimeSpan {
                label {Time span over}
                callback {progdefaults.duptimespan=(int)o->value();
progdefaults.changed = true;}
                tooltip {QSO must not occur within a time period of} xywh {156 313 129 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.duptimespan);}
              }
              Fl_Value_Input nbrTimeSpan {
                label minutes
                callback {progdefaults.timespan = (int)o->value();
progdefaults.changed = true;}
                tooltip {Enter time span in minutes} xywh {285 313 53 20} align 8 maximum 1440 step 1 value 120
                code0 {o->value(progdefaults.timespan);}
                class Fl_Value_Input2
              }
              Fl_Button btnDupColor {
                label {Dup Color}
                callback {fl_color_chooser("Dup Check", 
  progdefaults.dup_color.R, 
  progdefaults.dup_color.G, 
  progdefaults.dup_color.B);
o->color(
  fl_rgb_color(
    progdefaults.dup_color.R,
    progdefaults.dup_color.G,
    progdefaults.dup_color.B));
o->redraw();
progdefaults.changed = true;}
                tooltip {Left click to select dup color} xywh {15 282 90 22} box DOWN_BOX down_box DOWN_BOX color 7 selection_color 7
                code0 {o->color(fl_rgb_color(progdefaults.dup_color.R, progdefaults.dup_color.G, progdefaults.dup_color.B));}
                code1 {\#include <FL/Fl_Color_Chooser.H>}
              }
            }
          }
          Fl_Group tabWF_UI {
            label {Operator Controls}
            xywh {0 50 500 320} hide
          } {
            Fl_Box {} {
              label {Enable check box to show each respective operator control}
              xywh {31 65 446 25} box FLAT_BOX align 16
            }
            Fl_Check_Button btnWF_UIrev {
              label Reverse
              callback {progdefaults.WF_UIrev = o->value();
progdefaults.changed = true;
WF_UI();}
              xywh {58 98 150 20} down_box DOWN_BOX value 1
              code0 {o->value(progdefaults.WF_UIrev);}
            }
            Fl_Check_Button btnWF_UIx1 {
              label {WF Magnification}
              callback {progdefaults.WF_UIx1 = o->value();
progdefaults.changed = true;
WF_UI();}
              xywh {277 98 162 20} down_box DOWN_BOX value 1
              code0 {o->value(progdefaults.WF_UIx1);}
            }
            Fl_Check_Button btnWF_UIwfcarrier {
              label {WF carrier}
              callback {progdefaults.WF_UIwfcarrier = o->value();
progdefaults.changed = true;
WF_UI();}
              xywh {58 136 150 20} down_box DOWN_BOX value 1
              code0 {o->value(progdefaults.WF_UIwfcarrier);}
            }
            Fl_Check_Button btnWF_UIwfshift {
              label {WF Shift Controls}
              callback {progdefaults.WF_UIwfshift = o->value();
progdefaults.changed = true;
WF_UI();}
              xywh {277 136 150 20} down_box DOWN_BOX value 1
              code0 {o->value(progdefaults.WF_UIwfshift);}
            }
            Fl_Check_Button btnWF_UIwfreflevel {
              label {WF ref level}
              callback {progdefaults.WF_UIwfreflevel = o->value();
progdefaults.changed = true;
WF_UI();}
              xywh {58 175 150 20} down_box DOWN_BOX value 1
              code0 {o->value(progdefaults.WF_UIwfreflevel);}
            }
            Fl_Check_Button btnWF_UIwfdrop {
              label {WF drop rate}
              callback {progdefaults.WF_UIwfdrop = o->value();
progdefaults.changed = true;
WF_UI();}
              xywh {277 175 150 20} down_box DOWN_BOX value 1
              code0 {o->value(progdefaults.WF_UIwfdrop);}
            }
            Fl_Check_Button btnWF_UIwfampspan {
              label {WF amp span}
              callback {progdefaults.WF_UIwfampspan = o->value();
progdefaults.changed = true;
WF_UI();}
              xywh {58 213 150 20} down_box DOWN_BOX value 1
              code0 {o->value(progdefaults.WF_UIwfampspan);}
            }
            Fl_Check_Button btnWF_UIwfstore {
              label {WF Store}
              callback {progdefaults.WF_UIwfstore = o->value();
progdefaults.changed = true;
WF_UI();}
              xywh {277 213 150 20} down_box DOWN_BOX value 1
              code0 {o->value(progdefaults.WF_UIwfstore);}
            }
            Fl_Check_Button btnWF_UIwfmode {
              label {WF mode}
              callback {progdefaults.WF_UIwfmode = o->value();
progdefaults.changed = true;
WF_UI();}
              xywh {58 249 150 20} down_box DOWN_BOX value 1
              code0 {o->value(progdefaults.WF_UIwfmode);}
            }
            Fl_Check_Button btnWF_UIqsy {
              label QSY
              callback {progdefaults.WF_UIqsy = o->value();
progdefaults.changed = true;
WF_UI();}
              xywh {277 249 150 20} down_box DOWN_BOX value 1
              code0 {o->value(progdefaults.WF_UIqsy);}
            }
            Fl_Check_Button btnWF_UIxmtlock {
              label {XMT lock}
              callback {progdefaults.WF_UIxmtlock = o->value();
progdefaults.changed = true;
WF_UI();}
              xywh {277 285 150 20} down_box DOWN_BOX value 1
              code0 {o->value(progdefaults.WF_UIxmtlock);}
            }
            Fl_Button btn_wf_enable_all {
              label {Enable all}
              callback {btnWF_UIrev->value(progdefaults.WF_UIrev = 1);
btnWF_UIwfcarrier->value(progdefaults.WF_UIwfcarrier = 1);
btnWF_UIwfreflevel->value(progdefaults.WF_UIwfreflevel = 1);
btnWF_UIwfampspan->value(progdefaults.WF_UIwfampspan = 1);
btnWF_UIwfmode->value(progdefaults.WF_UIwfmode = 1);

btnWF_UIx1->value(progdefaults.WF_UIx1 = 1);
btnWF_UIwfshift->value(progdefaults.WF_UIwfshift = 1);
btnWF_UIwfdrop->value(progdefaults.WF_UIwfdrop = 1);
btnWF_UIwfstore->value(progdefaults.WF_UIwfstore = 1);
btnWF_UIqsy->value(progdefaults.WF_UIqsy = 1);
btnWF_UIxmtlock->value(progdefaults.WF_UIxmtlock = 1);

progdefaults.changed = true;
WF_UI();}
              xywh {102 321 88 20}
            }
            Fl_Button btn_wf_disable_all {
              label {Disable all}
              callback {btnWF_UIrev->value(progdefaults.WF_UIrev = 0);
btnWF_UIwfcarrier->value(progdefaults.WF_UIwfcarrier = 0);
btnWF_UIwfreflevel->value(progdefaults.WF_UIwfreflevel = 0);
btnWF_UIwfampspan->value(progdefaults.WF_UIwfampspan = 0);
btnWF_UIwfmode->value(progdefaults.WF_UIwfmode = 0);

btnWF_UIx1->value(progdefaults.WF_UIx1 = 0);
btnWF_UIwfshift->value(progdefaults.WF_UIwfshift = 0);
btnWF_UIwfdrop->value(progdefaults.WF_UIwfdrop = 0);
btnWF_UIwfstore->value(progdefaults.WF_UIwfstore = 0);
btnWF_UIqsy->value(progdefaults.WF_UIqsy = 0);
btnWF_UIxmtlock->value(progdefaults.WF_UIxmtlock = 0);

progdefaults.changed = true;
WF_UI();}
              xywh {301 321 88 20}
            }
          }
          Fl_Group {} {
            label {Rx Text} open
            xywh {0 50 500 320} hide
          } {
            Fl_Check_Button btn_rx_lowercase {
              label {print CW / RTTY / THROB / CONTESTIA in lowercase}
              callback {progdefaults.rx_lowercase = o->value();
progdefaults.changed = true;}
              xywh {25 75 389 15} down_box DOWN_BOX
              code0 {o->value(progdefaults.rx_lowercase);}
            }
          }
        }
      }
      Fl_Group tabWaterfall {
        label Waterfall
        xywh {0 25 500 347} hide
      } {
        Fl_Tabs tabsWaterfall {open
          xywh {0 25 500 347} color 50 selection_color 50
        } {
          Fl_Group {} {
            label Display open
            xywh {0 50 500 320}
          } {
            Fl_Group {} {
              label {Colors and cursors} open
              xywh {5 60 490 162} box ENGRAVED_FRAME align 21
            } {
              Fl_Button WF_Palette {
                callback {progdefaults.changed = true;}
                xywh {15 98 260 24} box DOWN_BOX color 0 labelsize 12 align 5
                code0 {\#include "colorbox.h"}
                code1 {o->label(progdefaults.PaletteName.c_str());}
                code2 {o->labelsize(FL_NORMAL_SIZE);}
                class colorbox
              }
              Fl_Button {btnColor[0]} {
                callback {selectColor(0);
progdefaults.changed = true;}
                tooltip {Change color} xywh {15 128 20 24}
              }
              Fl_Button {btnColor[1]} {
                callback {selectColor(1);
progdefaults.changed = true;}
                tooltip {Change color} xywh {45 128 20 24}
              }
              Fl_Button {btnColor[2]} {
                callback {selectColor(2);
progdefaults.changed = true;}
                tooltip {Change color} xywh {75 128 20 24}
              }
              Fl_Button {btnColor[3]} {
                callback {selectColor(3);
progdefaults.changed = true;}
                tooltip {Change color} xywh {105 128 20 24}
              }
              Fl_Button {btnColor[4]} {
                callback {selectColor(4);
progdefaults.changed = true;}
                tooltip {Change color} xywh {135 128 20 24}
              }
              Fl_Button {btnColor[5]} {
                callback {selectColor(5);
progdefaults.changed = true;}
                tooltip {Change color} xywh {165 128 20 24}
              }
              Fl_Button {btnColor[6]} {
                callback {selectColor(6);
progdefaults.changed = true;}
                tooltip {Change color} xywh {195 128 20 24}
              }
              Fl_Button {btnColor[7]} {
                callback {selectColor(7);
progdefaults.changed = true;}
                tooltip {Change color} xywh {225 128 20 24}
              }
              Fl_Button {btnColor[8]} {
                callback {selectColor(8);
progdefaults.changed = true;}
                tooltip {Change color} xywh {256 128 20 24}
              }
              Fl_Button btnLoadPalette {
                label {Load...}
                callback {loadPalette();
progdefaults.changed = true;}
                tooltip {Load a new palette} xywh {314 96 70 24}
                code0 {\#include "colorbox.h"}
              }
              Fl_Button btnSavePalette {
                label {Save...}
                callback {savePalette();}
                tooltip {Save this palette} xywh {314 128 70 24}
                code0 {\#include "colorbox.h"}
              }
              Fl_Check_Button btnUseCursorLines {
                label {Bandwidth cursor}
                callback {progdefaults.UseCursorLines = o->value();
if (o->value())
    btnCursorBWcolor->activate();
else
    btnCursorBWcolor->deactivate();
progdefaults.changed = true;}
                tooltip {Show cursor with bandwidth lines} xywh {15 161 150 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.UseCursorLines);}
              }
              Fl_Button btnCursorBWcolor {
                label {Cursor color}
                callback {if (fl_color_chooser("Cursor BW Lines",
  progdefaults.cursorLineRGBI.R, 
  progdefaults.cursorLineRGBI.G, 
  progdefaults.cursorLineRGBI.B) ) {
o->color(fl_rgb_color(progdefaults.cursorLineRGBI.R,progdefaults.cursorLineRGBI.G,progdefaults.cursorLineRGBI.B));
o->redraw();
progdefaults.changed = true;
}}
                tooltip {Change color} xywh {15 191 20 20} color 3 align 8
                code0 {\#include <FL/Fl_Color_Chooser.H>}
                code1 {o->color(fl_rgb_color(progdefaults.cursorLineRGBI.R,progdefaults.cursorLineRGBI.G,progdefaults.cursorLineRGBI.B));}
              }
              Fl_Check_Button btnUseCursorCenterLine {
                label {Cursor center line}
                callback {progdefaults.UseCursorCenterLine = o->value();
progdefaults.changed = true;}
                tooltip {Show cursor with center line} xywh {185 161 149 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.UseCursorCenterLine);}
              }
              Fl_Button btnCursorCenterLineColor {
                label {Center line color}
                callback {if (fl_color_chooser("Cursor Center Line",
  progdefaults.cursorCenterRGBI.R, 
  progdefaults.cursorCenterRGBI.G, 
  progdefaults.cursorCenterRGBI.B) ) {
o->color(fl_rgb_color(progdefaults.cursorCenterRGBI.R,progdefaults.cursorCenterRGBI.G,progdefaults.cursorCenterRGBI.B));
o->redraw();
progdefaults.changed = true;
}}
                tooltip {Change color} xywh {185 191 20 20} color 7 align 8
                code0 {o->color(fl_rgb_color(progdefaults.cursorCenterRGBI.R,progdefaults.cursorCenterRGBI.G,progdefaults.cursorCenterRGBI.B));}
              }
              Fl_Check_Button btnUseBWTracks {
                label {Bandwidth tracks}
                callback {progdefaults.UseBWTracks = o->value();
progdefaults.changed = true;}
                tooltip {Show bandwidth tracks on waterfall} xywh {346 161 145 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.UseBWTracks);}
              }
              Fl_Button btnBwTracksColor {
                label {Tracks color}
                callback {if (fl_color_chooser("Track Lines",
  progdefaults.bwTrackRGBI.R, 
  progdefaults.bwTrackRGBI.G, 
  progdefaults.bwTrackRGBI.B) ) {
o->color(fl_rgb_color(progdefaults.bwTrackRGBI.R,progdefaults.bwTrackRGBI.G,progdefaults.bwTrackRGBI.B));
o->redraw();
wf->redraw_marker();
progdefaults.changed = true;
}}
                tooltip {Change color} xywh {346 191 20 20} color 1 align 8
                code0 {o->color(fl_rgb_color(progdefaults.bwTrackRGBI.R,progdefaults.bwTrackRGBI.G,progdefaults.bwTrackRGBI.B));}
              }
            }
            Fl_Group {} {
              label {Frequency scale} open
              xywh {5 222 490 62} box ENGRAVED_FRAME align 21
            } {
              Fl_Check_Button chkShowAudioScale {
                label {Always show audio frequencies}
                callback {progdefaults.wf_audioscale = o->value();
progdefaults.changed = true;}
                tooltip {Audio or RF frequencies on waterfall scale} xywh {15 252 240 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.wf_audioscale);}
              }
              Fl_Button btnWaterfallFont {
                label {Font...}
                callback {font_browser->fontNumber(progdefaults.WaterfallFontnbr);
font_browser->fontSize(progdefaults.WaterfallFontsize);
font_browser->fontColor(FL_FOREGROUND_COLOR);
font_browser->fontFilter(Font_Browser::ALL_TYPES);
font_browser->callback((Fl_Callback*)cbWaterfallFontBrowser);
font_browser->show();}
                tooltip {Select waterfall scale font} xywh {314 252 70 24}
              }
            }
            Fl_Group {} {
              label {Transmit signal} open
              xywh {5 285 490 80} box ENGRAVED_FRAME align 21
            } {
              Fl_Check_Button btnViewXmtSignal {
                label {Monitor transmitted signal}
                callback {progdefaults.viewXmtSignal=o->value();
progdefaults.changed = true;}
                tooltip {Show transmit signal on waterfall} xywh {15 315 205 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.viewXmtSignal);}
              }
              Fl_Value_Slider valTxMonitorLevel {
                label {Signal level}
                callback {progdefaults.TxMonitorLevel = o->value();
progdefaults.changed = true;}
                tooltip {Set level for good viewing} xywh {270 315 200 20} type Horizontal align 1 step 0.05 value 0.5 textsize 14
                code0 {o->value(progdefaults.TxMonitorLevel);}
                code1 {o->labelsize(FL_NORMAL_SIZE); o->textsize(FL_NORMAL_SIZE);}
                class Fl_Value_Slider2
              }
            }
          }
          Fl_Group {} {
            label {FFT Processing} open
            xywh {0 50 500 320} hide
          } {
            Fl_Group {} {open
              xywh {5 62 490 135} box ENGRAVED_FRAME
            } {
              Fl_Counter cntLowFreqCutoff {
                label {Lower limit}
                callback {progdefaults.LowFreqCutoff=(int)(o->value());
progdefaults.changed = true;
setwfrange();}
                tooltip {Low frequency limit in Hz} xywh {50 72 70 20} type Simple align 8 minimum 0 maximum 500 step 50 value 300
                code0 {o->value(progdefaults.LowFreqCutoff);}
                code1 {o->labelsize(FL_NORMAL_SIZE);}
                class Fl_Counter2
              }
              Fl_Counter valLatency {
                label {FFT latency (scan merging)}
                callback {progdefaults.latency = (int)o->value();
progdefaults.changed = true;}
                tooltip {Latency increases frequency resolution,
decreases time resolution. 1 = no scan merging} xywh {50 102 70 21} type Simple align 8 minimum 1 maximum 8 step 1 value 4
                code0 {o->value(progdefaults.latency);}
                code1 {o->labelsize(FL_NORMAL_SIZE);}
                class Fl_Counter2
              }
              Fl_Check_Button btnWFaveraging {
                label {FFT averaging}
                callback {progdefaults.WFaveraging = o->value();
progdefaults.changed = true;}
                tooltip {Use averaging to decrease waterfall noise} xywh {50 133 120 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.WFaveraging);}
              }
              Fl_Choice mnuFFTPrefilter {
                label {FFT prefilter window function}
                callback {progdefaults.wfPreFilter = o->value();
progdefaults.changed = true;} open
                tooltip {Select the type of FFT prefilter} xywh {50 163 120 25} down_box BORDER_BOX align 8
                code0 {mnuFFTPrefilter->add("Rectangular"); mnuFFTPrefilter->add("Blackman");}
                code1 {mnuFFTPrefilter->add("Hamming"); mnuFFTPrefilter->add("Hanning");}
                code2 {mnuFFTPrefilter->add("Triangular");}
                code3 {mnuFFTPrefilter->value(progdefaults.wfPreFilter);}
              } {}
              Fl_Counter cntrWfwidth {
                label {Upper limit}
                callback {progdefaults.HighFreqCutoff = (int)o->value();
progdefaults.changed = true;
setwfrange();}
                tooltip {High frequency limit in Hz} xywh {273 72 95 21} type Simple align 8 minimum 2000 maximum 4000 step 100 value 3000
                code0 {o->value(progdefaults.HighFreqCutoff);}
                code1 {o->labelsize(FL_NORMAL_SIZE);}
                class Fl_Counter2
              }
            }
            Fl_Group {} {
              label {Changes take effect on next program startup} open
              tooltip {Show me more or less waterfall} xywh {5 212 490 80} box ENGRAVED_FRAME align 17
            } {
              Fl_Counter cntrWfheight {
                label {Waterfall height in pixels}
                callback {progdefaults.wfheight = (int)o->value();
progdefaults.changed = true;}
                tooltip {CPU usage increases with waterfall height} xywh {50 242 95 21} type Simple align 8 minimum 100 maximum 160 step 5 value 120
                code0 {o->value(progdefaults.wfheight);}
                code1 {o->labelsize(FL_NORMAL_SIZE);}
                class Fl_Counter2
              }
            }
          }
          Fl_Group {} {
            label Mouse open
            xywh {0 50 500 320} hide
          } {
            Fl_Group {} {open
              xywh {5 62 490 170} box ENGRAVED_FRAME
            } {
              Fl_Check_Button btnWaterfallHistoryDefault {
                label {Left or right click always replays audio history}
                callback {progdefaults.WaterfallHistoryDefault = o->value();
progdefaults.changed = true;}
                tooltip {Replay trackline audio} xywh {15 76 340 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.WaterfallHistoryDefault);}
              }
              Fl_Check_Button btnWaterfallQSY {
                label {Dragging on the waterfall scale changes frequency}
                callback {progdefaults.WaterfallQSY = o->value();
progdefaults.changed = true;}
                tooltip {Enable drag cursor on waterfall scale} xywh {15 106 380 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.WaterfallQSY);}
              }
              Fl_Check_Button btnWaterfallClickInsert {
                label {Insert text on single left click}
                callback {progdefaults.WaterfallClickInsert = o->value();
if (progdefaults.WaterfallClickInsert)
    inpWaterfallClickText->activate();
else
    inpWaterfallClickText->deactivate();
progdefaults.changed = true;}
                tooltip {Insert special text in Rx panel
when waterfall clicked} xywh {15 148 225 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.WaterfallClickInsert);}
              }
              Fl_Input inpWaterfallClickText {
                callback {progdefaults.WaterfallClickText = o->value();
progdefaults.changed = true;}
                tooltip {The string <FREQ> is replaced with
the current modem and frequency} xywh {301 136 180 50} align 8
                class Fl_Input2
              }
            }
            Fl_Choice mnuWaterfallWheelAction {
              label {Wheel action}
              callback {progdefaults.WaterfallWheelAction = o->value();
progdefaults.changed = true;} open
              tooltip {Select how the mouse wheel
behaves inside the waterfall} xywh {15 196 150 22} down_box BORDER_BOX align 8
            } {}
          }
        }
      }
      Fl_Group tabModems {
        label Modems
        xywh {0 25 517 345} hide
      } {
        Fl_Tabs tabsModems {open
          xywh {0 25 517 345} selection_color 50 align 9
        } {
          Fl_Group tabCW {
            label CW open
            xywh {0 50 504 320}
          } {
            Fl_Tabs tabsCW {open
              xywh {0 50 504 320} selection_color 50
            } {
              Fl_Group {} {
                label General open
                xywh {0 75 500 295} align 5
              } {
                Fl_Group {} {
                  label Receive open
                  xywh {5 85 490 130} box ENGRAVED_FRAME align 21
                } {
                  Fl_Value_Slider sldrCWbandwidth {
                    label {Filter bandwidth}
                    callback {progdefaults.CWbandwidth = (int)o->value();
progdefaults.changed = true;}
                    tooltip {CW dsp filter bandwidth} xywh {40 115 290 20} type Horizontal align 8 minimum 10 maximum 500 step 10 value 150 textsize 14
                    code0 {o->value(progdefaults.CWbandwidth);}
                    code1 {o->labelsize(FL_NORMAL_SIZE); o->textsize(FL_NORMAL_SIZE);}
                    class Fl_Value_Slider2
                  }
                  Fl_Check_Button btnCWrcvTrack {
                    label Tracking
                    callback {progdefaults.CWtrack = o->value();
progdefaults.changed = true;}
                    tooltip {Automatic Rx speed tracking} xywh {40 150 80 20} down_box DOWN_BOX value 1
                    code0 {o->value(progdefaults.CWtrack);}
                  }
                  Fl_Counter cntCWrange {
                    label {Tracking range (WPM)}
                    callback {progdefaults.CWrange = (int)o->value();
progdefaults.changed = true;}
                    tooltip {Range +/- wpm} xywh {225 150 65 20} type Simple align 8 minimum 5 maximum 25 step 1 value 10
                    code0 {o->value(progdefaults.CWrange);}
                    code1 {o->labelsize(FL_NORMAL_SIZE);}
                    class Fl_Counter2
                  }
                  Fl_Value_Output valCWrcvWPM {
                    callback {progdefaults.changed = true;}
                    xywh {70 185 35 20} color 7
                  }
                  Fl_Progress prgsCWrcvWPM {
                    tooltip {Tracked CW speed in WPM} xywh {105 185 250 20} color 49 selection_color 15 align 0
                  }
                  Fl_Box {} {
                    label {RX WPM}
                    xywh {360 185 70 20} align 20
                  }
                }
                Fl_Group {} {
                  label Transmit open
                  xywh {5 215 490 150} box ENGRAVED_FRAME align 21
                } {
                  Fl_Value_Slider sldrCWxmtWPM {
                    label {TX WPM}
                    callback {progdefaults.CWspeed = (int)o->value();
cntCW_WPM->value(progdefaults.CWspeed);
sldrCWfarnsworth->maximum(progdefaults.CWspeed);
if (sldrCWfarnsworth->value() > progdefaults.CWspeed)
sldrCWfarnsworth->value(progdefaults.CWspeed);
progdefaults.changed = true;
sync_cw_parameters();}
                    tooltip {My transmit CW WPM} xywh {20 240 400 20} type Horizontal align 8 minimum 5 maximum 100 step 1 value 20 textsize 14
                    code0 {o->value(progdefaults.CWspeed);}
                    code1 {o->labelsize(FL_NORMAL_SIZE); o->textsize(FL_NORMAL_SIZE);}
                    class Fl_Value_Slider2
                  }
                  Fl_Counter cntCWdefWPM {
                    label Default
                    callback {progdefaults.defCWspeed = (int)o->value();
progdefaults.changed = true;}
                    tooltip {The default CW speed} xywh {40 281 64 20} type Simple align 1 minimum 5 maximum 200 step 1 value 18
                    code0 {o->value(progdefaults.defCWspeed);}
                    code1 {o->labelsize(FL_NORMAL_SIZE);}
                    class Fl_Counter2
                  }
                  Fl_Counter cntCWlowerlimit {
                    label {Lower limit}
                    callback {progdefaults.CWlowerlimit = (int)o->value();
progdefaults.changed = true;
sldrCWxmtWPM->minimum(progdefaults.CWlowerlimit);
sldrCWxmtWPM->value(progdefaults.CWspeed);
sldrCWxmtWPM->redraw();
cntCWupperlimit->minimum(progdefaults.CWlowerlimit+20);
cntCW_WPM->minimum(progdefaults.CWlowerlimit);}
                    tooltip {No slower than this} xywh {197 281 65 20} type Simple align 1 minimum 5 maximum 20 step 5 value 10
                    code0 {o->value(progdefaults.CWlowerlimit);}
                    code1 {o->labelsize(FL_NORMAL_SIZE);}
                  }
                  Fl_Counter cntCWupperlimit {
                    label {Upper limit}
                    callback {progdefaults.CWupperlimit = (int)o->value();
progdefaults.changed = true;
sldrCWxmtWPM->maximum(progdefaults.CWupperlimit);
sldrCWxmtWPM->value(progdefaults.CWspeed);
sldrCWxmtWPM->redraw();
cntCWlowerlimit->maximum(progdefaults.CWupperlimit-20);
cntCW_WPM->maximum(progdefaults.CWupperlimit);}
                    tooltip {No faster than this} xywh {355 281 65 20} type Simple align 1 minimum 25 maximum 200 step 5 value 100
                    code0 {o->value(progdefaults.CWupperlimit);}
                    code1 {o->labelsize(FL_NORMAL_SIZE);}
                  }
                  Fl_Value_Slider sldrCWfarnsworth {
                    label {F-WPM}
                    callback {progdefaults.CWfarnsworth = (int)o->value();
progdefaults.changed = true;}
                    tooltip {My transmit CW WPM} xywh {20 335 400 20} type Horizontal align 8 minimum 5 maximum 100 step 1 value 20 textsize 14
                    code0 {o->value(progdefaults.CWfarnsworth);}
                    code1 {o->labelsize(FL_NORMAL_SIZE); o->textsize(FL_NORMAL_SIZE);}
                    class Fl_Value_Slider2
                  }
                  Fl_Check_Button btnCWusefarnsworth {
                    label {Use Farnsworth timing}
                    callback {progdefaults.CWusefarnsworth=o->value();
progdefaults.changed = true;}
                    xywh {40 312 180 15} down_box DOWN_BOX
                    code0 {o->value(progdefaults.CWusefarnsworth);}
                  }
                }
              }
              Fl_Group {} {
                label {Timing and QSK} open
                xywh {0 75 500 295} align 5 hide
              } {
                Fl_Group {} {
                  label Timing open
                  xywh {5 85 490 120} box ENGRAVED_FRAME align 21
                } {
                  Fl_Counter cntCWweight {
                    label {Weight (%)}
                    callback {progdefaults.CWweight=(int)o->value();
progdefaults.changed = true;}
                    tooltip {Dot to dot-space ratio} xywh {15 114 65 20} type Simple align 8 minimum 20 maximum 80 step 1 value 50
                    code0 {o->value(progdefaults.CWweight);}
                    code1 {o->labelsize(FL_NORMAL_SIZE);}
                    class Fl_Counter2
                  }
                  Fl_Counter cntCWdash2dot {
                    label {Dash to dot ratio}
                    callback {progdefaults.CWdash2dot=o->value();
progdefaults.changed = true;}
                    tooltip {Dash to dot ratio} xywh {240 114 64 20} type Simple align 8 minimum 2.5 maximum 4 value 3
                    code0 {o->value(progdefaults.CWdash2dot);}
                    code1 {o->labelsize(FL_NORMAL_SIZE);}
                    class Fl_Counter2
                  }
                  Fl_Counter cntCWrisetime {
                    label {Edge timing}
                    callback {progdefaults.CWrisetime=o->value();
progdefaults.changed = true;}
                    tooltip {Leading and Trailing edge risetimes (msec)} xywh {240 145 65 20} type Simple align 8 minimum 0 maximum 15 value 4
                    code0 {o->value(progdefaults.CWrisetime);}
                    code1 {o->labelsize(FL_NORMAL_SIZE);}
                    class Fl_Counter2
                  }
                  Fl_Choice mnuQSKshape {
                    label {Edge shape}
                    callback {progdefaults.QSKshape = o->value();
progdefaults.changed = true;} open
                    tooltip {Raised cosine = Hanning} xywh {15 144 112 20} down_box BORDER_BOX align 8
                    code0 {o->add("Hanning|Blackman");}
                    code1 {o->value(progdefaults.QSKshape);}
                    code2 {o->labelsize(FL_NORMAL_SIZE);}
                  } {}
                  Fl_Check_Button btnCWnarrow {
                    label {Edge decreases pulse width}
                    callback {progdefaults.CWnarrow = o->value();
progdefaults.changed = true;}
                    tooltip {Weight decreases with increasing edge timing} xywh {15 175 225 15} down_box DOWN_BOX
                    code0 {o->value(progdefaults.CWnarrow);}
                  }
                }
                Fl_Group {} {
                  label QSK open
                  xywh {5 217 490 118} box ENGRAVED_FRAME align 21
                } {
                  Fl_Check_Button btnQSK {
                    label {QSK on right audio channel}
                    callback {if (o->value() && !sound_check_right_channel()) {
  o->value(0);
  return;
}
progdefaults.QSK = o->value();
progdefaults.changed = true;}
                    tooltip {Generate square wave signal on right channel} xywh {15 245 211 20} down_box DOWN_BOX
                    code0 {o->value(progdefaults.QSK);}
                  }
                  Fl_Counter cntPreTiming {
                    label {Pre-keydown timing (ms)}
                    callback {progdefaults.CWpre=o->value();
progdefaults.changed = true;}
                    tooltip {Msec pre-keydown (+ is earlier in time)} xywh {15 275 64 20} type Simple align 8 minimum 0 maximum 20 step 0.5
                    code0 {o->value(progdefaults.CWpre);}
                    code1 {o->labelsize(FL_NORMAL_SIZE);}
                    class Fl_Counter2
                  }
                  Fl_Counter cntPostTiming {
                    label {Post-keydown timing (ms)}
                    callback {progdefaults.CWpost=o->value();
progdefaults.changed = true;}
                    tooltip {Msec post-keydown (+ is earlier in time)} xywh {15 305 64 20} type Simple align 8 minimum -20 maximum 20 step 0.5
                    code0 {o->value(progdefaults.CWpre);}
                    code1 {o->labelsize(FL_NORMAL_SIZE);}
                    class Fl_Counter2
                  }
                  Fl_Check_Button btnQSKadjust {
                    label {Send continuous}
                    callback {progdefaults.QSKadjust = o->value();}
                    tooltip {Send a continuous stream of test characters} xywh {290 275 150 20} down_box DOWN_BOX
                    code0 {o->value(progdefaults.QSKadjust);}
                  }
                  Fl_Choice mnuTestChar {
                    label {Test char}
                    callback {progdefaults.TestChar = o->value();} open
                    tooltip {Test character for QSK adjustment} xywh {290 245 41 20} down_box BORDER_BOX align 8
                    code0 {extern char szTestChar[];}
                    code1 {o->add(szTestChar);}
                    code2 {o->value(progdefaults.TestChar);}
                  } {}
                }
              }
              Fl_Group {} {
                label Prosigns open
                xywh {0 75 500 295} align 5 hide
              } {
                Fl_Group {} {open
                  xywh {4 81 492 283} box ENGRAVED_FRAME
                } {
                  Fl_Check_Button btnCW_use_paren {
                    label {Use '(' paren not KN}
                    callback {progdefaults.CW_use_paren=o->value();
progdefaults.changed = true;}
                    xywh {235 236 68 15} down_box DOWN_BOX
                    code0 {o->value(progdefaults.CW_use_paren);}
                  }
                }
                Fl_Choice {mnu_prosign[0]} {
                  label {<BT>}
                  callback {int c = o->value();
for (int i = 0; i < 9; i++)
  if (mnu_prosign[i]->value() == c) {
    mnu_prosign[i]->value(11);
    progdefaults.CW_prosigns[i] = ' ';
  }
o->value(c);
char ps[] = "~%&+={}<>[] ";
progdefaults.CW_prosigns[0] = ps[c];
progdefaults.changed = true;} open
                  xywh {167 94 47 22} down_box BORDER_BOX color 52
                  code0 {o->add(szProsigns);}
                  code1 {char s[2] = " "; s[0] = progdefaults.CW_prosigns[0];}
                  code2 {o->value(o->find_item(s));}
                } {}
                Fl_Choice {mnu_prosign[1]} {
                  label {<AA>}
                  callback {int c = o->value();
for (int i = 0; i < 9; i++)
  if (mnu_prosign[i]->value() == c) {
    mnu_prosign[i]->value(11);
    progdefaults.CW_prosigns[i] = ' ';
  }
o->value(c); 
char ps[] = "~%&+={}<>[] ";
progdefaults.CW_prosigns[1] = ps[c];
progdefaults.changed = true;} open
                  xywh {167 121 47 22} down_box BORDER_BOX color 52
                  code0 {o->add(szProsigns);}
                  code1 {char s[2] = " "; s[0] = progdefaults.CW_prosigns[1];}
                  code2 {o->value(o->find_item(s));}
                } {}
                Fl_Choice {mnu_prosign[2]} {
                  label {<AS>}
                  callback {int c = o->value();
for (int i = 0; i < 9; i++)
  if (mnu_prosign[i]->value() == c) {
    mnu_prosign[i]->value(11);
    progdefaults.CW_prosigns[i] = ' ';
  }
o->value(c);
char ps[] = "~%&+={}<>[] ";
progdefaults.CW_prosigns[2] = ps[c];
progdefaults.changed = true;} open
                  xywh {167 149 47 22} down_box BORDER_BOX color 52
                  code0 {o->add(szProsigns);}
                  code1 {char s[2] = " "; s[0] = progdefaults.CW_prosigns[2];}
                  code2 {o->value(o->find_item(s));}
                } {}
                Fl_Choice {mnu_prosign[3]} {
                  label {<AR>}
                  callback {int c = o->value();
for (int i = 0; i < 9; i++)
  if (mnu_prosign[i]->value() == c) {
    mnu_prosign[i]->value(11);
    progdefaults.CW_prosigns[i] = ' ';
  }
o->value(c);
char ps[] = "~%&+={}<>[] ";
progdefaults.CW_prosigns[3] = ps[c];
progdefaults.changed = true;} open
                  xywh {167 176 47 22} down_box BORDER_BOX color 52
                  code0 {o->add(szProsigns);}
                  code1 {char s[2] = " "; s[0] = progdefaults.CW_prosigns[3];}
                  code2 {o->value(o->find_item(s));}
                } {}
                Fl_Choice {mnu_prosign[4]} {
                  label {<SK>}
                  callback {int c = o->value();
for (int i = 0; i < 9; i++)
  if (mnu_prosign[i]->value() == c) {
    mnu_prosign[i]->value(11);
    progdefaults.CW_prosigns[i] = ' ';
  }
o->value(c);
char ps[] = "~%&+={}<>[] ";
progdefaults.CW_prosigns[4] = ps[c];
progdefaults.changed = true;} open
                  xywh {167 204 47 22} down_box BORDER_BOX color 52
                  code0 {o->add(szProsigns);}
                  code1 {char s[2] = " "; s[0] = progdefaults.CW_prosigns[4];}
                  code2 {o->value(o->find_item(s));}
                } {}
                Fl_Choice {mnu_prosign[5]} {
                  label {<KN>}
                  callback {int c = o->value();
for (int i = 0; i < 9; i++)
  if (mnu_prosign[i]->value() == c) {
    mnu_prosign[i]->value(11);
    progdefaults.CW_prosigns[i] = ' ';
  }
o->value(c);
char ps[] = "~%&+={}<>[] ";
progdefaults.CW_prosigns[5] = ps[c];
progdefaults.changed = true;} open
                  xywh {167 232 47 22} down_box BORDER_BOX color 52
                  code0 {o->add(szProsigns);}
                  code1 {char s[2] = " "; s[0] = progdefaults.CW_prosigns[5];}
                  code2 {o->value(o->find_item(s));}
                } {}
                Fl_Choice {mnu_prosign[6]} {
                  label {<INT>}
                  callback {int c = o->value();
for (int i = 0; i < 9; i++)
  if (mnu_prosign[i]->value() == c) {
    mnu_prosign[i]->value(11);
    progdefaults.CW_prosigns[i] = ' ';
  }
o->value(c);
char ps[] = "~%&+={}<>[] ";
progdefaults.CW_prosigns[6] = ps[c];
progdefaults.changed = true;} open
                  xywh {167 259 47 22} down_box BORDER_BOX color 52
                  code0 {o->add(szProsigns);}
                  code1 {char s[2] = " "; s[0] = progdefaults.CW_prosigns[6];}
                  code2 {o->value(o->find_item(s));}
                } {}
                Fl_Choice {mnu_prosign[7]} {
                  label {<HM>}
                  callback {int c = o->value();
for (int i = 0; i < 9; i++)
  if (mnu_prosign[i]->value() == c) {
    mnu_prosign[i]->value(11);
    progdefaults.CW_prosigns[i] = ' ';
  }
o->value(c);
char ps[] = "~%&+={}<>[] ";
progdefaults.CW_prosigns[7] = ps[c];
progdefaults.changed = true;} open
                  xywh {167 287 47 22} down_box BORDER_BOX color 52
                  code0 {o->add(szProsigns);}
                  code1 {char s[2] = " "; s[0] = progdefaults.CW_prosigns[7];}
                  code2 {o->value(o->find_item(s));}
                } {}
                Fl_Choice {mnu_prosign[8]} {
                  label {<VE>}
                  callback {int c = o->value();
for (int i = 0; i < 9; i++)
  if (mnu_prosign[i]->value() == c) {
    mnu_prosign[i]->value(11);
    progdefaults.CW_prosigns[i] = ' ';
  }
o->value(c);
char ps[] = "~%&+={}<>[] ";
progdefaults.CW_prosigns[8] = ps[c];
progdefaults.changed = true;} open
                  xywh {167 315 47 22} down_box BORDER_BOX color 52
                  code0 {o->add(szProsigns);}
                  code1 {char s[2] = " "; s[0] = progdefaults.CW_prosigns[8];}
                  code2 {o->value(o->find_item(s));}
                } {}
              }
            }
          }
          Fl_Group tabDomEX {
            label DomEX open
            xywh {0 50 500 320} hide
          } {
            Fl_Group {} {open
              xywh {5 60 490 180} box ENGRAVED_FRAME
            } {
              Fl_Input txtSecondary {
                label {Secondary Text}
                callback {progdefaults.secText = o->value();
progdefaults.changed = true;}
                tooltip {Text to send during keyboard idle times} xywh {15 87 360 40} type Multiline align 5 when 1
                code0 {txtSecondary->labelsize(FL_NORMAL_SIZE);}
                class Fl_Input2
              }
              Fl_Check_Button valDominoEX_FILTER {
                label Filtering
                callback {progdefaults.DOMINOEX_FILTER = o->value();
resetDOMEX();
progdefaults.changed = true;}
                tooltip {Use DSP filter before decoder} xywh {15 141 80 20} down_box DOWN_BOX value 1
                code0 {o->value(progdefaults.DOMINOEX_FILTER);}
              }
              Fl_Counter valDominoEX_BW {
                label {Filter bandwidth factor}
                callback {progdefaults.DOMINOEX_BW = o->value();
resetDOMEX();
progdefaults.changed = true;}
                tooltip {Filter bandwidth relative to signal width} xywh {156 141 63 20} type Simple align 8 minimum 1 maximum 2 value 1.5
                code0 {o->value(progdefaults.DOMINOEX_BW);}
                code1 {o->labelsize(FL_NORMAL_SIZE);}
                class Fl_Counter2
              }
              Fl_Check_Button chkDominoEX_FEC {
                label FEC
                callback {progdefaults.DOMINOEX_FEC = o->value();
progdefaults.changed = true;}
                tooltip {Enable MultiPSK-compatible FEC} xywh {15 171 51 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.DOMINOEX_FEC);}
              }
              Fl_Value_Slider valDomCWI {
                label {CWI threshold}
                callback {progdefaults.DomCWI = o->value();
progdefaults.changed = true;}
                tooltip {CWI detection and suppression} xywh {15 207 260 20} type Horizontal align 1 textsize 14
                code0 {o->value(progdefaults.DomCWI);}
                code1 {o->labelsize(FL_NORMAL_SIZE); o->textsize(FL_NORMAL_SIZE);}
                class Fl_Value_Slider2
              }
              Fl_Counter valDominoEX_PATHS {
                label {Paths (hidden)}
                callback {progdefaults.DOMINOEX_PATHS = (int)o->value();
progdefaults.changed = true;}
                xywh {339 194 63 20} type Simple minimum 4 maximum 8 step 1 value 5
                code0 {o->value(progdefaults.DOMINOEX_PATHS);}
                code1 {o->labelsize(FL_NORMAL_SIZE);}
                code2 {o->hide();}
                class Fl_Counter2
              }
            }
          }
          Fl_Group tabFeld {
            label Feldhell open
            xywh {0 50 500 320} hide
          } {
            Fl_Group {} {open
              xywh {5 60 490 145} box ENGRAVED_FRAME
            } {
              Fl_Choice selHellFont {
                label {Transmit font}
                callback {progdefaults.feldfontnbr=o->value();
progdefaults.changed = true;} open
                tooltip {Select TX raster font} xywh {15 70 150 20} down_box BORDER_BOX align 8
                code0 {\#include "fontdef.h"}
                code1 {o->add(szFeldFonts);}
                code2 {o->value(progdefaults.feldfontnbr);}
              } {}
              Fl_Check_Button btnBlackboard {
                label {Reverse video}
                callback {progdefaults.HellBlackboard=o->value();
progdefaults.changed = true;}
                tooltip {Display RX in reverse video} xywh {300 70 125 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.HellBlackboard);}
              }
              Fl_Spinner valHellXmtWidth {
                label {Transmit width}
                callback {progdefaults.HellXmtWidth=(int)o->value();
progdefaults.changed = true;}
                tooltip {\# of multiple scans / character line} xywh {15 100 40 20} align 8 maximum 3
                code0 {o->value(progdefaults.HellXmtWidth);}
                code1 {o->labelsize(FL_NORMAL_SIZE);}
                class Fl_Spinner2
              }
              Fl_Check_Button btnHellRcvWidth {
                label {Halve receive width}
                callback {progdefaults.HellRcvWidth=o->value();
progdefaults.changed = true;}
                tooltip {Compress Rx in time} xywh {300 100 155 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.HellRcvWidth);}
              }
              Fl_Choice mnuHellPulse {
                label {Pulse shape}
                callback {progdefaults.HellPulseFast = o->value();
progdefaults.changed = true;} open
                tooltip {Raised cosine pulse shape factor} xywh {15 147 150 20} down_box BORDER_BOX align 5
                code0 {o->add("Slow (4 msec)");}
                code1 {o->add("Fast (2 msec)");}
                code2 {o->value(progdefaults.HellPulseFast);}
              } {}
              Fl_Value_Slider sldrHellBW {
                label {Receive filter bandwidth}
                callback {progdefaults.HELL_BW = sldrHellBW->value();}
                tooltip {Adjust the DSP bandwidth} xywh {206 147 246 20} type Horizontal align 5 minimum 10 maximum 2400 step 5 value 400 textsize 14
                code0 {o->value(progdefaults.HELL_BW);}
                code1 {o->labelsize(FL_NORMAL_SIZE); o->textsize(FL_NORMAL_SIZE);}
                class Fl_Value_Slider2
              }
              Fl_Check_Button btnFeldHellIdle {
                label {Transmit periods (.) when idle}
                callback {progdefaults.HellXmtIdle=o->value();
progdefaults.changed = true;}
                tooltip {Transmits a diddle dot when no keyboard activity} xywh {15 177 230 20} down_box DOWN_BOX value 1
                code0 {o->value(progdefaults.HellXmtIdle);}
              }
              Fl_Check_Button btnHellXmtWidth {
                label {2x Xmt Width (hidden)}
                callback {progdefaults.HellXmtWidth=o->value();
progdefaults.changed = true;}
                xywh {305 175 113 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.HellXmtWidth);}
                code1 {o->hide();}
              }
            }
          }
          Fl_Group tabMT63 {
            label {MT-63} open
            xywh {0 50 500 320} hide
          } {
            Fl_Group {} {open
              xywh {5 60 490 115} box ENGRAVED_FRAME align 21
            } {
              Fl_Check_Button btnmt63_interleave {
                label {64-bit (long) interleave}
                callback {if (o->value() == 1)
progdefaults.mt63_interleave = 64;
else
progdefaults.mt63_interleave = 32;
progdefaults.changed = true;}
                xywh {150 78 185 20} down_box DOWN_BOX value 1
                code0 {o->value(0);if (progdefaults.mt63_interleave == 64) o->value(1);}
              }
              Fl_Check_Button btnMT63_8bit {
                label {8-bit extended characters}
                callback {progdefaults.mt63_8bit = o->value();
progdefaults.changed = true;}
                tooltip {Enable this for Latin-1 accented characters} xywh {150 108 205 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.mt63_8bit);}
              }
              Fl_Check_Button btnMT63_rx_integration {
                label {Long receive integration}
                callback {progdefaults.mt63_rx_integration = o->value();
progdefaults.changed = true;}
                tooltip {Enable for very weak signals} xywh {150 138 190 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.mt63_rx_integration);}
              }
            }
            Fl_Group {} {open
              xywh {6 176 490 100} box ENGRAVED_FRAME
            } {
              Fl_Check_Button btnMT63_usetones {
                label {Transmit lower start tone}
                callback {progdefaults.mt63_usetones = o->value();
if (!o->value()) {
    btnMT63_upper_lower->value(0);
    btnMT63_upper_lower->do_callback();
    btnMT63_upper_lower->deactivate();
}
else
    btnMT63_upper_lower->activate();
progdefaults.changed = true;}
                xywh {150 184 200 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.mt63_usetones);}
              }
              Fl_Check_Button btnMT63_upper_lower {
                label {Transmit upper start tone}
                callback {progdefaults.mt63_twotones = o->value();
progdefaults.changed = true;}
                xywh {150 214 200 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.mt63_twotones);}
                code1 {if (!btnMT63_usetones->value()) o->deactivate();}
              }
              Fl_Spinner MT63_tone_duration {
                label {Tone Duration (secs)}
                callback {progdefaults.mt63_tone_duration=(int)o->value();
progdefaults.changed = true;}
                xywh {150 240 40 20} align 8 maximum 10 value 4
                code0 {o->value(progdefaults.mt63_tone_duration);}
                code1 {o->labelsize(FL_NORMAL_SIZE);}
                class Fl_Spinner2
              }
            }
          }
          Fl_Group tabOlivia {
            label Olivia open
            xywh {0 50 500 320}
          } {
            Fl_Group {} {open
              xywh {5 60 490 200} box ENGRAVED_FRAME
            } {
              Fl_Choice mnuOlivia_Bandwidth {
                label Bandwidth
                callback {progdefaults.oliviabw = o->value();
set_olivia_default_integ();
resetOLIVIA();
progdefaults.changed = true;} open
                tooltip {Select bandwidth} xywh {60 80 85 20} down_box BORDER_BOX align 8
                code0 {o->add(szOliviaBandwidth);}
                code1 {o->value(2);}
              } {}
              Fl_Choice mnuOlivia_Tones {
                label Tones
                callback {progdefaults.oliviatones = o->value();
set_olivia_default_integ();
resetOLIVIA();
progdefaults.changed = true;} open
                tooltip {Select number of tones} xywh {321 80 70 20} down_box BORDER_BOX align 8
                code0 {o->add(szOliviaTones);}
                code1 {o->value(2);}
              } {}
              Fl_Group {} {
                label {Receive synchronizer} open
                xywh {60 119 379 100} box ENGRAVED_FRAME align 21
              } {
                Fl_Counter cntOlivia_smargin {
                  label {Tune margin (tone frequency spacing)}
                  callback {progdefaults.oliviasmargin = (int)(o->value());
resetOLIVIA();
progdefaults.changed = true;}
                  tooltip {Change ONLY to experiment} xywh {80 150 70 20} type Simple align 8 minimum 2 maximum 128 step 1 value 8
                  code0 {o->labelsize(FL_NORMAL_SIZE);}
                  class Fl_Counter2
                }
                Fl_Counter cntOlivia_sinteg {
                  label {Integration period (FEC blocks)}
                  callback {progdefaults.oliviasinteg = (int)(o->value());
resetOLIVIA();
progdefaults.changed = true;}
                  tooltip {Change ONLY to experiment} xywh {80 180 70 20} type Simple align 8 minimum 2 maximum 128 step 1 value 4
                  code0 {o->labelsize(FL_NORMAL_SIZE);}
                  class Fl_Counter2
                }
              }
              Fl_Check_Button btnOlivia_8bit {
                label {8-bit extended characters}
                callback {progdefaults.olivia8bit = o->value();
progdefaults.changed = true;}
                tooltip {Enable this for Latin-1 accented characters} xywh {60 229 200 20} down_box DOWN_BOX
              }
            }
          }
          Fl_Group tabContestia {
            label Contestia open
            xywh {0 50 500 320} hide
          } {
            Fl_Group {} {open
              xywh {5 60 490 200} box ENGRAVED_FRAME
            } {
              Fl_Choice mnuContestia_Bandwidth {
                label Bandwidth
                callback {progdefaults.contestiabw = o->value();
set_contestia_default_integ();
resetOLIVIA();
progdefaults.changed = true;} open
                tooltip {Select bandwidth} xywh {60 80 85 20} down_box BORDER_BOX align 8
                code0 {o->add(szContestiaBandwidth);}
                code1 {o->value(2);}
              } {}
              Fl_Choice mnuContestia_Tones {
                label Tones
                callback {progdefaults.contestiatones = o->value();
set_contestia_default_integ();
resetCONTESTIA();
progdefaults.changed = true;} open
                tooltip {Select number of tones} xywh {321 80 70 20} down_box BORDER_BOX align 8
                code0 {o->add(szContestiaTones);}
                code1 {o->value(2);}
              } {}
              Fl_Group {} {
                label {Receive synchronizer} open
                xywh {60 119 379 100} box ENGRAVED_FRAME align 21
              } {
                Fl_Counter cntContestia_smargin {
                  label {Tune margin (tone frequency spacing)}
                  callback {progdefaults.contestiasmargin = (int)(o->value());
resetCONTESTIA();
progdefaults.changed = true;}
                  tooltip {Change ONLY to experiment} xywh {80 150 70 20} type Simple align 8 minimum 2 maximum 128 step 1 value 8
                  code0 {o->labelsize(FL_NORMAL_SIZE);}
                  class Fl_Counter2
                }
                Fl_Counter cntContestia_sinteg {
                  label {Integration period (FEC blocks)}
                  callback {progdefaults.contestiasinteg = (int)(o->value());
resetCONTESTIA();
progdefaults.changed = true;}
                  tooltip {Change ONLY to experiment} xywh {80 180 70 20} type Simple align 8 minimum 2 maximum 128 step 1 value 4
                  code0 {o->labelsize(FL_NORMAL_SIZE);}
                  class Fl_Counter2
                }
              }
              Fl_Check_Button btnContestia_8bit {
                label {8-bit extended characters}
                callback {progdefaults.contestia8bit = o->value();
progdefaults.changed = true;}
                tooltip {Enable this for Latin-1 accented characters} xywh {60 229 200 20} down_box DOWN_BOX hide
              }
            }
          }
          Fl_Group tabPSK {
            label PSK open
            xywh {0 50 500 320} hide
          } {
            Fl_Tabs tabsPSK {open
              xywh {0 50 500 320} selection_color 50
            } {
              Fl_Group {} {
                label General open
                xywh {0 75 500 295} align 5
              } {
                Fl_Group {} {
                  label {AFC behavior} open
                  xywh {5 85 490 98} box ENGRAVED_FRAME align 21
                } {
                  Fl_Counter cntSearchRange {
                    label {Acquisition search range (Hz)}
                    callback {progdefaults.SearchRange = (int)o->value();
wf->redraw_marker();
progdefaults.changed = true;}
                    tooltip {Capture signals within this frequency range} xywh {15 117 75 20} type Simple align 8 minimum 10 maximum 500 step 10 value 200
                    code0 {o->value(progdefaults.SearchRange);}
                    code1 {o->labelsize(FL_NORMAL_SIZE);}
                    class Fl_Counter2
                  }
                  Fl_Counter cntACQsn {
                    label {Acquisition S/N (dB)}
                    callback {progdefaults.ACQsn = o->value();
progdefaults.changed = true;}
                    tooltip {Capture signals over this threshold} xywh {15 146 75 20} type Simple align 8 minimum 3 maximum 20 step 1 value 6
                    code0 {o->value(progdefaults.ACQsn);}
                    code1 {o->labelsize(FL_NORMAL_SIZE);}
                    class Fl_Counter2
                  }
                }
                Fl_Group {} {
                  label {S/N and IMD behavior} open
                  xywh {5 183 490 65} box ENGRAVED_FRAME align 21
                } {
                  Fl_Choice mnuPSKStatusTimeout {
                    label after
                    callback {progdefaults.StatusDim = o->value();
progdefaults.changed = true;} open
                    tooltip {Behavior of s/n imd} xywh {15 214 80 20} down_box BORDER_BOX align 8
                    code0 {o->add("Clear"); o->add("Dim");}
                    code1 {o->value(progdefaults.StatusDim);}
                  } {}
                  Fl_Counter {} {
                    label seconds
                    callback {progdefaults.StatusTimeout = (int)(o->value());
progdefaults.changed = true;}
                    tooltip {Will occur after this time in seconds} xywh {156 214 75 20} type Simple align 8 minimum 0 maximum 30 step 1
                    code0 {o->value(progdefaults.StatusTimeout);}
                    code1 {o->labelsize(FL_NORMAL_SIZE);}
                    class Fl_Counter2
                  }
                }
              }
              Fl_Group {} {
                label Viewer open
                xywh {0 75 500 295} align 5 hide
              } {
                Fl_Group {} {open
                  xywh {5 85 490 110} box ENGRAVED_FRAME
                } {
                  Fl_Check_Button btnMarquee {
                    label {Continuous scrolling}
                    callback {progdefaults.VIEWERmarquee = o->value();
progdefaults.changed = true;
initViewer();}
                    tooltip {ON - Marquee style
OFF - Clear & restart} xywh {212 125 165 20} down_box DOWN_BOX
                    code0 {o->value(progdefaults.VIEWERmarquee);}
                  }
                  Fl_Spinner cntChannels {
                    label Channels
                    callback {progdefaults.VIEWERchannels = (int)(o->value());
initViewer();}
                    tooltip {Change \# of psk viewer channels} xywh {15 95 50 20} align 8
                    code0 {o->minimum(5); o->maximum(30); o->step(1);}
                    code1 {o->value(progdefaults.VIEWERchannels);}
                    code2 {o->labelsize(FL_NORMAL_SIZE);}
                    class Fl_Spinner2
                  }
                  Fl_Spinner cntStartFrequency {
                    label {Start frequency}
                    callback {progdefaults.VIEWERstart = (int)(o->value());
progdefaults.changed = true;
initViewer();}
                    tooltip {Start decoding at this frequency} xywh {15 125 50 20} align 8
                    code0 {o->minimum(200); o->maximum(1000); o->step(100);}
                    code1 {o->value(progdefaults.VIEWERstart);}
                    code2 {o->labelsize(FL_NORMAL_SIZE);}
                    class Fl_Spinner2
                  }
                  Fl_Spinner cntTimeout {
                    label {Inactivity timeout}
                    callback {progdefaults.VIEWERtimeout = (int)(o->value());
progdefaults.changed = true;}
                    tooltip {Clear channel text after
\# seconds of inactivity} xywh {212 95 50 20} align 8
                    code0 {o->minimum(1); o->maximum(180); o->step(1);}
                    code1 {o->value(progdefaults.VIEWERtimeout);}
                    code2 {o->labelsize(FL_NORMAL_SIZE);}
                    class Fl_Spinner2
                  }
                  Fl_Choice mnuViewerLabel {
                    label {Channel label}
                    callback {progdefaults.VIEWERlabeltype = o->value();
initViewer();
progdefaults.changed = true;} open
                    tooltip {Appearance of label on each channel} xywh {212 155 150 24} down_box BORDER_BOX align 8
                    code0 {mnuViewerLabel->add("Audio frequency");}
                    code1 {mnuViewerLabel->add("Radio frequency");}
                    code2 {mnuViewerLabel->add("Channel number");}
                    code3 {mnuViewerLabel->value(progdefaults.VIEWERlabeltype);}
                  } {}
                  Fl_Button btnViewerFont {
                    label {Font...}
                    callback {font_browser->fontNumber(progdefaults.ViewerFontnbr);
font_browser->fontSize(progdefaults.ViewerFontsize);
font_browser->fontColor(FL_FOREGROUND_COLOR);
font_browser->fontFilter(Font_Browser::FIXED_WIDTH);
font_browser->callback(cbViewerFontBrowser);
font_browser->show();}
                    xywh {15 155 70 24}
                  }
                }
              }
            }
          }
          Fl_Group tabRTTY {
            label RTTY open
            xywh {0 50 500 320} hide
          } {
            Fl_Group {} {open
              xywh {5 60 490 300} box ENGRAVED_FRAME
            } {
              Fl_Choice selShift {
                label {Carrier shift}
                callback {progdefaults.rtty_shift = o->value();
if (progdefaults.rtty_shift == o->size() - 2) {
    progdefaults.rtty_shift = -1;
    selCustomShift->activate();
}
else
    selCustomShift->deactivate();
resetRTTY();
progdefaults.changed = true;} open
                tooltip {Select carrier shift} xywh {15 70 100 20} down_box BORDER_BOX align 8 when 1
                code0 {o->add(szShifts);}
              } {}
              Fl_Choice selBaud {
                label {Baud rate}
                callback {progdefaults.rtty_baud = o->value();
resetRTTY();
progdefaults.changed = true;} open
                tooltip {Select carrier baudrate} xywh {15 130 100 20} down_box BORDER_BOX align 8 when 1
                code0 {o->add(szBauds);}
              } {}
              Fl_Choice selBits {
                label {Bits per character}
                callback {progdefaults.rtty_bits = o->value();
selParity->do_callback();} open
                tooltip {Select \# bits / char} xywh {15 160 100 20} down_box BORDER_BOX align 8 when 1
                code0 {o->add(szSelBits);}
              } {}
              Fl_Choice selParity {
                label Parity
                callback {if (progdefaults.rtty_bits == 0)
  o->value(progdefaults.rtty_parity = RTTY_PARITY_NONE);
else
  progdefaults.rtty_parity = o->value();
resetRTTY();
progdefaults.changed = true;} open
                tooltip {Select parity} xywh {15 190 100 20} down_box BORDER_BOX align 8 when 1
                code0 {o->add(szParity);}
              } {}
              Fl_Choice selStopBits {
                label {Stop bits}
                callback {progdefaults.rtty_stop = o->value();
resetRTTY();
progdefaults.changed = true;} open
                tooltip {Select \# stop bits} xywh {15 220 100 20} down_box BORDER_BOX align 8 when 1
                code0 {o->add(szStopBits);}
              } {}
              Fl_Group {} {open
                xywh {255 68 230 80} box ENGRAVED_FRAME
              } {
                Fl_Check_Button btnAUTOCRLF {
                  label AutoCRLF
                  callback {progdefaults.rtty_autocrlf = o->value();
progdefaults.changed = true;}
                  tooltip {Add CRLF after page width characters} xywh {265 79 90 22} down_box DOWN_BOX
                  code0 {o->value(progdefaults.rtty_autocrlf);}
                }
                Fl_Check_Button btnCRCRLF {
                  label {CR-CR-LF}
                  callback {progdefaults.rtty_crcrlf = o->value();
progdefaults.changed = true;}
                  tooltip {Use "cr cr lf" for "cr lf"} xywh {385 79 90 22} down_box DOWN_BOX when 6
                  code0 {o->value(progdefaults.rtty_crcrlf);}
                }
                Fl_Counter cntrAUTOCRLF {
                  label characters
                  callback {progdefaults.rtty_autocount = (int)o->value();
progdefaults.changed = true;}
                  tooltip {Set page width} xywh {335 118 65 20} type Simple align 8 minimum 68 maximum 80 step 1 value 72
                  code0 {o->labelsize(FL_NORMAL_SIZE);}
                  class Fl_Counter2
                }
                Fl_Box {} {
                  label {after:}
                  xywh {265 118 60 20} align 20
                }
              }
              Fl_Group {} {
                label {Unshift On Space} open
                xywh {320 158 165 62} box ENGRAVED_FRAME align 21
              } {
                Fl_Check_Button chkUOSrx {
                  label RX
                  callback {progdefaults.UOSrx=o->value();
progdefaults.changed = true;}
                  tooltip {Revert to Unsifted char's on a space} xywh {355 185 45 20} down_box DOWN_BOX
                  code0 {o->value(progdefaults.UOSrx);}
                }
                Fl_Check_Button chkUOStx {
                  label TX
                  callback {progdefaults.UOStx=o->value();
progdefaults.changed = true;}
                  tooltip {Revert to Unsifted char's on a space} xywh {420 185 45 20} down_box DOWN_BOX
                  code0 {o->value(progdefaults.UOStx);}
                }
              }
              Fl_Check_Button btnPreferXhairScope {
                label {Use cross hair scope}
                callback {progdefaults.PreferXhairScope=o->value();
progdefaults.changed = true;}
                tooltip {Default to cross hair digiscope} xywh {15 254 165 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.PreferXhairScope);}
              }
              Fl_Check_Button chkPseudoFSK {
                label {Pseudo-FSK on right audio channel}
                callback {if (o->value() && !sound_check_right_channel()) {
  o->value(0);
  return;
}
progdefaults.PseudoFSK = o->value();
progdefaults.changed = true;}
                tooltip {Create square wave on right channel} xywh {15 284 270 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.PseudoFSK);}
              }
              Fl_Choice mnuRTTYAFCSpeed {
                label {AFC speed}
                callback {progdefaults.rtty_afcspeed = o->value();
progdefaults.changed = true;} open
                tooltip {AFC tracking speed} xywh {320 254 80 20} down_box BORDER_BOX align 8
                code0 {o->add("Slow"); o->add("Normal"); o->add("Fast");}
                code1 {o->value(progdefaults.rtty_afcspeed);}
              } {}
              Fl_Check_Button chkXagc {
                label {X-agc (hidden)}
                callback {progdefaults.Xagc=o->value();
progdefaults.changed = true;}
                xywh {320 223 62 22} down_box DOWN_BOX
                code0 {o->value(progdefaults.Xagc);}
                code1 {o->hide();}
              }
              Fl_Value_Slider sldrRTTYbandwidth {
                label {Receive filter bandwidth}
                callback {progdefaults.RTTY_BW = o->value();}
                tooltip {Adjust the DSP bandwidth} xywh {100 325 300 20} type Horizontal align 5 minimum 5 maximum 1000 step 1 value 25 textsize 14
                code0 {o->value(progdefaults.RTTY_BW);}
                code1 {o->labelsize(FL_NORMAL_SIZE); o->textsize(FL_NORMAL_SIZE);}
                class Fl_Value_Slider2
              }
              Fl_Counter selCustomShift {
                label {Custom shift}
                callback {progdefaults.rtty_custom_shift = o->value();
resetRTTY();
progdefaults.changed = true;}
                tooltip {Input carrier shift} xywh {15 100 100 20} align 8 minimum 10 maximum 1000 step 1 value 450
                code0 {o->lstep(10.0);}
                code1 {o->labelsize(FL_NORMAL_SIZE);}
                class Fl_Counter2
              }
            }
          }
          Fl_Group tabTHOR {
            label Thor open
            xywh {0 50 500 320} hide
          } {
            Fl_Group {} {open
              xywh {5 60 490 170} box ENGRAVED_FRAME
            } {
              Fl_Input txtTHORSecondary {
                label {Secondary Text}
                callback {progdefaults.THORsecText = o->value();
progdefaults.changed = true;}
                tooltip {Text to send during keyboard idle times} xywh {15 87 360 40} type Multiline align 5 when 1
                code0 {txtTHORSecondary->labelsize(FL_NORMAL_SIZE);}
                class Fl_Input2
              }
              Fl_Check_Button valTHOR_FILTER {
                label Filtering
                callback {progdefaults.THOR_FILTER = o->value();
resetTHOR();
progdefaults.changed = true;}
                tooltip {Enable DSP prior to decoder} xywh {15 141 80 20} down_box DOWN_BOX value 1
                code0 {o->value(progdefaults.THOR_FILTER);}
              }
              Fl_Counter valTHOR_BW {
                label {Filter bandwidth factor}
                callback {progdefaults.THOR_BW = o->value();
resetTHOR();
progdefaults.changed = true;}
                tooltip {Filter bandwidth relative to signal width} xywh {156 141 63 20} type Simple align 8 minimum 1 maximum 2 value 1.5
                code0 {o->value(progdefaults.THOR_BW);}
                code1 {o->labelsize(FL_NORMAL_SIZE);}
                class Fl_Counter2
              }
              Fl_Value_Slider valThorCWI {
                label {CWI threshold}
                callback {progdefaults.ThorCWI = o->value();
progdefaults.changed = true;}
                tooltip {CWI detection and suppression} xywh {15 194 260 20} type Horizontal align 1 textsize 14
                code0 {o->value(progdefaults.ThorCWI);}
                code1 {o->labelsize(FL_NORMAL_SIZE); o->textsize(FL_NORMAL_SIZE);}
                class Fl_Value_Slider2
              }
              Fl_Counter valTHOR_PATHS {
                label {Paths (hidden)}
                callback {progdefaults.THOR_PATHS = (int)o->value();
progdefaults.changed = true;}
                xywh {353 193 75 21} type Simple align 1 minimum 4 maximum 8 step 1 value 5
                code0 {o->value(progdefaults.THOR_PATHS);}
                code1 {o->labelsize(FL_NORMAL_SIZE);}
                code2 {o->hide();}
                class Fl_Counter2
              }
            }
          }
        }
      }
      Fl_Group tabRig {
        label Rig open
        tooltip {Transceiver control} xywh {0 25 500 345} hide
      } {
        Fl_Tabs tabsRig {open
          xywh {0 25 500 345} selection_color 50
        } {
          Fl_Group {} {
            label {Hardware PTT} open
            xywh {0 50 500 320}
          } {
            Fl_Group grpHWPTT {
              label {h/w ptt device-pin} open
              xywh {5 100 490 265} box ENGRAVED_FRAME align 21
            } {
              Fl_Input_Choice inpTTYdev {
                label {Device:}
                callback {btnInitHWPTT->labelcolor(FL_RED);
btnInitHWPTT->redraw();
progdefaults.changed = true;} open
                tooltip {Select serial port} xywh {200 209 160 22}
              } {}
              Fl_Round_Button btnRTSptt {
                label {Use RTS}
                callback {btnInitHWPTT->labelcolor(FL_RED);
btnInitHWPTT->redraw();
progdefaults.changed = true;}
                tooltip {RTS is PTT signal line} xywh {145 248 85 20} down_box DOWN_BOX
              }
              Fl_Round_Button btnRTSplusV {
                label {RTS = +V}
                callback {btnInitHWPTT->labelcolor(FL_RED);
btnInitHWPTT->redraw();
progdefaults.changed = true;}
                tooltip {Initial voltage on RTS} xywh {262 248 100 20} down_box DOWN_BOX
              }
              Fl_Round_Button btnDTRptt {
                label {Use DTR}
                callback {btnInitHWPTT->labelcolor(FL_RED);
btnInitHWPTT->redraw();
progdefaults.changed = true;}
                tooltip {DTR is PTT signal line} xywh {145 278 85 20} down_box DOWN_BOX
              }
              Fl_Round_Button btnDTRplusV {
                label {DTR = +V}
                callback {btnInitHWPTT->labelcolor(FL_RED);
btnInitHWPTT->redraw();
progdefaults.changed = true;}
                tooltip {Initial voltage on DTR} xywh {262 278 100 20} down_box DOWN_BOX
              }
              Fl_Button btnInitHWPTT {
                label Initialize
                callback {progdefaults.initInterface();
o->labelcolor(FL_FOREGROUND_COLOR);
progdefaults.changed = true;}
                tooltip {Initialize the H/W PTT interface} xywh {188 316 113 24}
              }
              Fl_Round_Button btnTTYptt {
                label {Use separate serial port PTT}
                callback {btnUsePPortPTT->value(false);
btnUseUHrouterPTT->value(false);

progdefaults.TTYptt = o->value();
progdefaults.UsePPortPTT = false;
progdefaults.UseUHrouterPTT = false;
btnInitHWPTT->labelcolor(FL_RED);
btnInitHWPTT->redraw();
progdefaults.changed = true;}
                xywh {145 110 220 20} down_box DOWN_BOX selection_color 1
              }
              Fl_Round_Button btnUsePPortPTT {
                label {Use parallel port PTT}
                callback {btnTTYptt->value(false);
btnUseUHrouterPTT->value(false);

progdefaults.TTYptt = false;
progdefaults.UsePPortPTT = o->value();
progdefaults.UseUHrouterPTT = false;
btnInitHWPTT->labelcolor(FL_RED);
btnInitHWPTT->redraw();
progdefaults.changed = true;}
                xywh {145 140 170 20} down_box DOWN_BOX selection_color 1
              }
              Fl_Round_Button btnUseUHrouterPTT {
                label {Use uHRouter PTT}
                callback {btnTTYptt->value(false);
btnUsePPortPTT->value(false);

progdefaults.TTYptt = false;
progdefaults.UsePPortPTT = false;
progdefaults.UseUHrouterPTT = o->value();
btnInitHWPTT->labelcolor(FL_RED);
btnInitHWPTT->redraw();
progdefaults.changed = true;}
                xywh {145 170 170 20} down_box DOWN_BOX selection_color 1
              }
            }
            Fl_Group {} {open
              xywh {5 60 490 38} box ENGRAVED_FRAME
            } {
              Fl_Check_Button btnPTTrightchannel {
                label {PTT tone on right audio channel }
                callback {if (o->value() && !sound_check_right_channel()) {
  o->value(0);
  return;
}
progdefaults.PTTrightchannel = o->value();
progdefaults.changed = true;}
                tooltip {Can be used in lieu of or in addition to other PTT types} xywh {130 69 250 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.PTTrightchannel);}
              }
            }
          }
          Fl_Group {} {
            label RigCAT open
            tooltip {Rig Control using xml spec file} xywh {0 50 500 320} hide
          } {
            Fl_Check_Button chkUSERIGCAT {
              label {Use RigCAT}
              callback {if (o->value() == 1) {
  chkUSEHAMLIB->value(0);
  chkUSEMEMMAP->value(0);
  chkUSEXMLRPC->value(0);
  progdefaults.chkUSEMEMMAPis = false;
  progdefaults.chkUSEHAMLIBis = false;
  progdefaults.chkUSERIGCATis = true;
  progdefaults.chkUSEXMLRPCis = false;
  } else {
  progdefaults.chkUSERIGCATis = false;
  }
btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw();}
              tooltip {RigCAT used for rig control} xywh {195 60 110 20} down_box DOWN_BOX
            }
            Fl_Group grpRigCAT {open
              xywh {5 83 490 279} box ENGRAVED_FRAME
            } {
              Fl_Output txtXmlRigFilename {
                label {Rig description file:}
                tooltip {Use Open to select descriptor file} xywh {15 107 130 22} color 52 align 5
                code0 {o->value(fl_filename_name(progdefaults.XmlRigFilename.c_str()));}
              }
              Fl_Button btnSelectRigXmlFile {
                label {Open...}
                callback {btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw_label();
selectRigXmlFilename();}
                tooltip {Select rig descriptor file} xywh {148 107 60 22}
              }
              Fl_Input_Choice inpXmlRigDevice {
                label {Device:}
                callback {btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw_label();
btnRevertRIGCAT->activate();} open
                tooltip {Serial device} xywh {341 107 144 22}
                code0 {o->value(progdefaults.XmlRigDevice.c_str());}
              } {}
              Fl_Value_Input cntRigCatRetries {
                label Retries
                callback {btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw_label();
btnRevertRIGCAT->activate();}
                tooltip {\# retries before giving up} xywh {30 150 60 22} align 5 maximum 1000 step 1
                code0 {o->value(progdefaults.RigCatRetries);}
                code1 {o->labelsize(FL_NORMAL_SIZE);}
                class Fl_Value_Input2
              }
              Fl_Value_Input cntRigCatTimeout {
                label {Retry interval (ms)}
                callback {btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw_label();
btnRevertRIGCAT->activate();}
                tooltip {Time between retires in msec} xywh {148 150 60 22} align 5 maximum 10000 step 1
                code0 {o->value(progdefaults.RigCatTimeout);}
                code1 {o->labelsize(FL_NORMAL_SIZE);}
                class Fl_Value_Input2
              }
              Fl_Value_Input cntRigCatWait {
                label {Write delay (ms)}
                callback {btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw_label();
btnRevertRIGCAT->activate();}
                xywh {30 190 60 22} align 5 maximum 10000 step 1
                code0 {o->value(progdefaults.RigCatWait);}
                code1 {o->labelsize(FL_NORMAL_SIZE);}
                class Fl_Value_Input2
              }
              Fl_Choice mnuXmlRigBaudrate {
                label {Baud rate:}
                callback {btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw_label();
btnRevertRIGCAT->activate();} open
                tooltip {Pick baud rate from list} xywh {386 150 99 22} down_box BORDER_BOX
                code0 {o->add(szBaudRates);}
                code1 {o->value(progdefaults.XmlRigBaudrate);}
              } {}
              Fl_Counter valRigCatStopbits {
                label Stopbits
                callback {btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw();
btnRevertRIGCAT->activate();}
                xywh {388 184 95 21} type Simple align 4 minimum 1 maximum 2 step 1 value 1
                code0 {o->value(progdefaults.RigCatStopbits);}
                code1 {o->labelsize(FL_NORMAL_SIZE);}
                class Fl_Counter2
              }
              Fl_Button btnInitRIGCAT {
                label Initialize
                callback {progdefaults.initInterface();
o->labelcolor(FL_FOREGROUND_COLOR);
progdefaults.changed = true;}
                tooltip {Initialize RigCAT interface} xywh {365 321 113 24}
              }
              Fl_Check_Button btnRigCatEcho {
                label {Commands are echoed}
                callback {btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw_label();
progdefaults.changed = true;
btnRevertRIGCAT->activate();}
                tooltip {Rig or interface echos serial data} xywh {50 216 192 22} down_box DOWN_BOX
                code0 {o->value(progdefaults.RigCatECHO);}
              }
              Fl_Round_Button btnRigCatCMDptt {
                label {CAT command for PTT}
                callback {if (o->value()== 1) {
  btnRigCatRTSptt->value(0);
  btnRigCatDTRptt->value(0);
}
  
btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw();
btnRevertRIGCAT->activate();}
                tooltip {PTT is a CAT command (not hardware)} xywh {256 217 207 20} down_box DOWN_BOX selection_color 1
                code0 {o->value(progdefaults.RigCatCMDptt);}
              }
              Fl_Round_Button btnRigCatRTSptt {
                label {Toggle RTS for PTT}
                callback {if (o->value() == 1) {
//  btnRigCatDTRptt->value(0);
  btnRigCatCMDptt->value(0);
}

btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw_label();
btnRevertRIGCAT->activate();}
                tooltip {RTS is ptt line} xywh {50 250 160 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.RigCatRTSptt);}
              }
              Fl_Round_Button btnRigCatDTRptt {
                label {Toggle DTR for PTT}
                callback {if (o->value() == 1) {
//  btnRigCatRTSptt->value(0);
  btnRigCatCMDptt->value(0);
}

btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw_label();
btnRevertRIGCAT->activate();}
                tooltip {DTR is ptt line} xywh {256 250 160 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.RigCatDTRptt);}
              }
              Fl_Check_Button btnRigCatRTSplus {
                label {RTS +12 v}
                callback {btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw_label();
btnRevertRIGCAT->activate();}
                tooltip {Initial state of RTS} xywh {50 285 100 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.RigCatRTSplus);}
              }
              Fl_Check_Button btnRigCatDTRplus {
                label {DTR +12 v}
                callback {btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw_label();
btnRevertRIGCAT->activate();}
                tooltip {Initial state of DTR} xywh {256 285 100 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.RigCatDTRplus);}
              }
              Fl_Check_Button chkRigCatRTSCTSflow {
                label {RTS/CTS flow control}
                callback {btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw_label();
btnRevertRIGCAT->activate();}
                tooltip {Rig uses RTS/CTS handshake} xywh {50 320 170 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.RigCatRTSCTSflow);}
              }
              Fl_Button btnRevertRIGCAT {
                label Revert
                callback {btnInitRIGCAT->labelcolor(FL_FOREGROUND_COLOR);
btnInitRIGCAT->redraw_label();
rigCAT_restore_defaults();}
                tooltip {Initialize hamlib interface} xywh {365 289 113 24} deactivate
                code0 {\#include "rigio.h"}
              }
              Fl_Check_Button chkRigCatVSP {
                label {VSP Enable}
                callback {btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw_label();
btnRevertRIGCAT->activate();}
                tooltip {Virtual Serial Port Emulator - suppress WARNINGS} xywh {256 315 100 25} down_box DOWN_BOX
                code0 {o->value(progdefaults.RigCatVSP);}
              }
            }
          }
          Fl_Group tabHamlib {
            label Hamlib open
            xywh {0 50 500 320} hide
          } {
            Fl_Check_Button chkUSEHAMLIB {
              label {Use Hamlib}
              callback {progdefaults.chkUSEHAMLIBis = o->value();
if (o->value() == 1) {
  chkUSEMEMMAP->value(0);
  chkUSERIGCAT->value(0);
  chkUSEXMLRPC->value(0);
  progdefaults.chkUSEMEMMAPis = false;
  progdefaults.chkUSERIGCATis = false;
  progdefaults.chkUSEXMLRPCis = false;
}
  
btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw();
progdefaults.changed = true;}
              tooltip {Hamlib used for rig control} xywh {195 60 100 20} down_box DOWN_BOX
            }
            Fl_Group grpHamlib {open
              xywh {5 83 490 277} box ENGRAVED_FRAME
            } {
              Fl_Box cboHamlibRig {
                label {Rig:}
                callback {btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();
btnRevertHAMLIB->activate();
\#if USE_HAMLIB
hamlib_get_defaults();
\#endif}
                tooltip {Select the rig by name} xywh {65 93 160 22} box DOWN_BOX color 7 align 4
                code0 {o->readonly();}
                code1 {cboHamlibRig->labelsize(FL_NORMAL_SIZE);}
                class Fl_ComboBox
              }
              Fl_Input_Choice inpRIGdev {
                label {Device:}
                callback {btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();
btnRevertHAMLIB->activate();} open
                tooltip {Serial port} xywh {340 93 144 22}
                code0 {o->value(progdefaults.HamRigDevice.c_str());}
              } {}
              Fl_Value_Input cntHamlibRetries {
                label Retries
                callback {btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();
btnRevertHAMLIB->activate();}
                tooltip {\# times to resend command before giving up} xywh {30 133 70 24} align 5 maximum 1000 step 1
                code0 {o->value(progdefaults.HamlibRetries);}
                code1 {o->labelsize(FL_NORMAL_SIZE);}
                class Fl_Value_Input2
              }
              Fl_Value_Input cntHamlibTimeout {
                label {Retry Interval (ms)}
                callback {btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();
btnRevertHAMLIB->activate();}
                tooltip {Msec's between retries} xywh {155 133 70 24} align 5 maximum 10000 step 1
                code0 {o->value(progdefaults.HamlibTimeout);}
                code1 {o->labelsize(FL_NORMAL_SIZE);}
                class Fl_Value_Input2
              }
              Fl_Value_Input cntHamlibWriteDelay {
                label {Write delay (ms)}
                callback {btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();
btnRevertHAMLIB->activate();}
                tooltip {Msec's between sequential commands} xywh {30 176 70 24} align 5 maximum 10000 step 1
                code0 {o->value(progdefaults.HamlibWriteDelay);}
                code1 {o->labelsize(FL_NORMAL_SIZE);}
                class Fl_Value_Input2
              }
              Fl_Value_Input cntHamlibWait {
                label {Post write delay (ms)}
                callback {btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();
btnRevertHAMLIB->activate();}
                tooltip {Wait interval (msecs) before reading response} xywh {156 176 70 24} align 5 maximum 10000 step 1
                code0 {o->value(progdefaults.HamlibWait);}
                code1 {o->labelsize(FL_NORMAL_SIZE);}
                class Fl_Value_Input2
              }
              Fl_Choice mnuBaudRate {
                label {Baud rate:}
                callback {btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();
btnRevertHAMLIB->activate();} open
                tooltip {Serial port baud rate} xywh {385 127 99 22} down_box BORDER_BOX
                code0 {o->add(szBaudRates);}
                code1 {o->value(progdefaults.HamRigBaudrate);}
              } {}
              Fl_Counter valHamRigStopbits {
                label Stopbits
                callback {progdefaults.HamRigStopbits = (int)o->value();
btnRevertHAMLIB->activate();
progdefaults.changed = true;}
                xywh {389 163 95 21} type Simple align 4 minimum 1 maximum 2 step 1 value 1
                code0 {o->value(progdefaults.HamRigStopbits);}
                code1 {o->labelsize(FL_NORMAL_SIZE);}
                class Fl_Counter2
              }
              Fl_Counter cntHamlibTimeout0 {
                label {Retry interval (ms)}
                callback {progdefaults.HamlibTimeout = (int)o->value();
btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();}
                tooltip {Msec's between retries} xywh {150 140 100 20} type Simple align 5 minimum 2 maximum 20000 step 1 value 10 hide
                code0 {o->value(progdefaults.HamlibTimeout);}
                class Fl_Counter2
              }
              Fl_Input inpHamlibConfig {
                label {Advanced configuration:}
                callback {btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();
btnRevertHAMLIB->activate();}
                tooltip {Optional configuration
in format: param=val ...} xywh {20 326 320 22} align 5
                code0 {inpHamlibConfig->value(progdefaults.HamConfig.c_str());}
                code1 {inpHamlibConfig->labelsize(FL_NORMAL_SIZE);}
                class Fl_Input2
              }
              Fl_Button btnInitHAMLIB {
                label Initialize
                callback {progdefaults.initInterface();
o->labelcolor(FL_FOREGROUND_COLOR);
btnRevertHAMLIB->deactivate();
progdefaults.changed = true;}
                tooltip {Initialize hamlib interface} xywh {371 325 113 24}
              }
              Fl_Choice mnuSideband {
                label {Sideband:} open
                tooltip {Force the rig sideband. Takes
effect when rig mode changes.} xywh {340 217 144 22} down_box BORDER_BOX align 5
              } {}
              Fl_Round_Button btnHamlibCMDptt {
                label {PTT via Hamlib command}
                callback {btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();
btnRevertHAMLIB->activate();}
                tooltip {PTT is a hamlib command} xywh {45 218 200 20} down_box DOWN_BOX selection_color 1
                code0 {o->value(progdefaults.HamlibCMDptt);}
              }
              Fl_Check_Button btnHamlibDTRplus {
                label {DTR +12}
                callback {btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();
btnRevertHAMLIB->activate();}
                tooltip {Initial state of DTR} xywh {45 243 90 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.HamlibDTRplus);}
              }
              Fl_Check_Button chkHamlibRTSplus {
                label {RTS +12}
                callback {if (o->value() == 1)
  chkHamlibRTSCTSflow->value(0);
btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();
btnRevertHAMLIB->activate();}
                tooltip {Initial state of RTS} xywh {269 243 85 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.HamlibRTSplus);}
              }
              Fl_Check_Button chkHamlibRTSCTSflow {
                label {RTS/CTS flow control}
                callback {if (o->value() == 1) {
  chkHamlibXONXOFFflow->value(0);
  chkHamlibRTSplus->deactivate();
} else
  chkHamlibRTSplus->activate();
btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();
btnRevertHAMLIB->activate();}
                tooltip {Rig requires RTS/CTS flow control} xywh {45 271 170 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.HamlibRTSCTSflow);}
                code1 {if (o->value()) chkHamlibRTSplus->deactivate();}
              }
              Fl_Check_Button chkHamlibXONXOFFflow {
                label {XON/XOFF flow control}
                callback {if (o->value() == 1)
  chkHamlibRTSCTSflow->value(0);
btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();
btnRevertHAMLIB->activate();}
                tooltip {Rig requires Xon/Xoff flow control} xywh {269 271 185 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.HamlibXONXOFFflow);}
              }
              Fl_Button btnRevertHAMLIB {
                label Revert
                callback {btnInitHAMLIB->labelcolor(FL_FOREGROUND_COLOR);
btnInitHAMLIB->redraw_label();
\#if USE_HAMLIB
hamlib_restore_defaults();
\#endif}
                tooltip {Initialize hamlib interface} xywh {371 294 113 24} deactivate
              }
            }
          }
          Fl_Group {} {
            label MemMap open
            xywh {0 50 500 320} hide
          } {
            Fl_Group grpMemmap {open
              xywh {5 60 490 185} box ENGRAVED_FRAME
            } {
              Fl_Output {} {
                xywh {160 79 190 58} type Multiline box BORDER_BOX color 50
                code0 {o->value("Control via Memory Mapped\\nshared variables\\ni.e.: Kachina program");}
              }
              Fl_Check_Button chkUSEMEMMAP {
                label {Use Memmap}
                callback {progdefaults.chkUSEMEMMAPis = o->value();
if(o->value() == 1){
  chkUSEHAMLIB->value(0);
  chkUSERIGCAT->value(0);
  chkUSEXMLRPC->value(0);
  progdefaults.chkUSEHAMLIBis = false;
  progdefaults.chkUSERIGCATis = false;
  progdefaults.chkUSEXMLRPCis = false;
}
  
btnInitMEMMAP->labelcolor(FL_RED);
btnInitMEMMAP->redraw_label();
progdefaults.changed = true;}
                tooltip {Rig control via memory mapped Kachina} xywh {160 147 120 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.chkUSEMEMMAPis);}
              }
              Fl_Round_Button btnMEMMAPptt {
                label {Use Memmap PTT}
                callback {progdefaults.MEMMAPptt=o->value();

btnInitMEMMAP->labelcolor(FL_RED);
btnInitMEMMAP->redraw_label();
progdefaults.changed = true;}
                xywh {160 177 150 20} down_box DOWN_BOX selection_color 1
              }
              Fl_Button btnInitMEMMAP {
                label Initialize
                callback {progdefaults.initInterface();
o->labelcolor(FL_FOREGROUND_COLOR);
progdefaults.changed = true;}
                tooltip {Initialize Memmap interface} xywh {197 207 113 24}
              }
            }
          }
          Fl_Group tabXMLRPC {
            label {XML-RPC} open
            xywh {0 50 500 320} hide
          } {
            Fl_Group grpXMLRPC {open
              xywh {5 60 490 160} box ENGRAVED_FRAME
            } {
              Fl_Output {} {
                xywh {160 79 190 58} type Multiline box BORDER_BOX color 50
                code0 {o->value("Rig control via external\\nprogram using xmlrpc\\nremote calls.");}
              }
              Fl_Check_Button chkUSEXMLRPC {
                label {Use XML-RPC program}
                callback {progdefaults.chkUSEXMLRPCis = o->value();
if(o->value() == 1){
  chkUSEHAMLIB->value(0);
  chkUSERIGCAT->value(0);
  chkUSEMEMMAP->value(0);
  progdefaults.chkUSEMEMMAPis = false;
  progdefaults.chkUSEHAMLIBis = false;
  progdefaults.chkUSERIGCATis = false;
}
  
btnInitXMLRPC->labelcolor(FL_RED);
btnInitXMLRPC->redraw_label();
progdefaults.changed = true;}
                tooltip Experimental xywh {160 147 183 20} down_box DOWN_BOX
              }
              Fl_Button btnInitXMLRPC {
                label Initialize
                callback {progdefaults.initInterface();
o->labelcolor(FL_FOREGROUND_COLOR);
progdefaults.changed = true;}
                tooltip {Initialize XML-RPC rig control} xywh {201 183 113 24}
              }
            }
          }
        }
      }
      Fl_Group tabSoundCard {
        label Audio
        tooltip {Audio devices} xywh {0 25 500 345} hide
      } {
        Fl_Tabs tabsSoundCard {open
          xywh {0 25 500 345} selection_color 50
        } {
          Fl_Group tabAudio {
            label Devices open
            xywh {0 50 500 320}
          } {
            Fl_Group AudioOSS {open
              xywh {5 60 490 45} box ENGRAVED_FRAME
            } {
              Fl_Round_Button {btnAudioIO[0]} {
                label OSS
                callback {sound_update(SND_IDX_OSS);
progdefaults.changed = true;
resetSoundCard();}
                tooltip {Use OSS audio server} xywh {15 70 53 25} down_box DOWN_BOX selection_color 1
              }
              Fl_Input_Choice menuOSSDev {
                label {Device:}
                callback {scDevice[0] = scDevice[1] = progdefaults.OSSdevice = o->value();
resetSoundCard();
progdefaults.changed = true;} open
                tooltip {Select device} xywh {375 70 110 25}
                code0 {o->value(progdefaults.OSSdevice.c_str());}
              } {}
            }
            Fl_Group AudioPort {open
              xywh {5 105 490 80} box ENGRAVED_FRAME
            } {
              Fl_Round_Button {btnAudioIO[1]} {
                label PortAudio
                callback {sound_update(SND_IDX_PORT);
progdefaults.changed = true;
resetSoundCard();}
                tooltip {Use Port Audio server} xywh {15 133 95 25} down_box DOWN_BOX selection_color 1
              }
              Fl_Choice menuPortInDev {
                label {Capture:}
                callback {scDevice[0] = progdefaults.PortInDevice = o->text();
progdefaults.PortInIndex = reinterpret_cast<intptr_t>(o->mvalue()->user_data());
resetSoundCard();
progdefaults.changed = true;} open
                tooltip {Audio input device} xywh {215 115 270 25} down_box BORDER_BOX
              } {}
              Fl_Choice menuPortOutDev {
                label {Playback:}
                callback {scDevice[1] = progdefaults.PortOutDevice = o->text();
progdefaults.PortOutIndex = reinterpret_cast<intptr_t>(o->mvalue()->user_data());
resetSoundCard();
progdefaults.changed = true;} open
                tooltip {Audio output device} xywh {215 150 270 25} down_box BORDER_BOX
              } {}
            }
            Fl_Group AudioPulse {open
              xywh {5 185 490 45} box ENGRAVED_FRAME
            } {
              Fl_Round_Button {btnAudioIO[2]} {
                label PulseAudio
                callback {sound_update(SND_IDX_PULSE);
progdefaults.changed = true;
resetSoundCard();}
                tooltip {Use Pulse Audio server} xywh {15 196 100 25} down_box DOWN_BOX selection_color 1
              }
              Fl_Input inpPulseServer {
                label {Server string:}
                callback {scDevice[0] = scDevice[1] = progdefaults.PulseServer = o->value();
resetSoundCard();
progdefaults.changed = true;}
                tooltip {Leave this blank or refer to
http://www.pulseaudio.org/wiki/ServerStrings} xywh {260 196 225 25}
                code0 {o->value(progdefaults.PulseServer.c_str());}
                code1 {inpPulseServer->labelsize(FL_NORMAL_SIZE);}
                class Fl_Input2
              }
            }
            Fl_Group AudioNull {open
              xywh {5 230 490 45} box ENGRAVED_FRAME
            } {
              Fl_Round_Button {btnAudioIO[3]} {
                label {File I/O only}
                callback {sound_update(SND_IDX_NULL);
progdefaults.changed = true;
resetSoundCard();}
                tooltip {NO AUDIO DEVICE AVAILABLE (or testing)} xywh {16 240 100 25} down_box DOWN_BOX selection_color 1
              }
            }
          }
          Fl_Group tabAudioOpt {
            label Settings open
            xywh {0 50 500 320} hide
          } {
            Fl_Group grpAudioSampleRate {
              label {Sample rate} open
              xywh {5 60 490 90} box ENGRAVED_FRAME align 21
            } {
              Fl_Choice menuInSampleRate {
                label Capture
                callback {progdefaults.in_sample_rate = o->value() > 1 ? strtol(o->mvalue()->text, 0, 10) : o->value();
resetSoundCard();
progdefaults.changed = true;} open
                tooltip {Force a specific sample rate. Select "Native" if "Auto"
does not work well with your audio device.} xywh {15 89 100 20} down_box BORDER_BOX align 8
                code0 {//extern Fl_Menu_Item sample_rate_menu[];}
                code1 {//o->menu(sample_rate_menu);}
                code2 {o->clear_changed();}
              } {}
              Fl_Choice menuOutSampleRate {
                label Playback
                callback {progdefaults.out_sample_rate = o->value() > 1 ? strtol(o->mvalue()->text, 0, 10) : o->value();
resetSoundCard();
progdefaults.changed = true;} open
                xywh {15 119 100 20} down_box BORDER_BOX align 8
                code0 {//extern Fl_Menu_Item sample_rate_menu[];}
                code1 {//o->menu(sample_rate_menu);}
                code2 {o->clear_changed();}
                code3 {o->tooltip(menuInSampleRate->tooltip());}
              } {}
              Fl_Choice menuSampleConverter {
                label Converter
                callback {if (o->value() == FLDIGI_SRC_BEST)
    fl_alert2("The best quality SINC interpolator has very high CPU overhead");
progdefaults.sample_converter = sample_rate_converters[o->value()];
resetSoundCard();
progdefaults.changed = true;
o->tooltip(src_get_description(sample_rate_converters[o->value()]));} open
                tooltip {Set the type of resampler used of offset correction} xywh {269 89 216 20} down_box BORDER_BOX align 1
                code0 {\#include <FL/fl_ask.H>}
              } {}
            }
            Fl_Group {} {
              label Corrections open
              xywh {5 150 490 62} box ENGRAVED_FRAME align 21
            } {
              Fl_Spinner cntRxRateCorr {
                label {RX ppm}
                callback {progdefaults.RX_corr = (int)o->value();
progdefaults.changed = true;}
                tooltip {RX sound card correction} xywh {15 180 85 20} align 8
                code0 {o->step(1);}
                code1 {o->minimum(-50000);}
                code2 {o->maximum(50000);}
                code3 {o->labelsize(FL_NORMAL_SIZE);}
                class Fl_Spinner2
              }
              Fl_Spinner cntTxRateCorr {
                label {TX ppm}
                callback {progdefaults.TX_corr = (int)o->value();
progdefaults.changed = true;}
                tooltip {TX sound card correction} xywh {176 180 85 20} align 8
                code0 {o->step(1);}
                code1 {o->minimum(-50000);}
                code2 {o->maximum(50000);}
                code3 {o->labelsize(FL_NORMAL_SIZE);}
                class Fl_Spinner2
              }
              Fl_Spinner cntTxOffset {
                label {TX offset}
                callback {progdefaults.TxOffset = (int)o->value();
progdefaults.changed = true;}
                tooltip {Difference between Rx & Tx freq (rig offset)} xywh {338 180 85 20} align 8
                code0 {o->value(progdefaults.TxOffset);}
                code1 {o->step(1);}
                code2 {o->minimum(-50); o->maximum(50);}
                code3 {o->labelsize(FL_NORMAL_SIZE);}
                class Fl_Spinner2
              }
            }
            Fl_Check_Button chkAudioStereoOut {
              label {Enable right audio channel}
              callback {if (!o->value() && (progdefaults.PseudoFSK || progdefaults.QSK || progdefaults.PTTrightchannel))
    LOG_WARN("Disabling right audio channel while in use by the QSK, pseudo-FSK or audio PTT options");

progdefaults.out_channels = o->value() + 1;
resetSoundCard();
progdefaults.changed = true;}
              xywh {15 222 220 20} down_box DOWN_BOX
              code0 {chkAudioStereoOut->value(progdefaults.out_channels == 2);}
            }
          }
          Fl_Group tabMixer {
            label Mixer open
            xywh {0 50 500 320} hide
          } {
            Fl_Group {} {
              label {OSS mixer} open
              xywh {5 60 490 145} box ENGRAVED_FRAME align 21
            } {
              Fl_Check_Button btnMixer {
                label {Manage mixer}
                callback {enableMixer(o->value());
progdefaults.changed = true;}
                tooltip {Add mixer controls to main dialog} xywh {15 89 125 25} down_box DOWN_BOX
                code0 {extern void resetMixerControls();}
                code1 {o->value(progdefaults.EnableMixer);}
              }
              Fl_Input_Choice menuMix {
                label {Device:}
                callback {progdefaults.MXdevice = o->value();
enableMixer(false);
enableMixer(true);
progdefaults.changed = true;} open
                tooltip {Select Mixer device} xywh {161 132 110 25}
                code0 {o->value(progdefaults.MXdevice.c_str());}
              } {}
              Fl_Light_Button btnMicIn {
                label {Mic In}
                callback {if (o->value() == 1) {
    btnLineIn->value(0);
    progdefaults.LineIn = false;
    progdefaults.MicIn = true;
    setMixerInput(2);
} else {
    setMixerInput(0);
    progdefaults.MicIn = false;
}
progdefaults.changed = true;}
                tooltip {Use microphone input} xywh {281 93 74 25}
              }
              Fl_Light_Button btnLineIn {
                label {Line In}
                callback {if (o->value() == 1) {
    btnMicIn->value(0);
    progdefaults.LineIn = true;
    progdefaults.MicIn = false;
    setMixerInput(1);
} else {
    setMixerInput(0);
    progdefaults.LineIn = false;
}
progdefaults.changed = true;}
                tooltip {Use Line-In device} xywh {281 132 74 25} selection_color 3
                code0 {extern void setMixerInput(int);}
              }
              Fl_Value_Slider valPCMvolume {
                label PCM
                callback {setPCMvolume(o->value());
progdefaults.changed = true;}
                tooltip {Set the sound card PCM level} xywh {15 167 340 20} type Horizontal selection_color 15 align 8 value 0.8 textsize 14
                code0 {extern void setPCMvolume(double);}
                code1 {o->labelsize(FL_NORMAL_SIZE); o->textsize(FL_NORMAL_SIZE);}
                class Fl_Value_Slider2
              }
            }
          }
        }
      }
      Fl_Group tabID {
        label ID
        xywh {0 25 500 345} hide
      } {
        Fl_Group {} {
          label {Video Preamble ID} open
          xywh {5 35 490 103} box ENGRAVED_FRAME align 21
        } {
          Fl_Check_Button btnsendid {
            label {Transmit mode ID}
            callback {progdefaults.sendid=o->value();
progdefaults.changed = true;}
            tooltip {Waterfall video ID} xywh {15 58 150 20} down_box DOWN_BOX
          }
          Fl_Check_Button btnsendvideotext {
            label {Transmit video text}
            callback {progdefaults.sendtextid=o->value();
progdefaults.changed = true;}
            tooltip {Waterfall video text} xywh {15 83 155 20} down_box DOWN_BOX
            code0 {o->value(progdefaults.sendtextid);}
          }
          Fl_Input valVideotext {
            label {:}
            callback {progdefaults.strTextid = o->value();
progdefaults.changed = true;}
            tooltip {Limit to a few characters,
as in CQEM or IOTA etc.} xywh {182 83 161 20}
            code0 {o->value(progdefaults.strTextid.c_str());}
            code1 {valVideotext->labelsize(FL_NORMAL_SIZE);}
            class Fl_Input2
          }
          Fl_Check_Button chkID_SMALL {
            label {Use small font}
            callback {progdefaults.ID_SMALL=o->value();
progdefaults.changed = true;}
            tooltip {ON - small font
OFF - large font} xywh {15 109 120 20} down_box DOWN_BOX value 1
            code0 {o->value(progdefaults.ID_SMALL);}
          }
          Fl_Value_Slider sldrVideowidth {
            label {Chars/Row:}
            callback {progdefaults.videowidth = (int)o->value();
progdefaults.changed = true;}
            tooltip {Set the number of characters per row} xywh {243 109 100 20} type Horizontal align 4 minimum 1 maximum 8 step 1 value 4 textsize 14
            code0 {o->value(progdefaults.videowidth);}
            code2 {o->labelsize(FL_NORMAL_SIZE); o->textsize(FL_NORMAL_SIZE);}
            class Fl_Value_Slider2
          }
          Fl_Check_Button btn_vidlimit {
            label {500 Hz limit}
            callback {progdefaults.vidlimit=o->value();
progdefaults.changed = true;}
            xywh {352 85 110 15} down_box DOWN_BOX
            code0 {o->value(progdefaults.vidlimit);}
          }
          Fl_Check_Button btn_vidmodelimit {
            label {Mode width limit}
            callback {progdefaults.vidmodelimit=o->value();
progdefaults.changed=true;}
            xywh {352 111 110 15} down_box DOWN_BOX
            code0 {o->value(progdefaults.vidmodelimit);}
          }
          Fl_Button bVideoIDModes {
            label {Video ID modes}
            callback {mode_browser->label(o->label());
mode_browser->callback(0);
mode_browser->show(&progdefaults.videoid_modes);
progdefaults.changed = true;}
            xywh {223 58 120 20}
          }
        }
        Fl_Group sld {
          label {CW Postamble ID} open
          xywh {5 138 490 60} box ENGRAVED_FRAME align 21
        } {
          Fl_Check_Button btnCWID {
            label {Transmit callsign}
            callback {progdefaults.CWid = o->value();
progdefaults.changed = true;}
            tooltip {Send Callsign in CW at end of every transmission} xywh {15 165 140 20} down_box DOWN_BOX
            code0 {o->value(progdefaults.CWid);}
          }
          Fl_Value_Slider sldrCWIDwpm {
            label {Speed (WPM):}
            callback {progdefaults.CWIDwpm = (int)o->value();
progdefaults.changed = true;}
            tooltip {Send at this WPM} xywh {165 165 180 20} type Horizontal align 1 minimum 15 maximum 40 step 1 value 18 textsize 14
            code0 {o->value(progdefaults.CWIDwpm);}
            code1 {o->labelsize(FL_NORMAL_SIZE); o->textsize(FL_NORMAL_SIZE);}
            class Fl_Value_Slider2
          }
          Fl_Button bCWIDModes {
            label {CW ID modes}
            callback {mode_browser->label(o->label());
mode_browser->callback(0);
mode_browser->show(&progdefaults.cwid_modes);
progdefaults.changed = true;}
            xywh {365 165 120 20}
          }
        }
        Fl_Group {} {
          label {Reed-Solomon ID (Rx)} open
          xywh {5 198 295 167} box ENGRAVED_FRAME align 21
        } {
          Fl_Check_Button chkRSidWideSearch {
            label {Detector searches entire passband}
            callback {progdefaults.rsidWideSearch=o->value();
progdefaults.changed = true;}
            tooltip {ON - search over entire waterfall
OFF - limit search to +/- 200 Hz} xywh {15 247 270 20} down_box DOWN_BOX
            code0 {o->value(progdefaults.rsidWideSearch);}
          }
          Fl_Check_Button chkRSidMark {
            label {Mark previous frequency and mode}
            callback {progdefaults.rsid_mark = o->value();
progdefaults.changed = true;}
            tooltip {Insert RX text marker before
changing frequency and modem} xywh {15 270 270 20} down_box DOWN_BOX
            code0 {chkRSidMark->value(progdefaults.rsid_mark);}
          }
          Fl_Check_Button chkRSidAutoDisable {
            label {Reception disables detector}
            callback {progdefaults.rsid_auto_disable = o->value();
progdefaults.changed = true;}
            tooltip {Disable further detection when RSID is received} xywh {15 293 200 20} down_box DOWN_BOX
            code0 {if (progdefaults.rsid_notify_only) progdefaults.rsid_auto_disable = false;}
            code1 {chkRSidAutoDisable->value(progdefaults.rsid_auto_disable);}
            code2 {if (progdefaults.rsid_notify_only) chkRSidAutoDisable->deactivate();}
          }
          Fl_Check_Button chkRSidNotifyOnly {
            label {Notifications only}
            callback {progdefaults.rsid_notify_only = o->value();
notify_create_rsid_event(progdefaults.rsid_notify_only);
if (progdefaults.rsid_notify_only) {
    chkRSidAutoDisable->value(0);
    chkRSidAutoDisable->deactivate();
}
else
    chkRSidAutoDisable->activate();
progdefaults.changed = true;}
            tooltip {Check this to be notified when an RSID is received
without changing modem and frequency} xywh {15 317 155 20} down_box DOWN_BOX
            code0 {chkRSidNotifyOnly->value(progdefaults.rsid_notify_only);}
          }
          Fl_Button bRSIDRxModes {
            label {Receive modes}
            callback {mode_browser->label(o->label());
mode_browser->callback(0);
mode_browser->show(&progdefaults.rsid_rx_modes);
progdefaults.changed = true;}
            xywh {15 224 130 20}
          }
          Fl_Value_Slider sldrRSIDsquelch {
            label {Squelch open (sec)}
            callback {progdefaults.rsid_squelch = (int)o->value();
progdefaults.changed = true;}
            tooltip {Open squelch for nn sec if RSID detected} xywh {15 339 144 20} type Horizontal align 8 maximum 20 step 1 textsize 14
            code0 {o->value(progdefaults.rsid_squelch);}
            code2 {o->labelsize(FL_NORMAL_SIZE); o->textsize(FL_NORMAL_SIZE);}
            class Fl_Value_Slider2
          }
        }
        Fl_Group {} {
          label {Reed-Solomon ID (Tx)} open
          xywh {300 198 195 167} box ENGRAVED_FRAME align 21
        } {
          Fl_Check_Button chkRSidPost {
            label {Send at EOT}
            callback {progdefaults.rsid_post = o->value();
progdefaults.changed = true;}
            tooltip {Send RSID at end of transmission} xywh {310 247 120 20} down_box DOWN_BOX hide
            code0 {o->value(progdefaults.rsid_post);}
          }
          Fl_Button bRSIDTxModes {
            label {Transmit modes}
            callback {mode_browser->label(o->label());
mode_browser->callback(0);
mode_browser->show(&progdefaults.rsid_tx_modes);
progdefaults.changed = true;}
            xywh {310 224 130 20}
          }
        }
      }
      Fl_Group tabMisc {
        label Misc open
        xywh {0 25 500 345} hide
      } {
        Fl_Tabs tabsMisc {open
          xywh {0 25 500 345} selection_color 50
        } {
          Fl_Group tabSweetSpot {
            label {Sweet Spot}
            xywh {0 50 500 320}
          } {
            Fl_Group {} {open
              xywh {5 60 490 75} box ENGRAVED_FRAME align 21
            } {
              Fl_Value_Input valCWsweetspot {
                label CW
                callback {progdefaults.CWsweetspot=o->value();
progdefaults.changed = true;}
                tooltip {Default CW tracking point} xywh {42 71 65 20} minimum 200 maximum 4000 step 1 value 1000
                code0 {o->value(progdefaults.CWsweetspot);}
                code1 {o->labelsize(FL_NORMAL_SIZE);}
                class Fl_Value_Input2
              }
              Fl_Value_Input valRTTYsweetspot {
                label RTTY
                callback {progdefaults.RTTYsweetspot=o->value();
progdefaults.changed = true;}
                tooltip {Default RTTY tracking point} xywh {220 71 65 20} minimum 200 maximum 4000 step 1 value 1000
                code0 {o->value(progdefaults.RTTYsweetspot);}
                code1 {o->labelsize(FL_NORMAL_SIZE);}
                class Fl_Value_Input2
              }
              Fl_Value_Input valPSKsweetspot {
                label {PSK et al.}
                callback {progdefaults.PSKsweetspot=o->value();
progdefaults.changed = true;}
                tooltip {Default for all other modems} xywh {420 71 65 20} minimum 200 maximum 4000 step 1 value 1000
                code0 {o->value(progdefaults.PSKsweetspot);}
                code1 {o->labelsize(FL_NORMAL_SIZE);}
                class Fl_Value_Input2
              }
              Fl_Check_Button btnStartAtSweetSpot {
                label {Always start new modems at these frequencies}
                callback {progdefaults.StartAtSweetSpot = o->value();
progdefaults.changed = true;}
                tooltip {ON - start at default
OFF - keep current wf cursor position} xywh {15 101 348 20} down_box DOWN_BOX value 1
                code0 {o->value(progdefaults.StartAtSweetSpot);}
              }
            }
          }
          Fl_Group tabSpot {
            label Spotting
            xywh {0 50 500 320} hide
          } {
            Fl_Group {} {
              label {PSK Reporter} open
              xywh {5 60 490 215} box ENGRAVED_FRAME align 21
            } {
              Fl_Check_Button btnPSKRepAuto {
                label {Automatically spot callsigns in decoded text}
                callback {progdefaults.pskrep_auto = o->value();
btnPSKRepInit->labelcolor(FL_RED);
btnPSKRepInit->redraw_label();
progdefaults.changed = true;}
                tooltip {Parse all incoming text} xywh {15 91 324 20} down_box DOWN_BOX
                code0 {btnPSKRepAuto->value(progdefaults.pskrep_auto);}
              }
              Fl_Check_Button btnPSKRepLog {
                label {Send reception report when logging a QSO}
                callback {progdefaults.pskrep_log = o->value();
btnPSKRepInit->labelcolor(FL_RED);
btnPSKRepInit->redraw_label();
progdefaults.changed = true;}
                tooltip {Send report only when QSO is logged} xywh {15 121 327 20} down_box DOWN_BOX
                code0 {btnPSKRepLog->value(progdefaults.pskrep_log);}
              }
              Fl_Check_Button btnPSKRepQRG {
                label {Report rig frequency (enable only if you have rig control!)}
                callback {progdefaults.pskrep_qrg = o->value();
progdefaults.changed = true;}
                tooltip {Include the transmit frequency} xywh {15 151 416 20} down_box DOWN_BOX
                code0 {btnPSKRepQRG->value(progdefaults.pskrep_qrg);}
              }
              Fl_Input inpPSKRepHost {
                label {Host:}
                callback {progdefaults.pskrep_host = o->value();
btnPSKRepInit->labelcolor(FL_RED);
btnPSKRepInit->redraw_label();
progdefaults.changed = true;}
                tooltip {To whom the connection is made} xywh {56 191 220 24} when 1
                code0 {inpPSKRepHost->value(progdefaults.pskrep_host.c_str());}
                code1 {inpPSKRepHost->labelsize(FL_NORMAL_SIZE);}
                class Fl_Input2
              }
              Fl_Input inpPSKRepPort {
                label {Port:}
                callback {progdefaults.pskrep_port = o->value();
btnPSKRepInit->labelcolor(FL_RED);
btnPSKRepInit->redraw_label();
progdefaults.changed = true;}
                tooltip {Using UDP port \#} xywh {425 191 60 24} when 1
                code0 {inpPSKRepPort->value(progdefaults.pskrep_port.c_str());}
                code1 {inpPSKRepPort->labelsize(FL_NORMAL_SIZE);}
                class Fl_Input2
              }
              Fl_Button btnPSKRepInit {
                label Initialize
                callback {pskrep_stop();
if (!pskrep_start()) {
    boxPSKRepMsg->copy_label(pskrep_error());
    progdefaults.usepskrep = false;
} else {
    boxPSKRepMsg->label(0);
    o->labelcolor(FL_FOREGROUND_COLOR);
    progdefaults.usepskrep = true;
}
progdefaults.changed = true;}
                tooltip {Initialize the socket client} xywh {405 236 80 24}
              }
              Fl_Box boxPSKRepMsg {
                label {<PSK Reporter error message>}
                xywh {30 236 300 24} labelfont 2
                code0 {boxPSKRepMsg->label(0);}
              }
            }
          }
          Fl_Group tabMacros {
            label Macros open
            xywh {0 50 500 320} hide
          } {
            Fl_Group {} {open
              xywh {5 60 490 75} box ENGRAVED_FRAME
            } {
              Fl_Check_Button btnUseLastMacro {
                label {Load last used macro file on startup}
                callback {progdefaults.UseLastMacro = o->value();
update_main_title();
progdefaults.changed = true;}
                tooltip {ON - use last set of macros
OFF - use default set} xywh {15 70 274 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.UseLastMacro);}
              }
              Fl_Check_Button btnDisplayMacroFilename {
                label {Display macro filename on startup}
                callback {progdefaults.DisplayMacroFilename = o->value();
progdefaults.changed = true;}
                tooltip {The filename is written to the RX text area} xywh {15 100 274 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.DisplayMacroFilename);}
              }
            }
          }
          Fl_Group tabCPUspeed {
            label CPU open
            xywh {0 50 500 320} hide
          } {
            Fl_Group {} {open
              xywh {5 60 490 51} box ENGRAVED_FRAME align 21
            } {
              Fl_Check_Button chkSlowCpu {
                label {Slow CPU (less than 700MHz)}
                callback {progdefaults.slowcpu = o->value();
progdefaults.changed = true;}
                tooltip {Enable if you're computer does not decode properly} xywh {151 75 225 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.slowcpu);}
              }
            }
          }
          Fl_Group tabFileExtraction {
            label {Text Capture} open
            xywh {0 50 500 320} hide
          } {
            Fl_Group {} {
              label {Auto Extract files from rx stream} open
              xywh {5 60 490 119} box ENGRAVED_FRAME align 21
            } {
              Fl_Box {} {
                label {0
1
2}
                xywh {13 80 467 60} align 21
                code0 {o->label(txtWrapInfo);}
                code1 {\#include "rx_extract.h"}
              }
              Fl_Check_Button chkAutoExtract {
                label {Enable detection && extraction}
                callback {progdefaults.autoextract = o->value();
progdefaults.changed = true;}
                tooltip {Extract files for use with external "wrap" program} xywh {19 145 227 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.autoextract);}
              }
              Fl_Check_Button chkStartFlmsg {
                label {auto open wrap folder}
                callback {progdefaults.open_flmsg = o->value();
progdefaults.changed = true;}
                tooltip {Autostart flmsg upon detection of compatible file} xywh {261 145 227 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.open_flmsg);}
              }
            }
            Fl_Group {} {
              label {Capture rx text to external file} open
              xywh {5 180 490 109} box ENGRAVED_FRAME align 21
            } {
              Fl_Check_Button chkRxStream {
                label {Enable rx text stream}
                callback {progdefaults.speak = o->value();
progdefaults.changed = true;}
                tooltip {Send rx text to file: textout.txt} xywh {136 260 175 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.speak);}
              }
              Fl_Box {} {
                label {0
1
2}
                xywh {20 203 465 60} align 21
                code0 {o->label(txtTalkInfo);}
                code1 {\#include "speak.h"}
              }
            }
            Fl_Group grpTalker {
              label {Talker Socket (MS only)} open
              xywh {5 291 490 73} box ENGRAVED_FRAME align 21
            } {
              Fl_Button btnConnectTalker {
                label Connect
                callback {open_talker();}
                xywh {30 319 70 20}
                code0 {extern void open_talker();}
              }
              Fl_Box {} {
                label {Connect to external Talker Program}
                xywh {109 317 368 24} align 20
              }
            }
          }
          Fl_Group tabPskmail {
            label Pskmail open
            xywh {0 50 500 320} align 5
          } {
            Fl_Group {} {
              label {Mail Server Attributes} open
              xywh {5 58 490 174} box ENGRAVED_FRAME align 21
            } {
              Fl_Counter cntServerCarrier {
                label {Carrier frequency (Hz)}
                callback {progdefaults.ServerCarrier = (int)o->value();
wf->redraw_marker();
progdefaults.changed = true;}
                tooltip {Default listen / transmit frequency} xywh {56 86 80 20} type Simple align 8 minimum 500 maximum 2500 step 25 value 1500
                code0 {o->value(progdefaults.ServerCarrier);}
                code1 {o->labelsize(FL_NORMAL_SIZE);}
                class Fl_Counter2
              }
              Fl_Counter cntServerOffset {
                label {Search range (Hz)}
                callback {progdefaults.ServerOffset = (int)o->value();
wf->redraw_marker();
progdefaults.changed = true;}
                tooltip {Listen for signals within this range} xywh {56 123 80 20} type Simple align 8 minimum 10 maximum 500 step 10 value 100
                code0 {o->value(progdefaults.SearchRange);}
                code1 {o->labelsize(FL_NORMAL_SIZE);}
                class Fl_Counter2
              }
              Fl_Counter cntServerACQsn {
                label {Acquisition S/N (dB)}
                callback {progdefaults.ServerACQsn = o->value();
progdefaults.changed = true;}
                tooltip {Capture signals over this threshold} xywh {56 160 80 20} type Simple align 8 minimum 3 maximum 20 step 1 value 6
                code0 {o->value(progdefaults.ServerACQsn);}
                code1 {o->labelsize(FL_NORMAL_SIZE);}
                class Fl_Counter2
              }
              Fl_Counter cntServerAFCrange {
                label {AFC range (Hz)}
                callback {progdefaults.ServerAFCrange = (int)o->value();
wf->redraw_marker();
progdefaults.changed = true;}
                tooltip {Limit AFC movement to this range} xywh {56 197 80 20} type Simple align 8 minimum 10 maximum 500 step 10 value 25
                code0 {o->value(progdefaults.SearchRange);}
                code1 {o->labelsize(FL_NORMAL_SIZE);}
                class Fl_Counter2
              }
              Fl_Check_Button btnPSKmailSweetSpot {
                label {Reset to Carrier}
                callback {progdefaults.PSKmailSweetSpot = o->value();
progdefaults.changed = true;}
                tooltip {When no signal present} xywh {311 86 142 20} down_box DOWN_BOX value 1
                code0 {o->value(progdefaults.PSKmailSweetSpot);}
              }
            }
            Fl_Group {} {
              label General open
              xywh {5 234 490 131} box ENGRAVED_FRAME align 21
            } {
              Fl_Check_Button btn_arq_s2n_report {
                label {Report ARQ frames average S/N}
                callback {progdefaults.Pskmails2nreport=o->value();}
                xywh {30 259 250 20} down_box DOWN_BOX
                code0 {o->value(progdefaults.Pskmails2nreport);}
              }
            }
          }
        }
      }
      Fl_Group tabQRZ {
        label {Callsign DB} open
        tooltip {Callsign database} xywh {0 25 500 345} hide
      } {
        Fl_Group {} {
          label CDROM open
          xywh {5 180 490 75} box ENGRAVED_FRAME align 21
        } {
          Fl_Round_Button btnQRZcdrom {
            label QRZ
            callback {set_qrz_buttons(o);
progdefaults.QRZ = QRZCD;
progdefaults.changed = true;}
            tooltip {Use CD or hard drive CD image} xywh {25 215 70 20} down_box DOWN_BOX
            code0 {o->value(progdefaults.QRZ == QRZCD);}
          }
          Fl_Input txtQRZpathname {
            label {at:}
            callback {progdefaults.QRZpathname = o->value();
progdefaults.QRZchanged = true;
progdefaults.changed = true;}
            tooltip {ie: /home/dave/CALLBK/ or C:/CALLBK/
Leave blank to search for database} xywh {104 215 300 20}
            code0 {o->value(progdefaults.QRZpathname.c_str());}
            code1 {txtQRZpathname->labelsize(FL_NORMAL_SIZE);}
            class Fl_Input2
          }
        }
        Fl_Group {} {
          label {Paid online subscription} open
          xywh {5 260 490 95} box ENGRAVED_FRAME align 21
        } {
          Fl_Round_Button btnQRZsub {
            label {QRZ.com}
            callback {set_qrz_buttons(o);
progdefaults.QRZ = QRZNET;
progdefaults.changed = true;}
            tooltip {You need a paid QRZ online
subscription to access} xywh {25 291 90 20} down_box DOWN_BOX
            code0 {o->value(progdefaults.QRZ == QRZNET);}
          }
          Fl_Round_Button btnHamcall {
            label {Hamcall.net}
            callback {set_qrz_buttons(o);
progdefaults.QRZ = HAMCALLNET;
progdefaults.changed = true;}
            tooltip {You need a paid Hamcall online
subscription to access} xywh {25 321 105 20} down_box DOWN_BOX
            code0 {o->value(progdefaults.QRZ == HAMCALLNET);}
          }
          Fl_Input inpQRZusername {
            label {User name}
            callback {progdefaults.QRZusername = o->value();
progdefaults.changed = true;}
            tooltip {Your login name} xywh {235 291 90 20}
            code0 {o->value(progdefaults.QRZusername.c_str());}
            code1 {inpQRZusername->labelsize(FL_NORMAL_SIZE);}
            class Fl_Input2
          }
          Fl_Input inpQRZuserpassword {
            label Password
            callback {progdefaults.QRZuserpassword = o->value();
progdefaults.changed = true;}
            tooltip {Your login password} xywh {236 321 90 20}
            code0 {o->value(progdefaults.QRZuserpassword.c_str());}
            code1 {o->type(FL_SECRET_INPUT);}
            code2 {inpQRZuserpassword->labelsize(FL_NORMAL_SIZE);}
            class Fl_Input2
          }
          Fl_Button btnQRZpasswordShow {
            label Show
            callback {inpQRZuserpassword->type(inpQRZuserpassword->type() ^ FL_SECRET_INPUT);
inpQRZuserpassword->redraw();
o->label((inpQRZuserpassword->type() & FL_SECRET_INPUT) ? "Show" : "Hide");}
            tooltip {Show password in plain text} xywh {336 321 70 20}
          }
        }
        Fl_Group {} {open
          xywh {5 35 490 140} box ENGRAVED_FRAME align 21
        } {
          Fl_Round_Button btnQRZnotavailable {
            label {Not available}
            callback {set_qrz_buttons(o);
progdefaults.QRZ = QRZNONE;
progdefaults.changed = true;}
            tooltip {Do not use callsign database} xywh {25 45 337 20} down_box DOWN_BOX value 1
            code0 {o->value(progdefaults.QRZ == QRZNONE);}
          }
          Fl_Round_Button btnQRZonline {
            label {QRZ online via default Internet Browser}
            callback {set_qrz_buttons(o);
progdefaults.QRZ = QRZHTML;
progdefaults.changed = true;}
            tooltip {Visit QRZ web site} xywh {25 75 337 20} down_box DOWN_BOX
            code0 {o->value(progdefaults.QRZ == QRZHTML);}
          }
          Fl_Round_Button btnHAMCALLonline {
            label {HamCall online via default Internet Browser}
            callback {set_qrz_buttons(o);
progdefaults.QRZ = HAMCALLHTML;
progdefaults.changed = true;}
            tooltip {Vist Hamcall web site} xywh {25 106 337 20} down_box DOWN_BOX
            code0 {o->value(progdefaults.QRZ == HAMCALLHTML);}
          }
          Fl_Round_Button btnCALLOOK {
            label {Callook.info lookup (US callsigns only)}
            callback {set_qrz_buttons(o);
progdefaults.QRZ = CALLOOK;
progdefaults.changed = true;}
            tooltip {Vist Hamcall web site} xywh {25 137 337 20} down_box DOWN_BOX
            code0 {o->value(progdefaults.QRZ == CALLOOK);}
          }
        }
      }
      Fl_Group tabDL {
        label {DL Client} open
        xywh {0 25 500 410} labelsize 12
      } {
        Fl_Tabs tabsDL {open
          xywh {0 25 500 410}
        } {
          Fl_Group tabDLEnable {
            label Enable open
            xywh {0 50 500 320} hide
          } {
            Fl_Group {} {
              label Enable open
              xywh {10 55 490 290} box ENGRAVED_FRAME align 21
            } {
              Fl_Check_Button confdialog_dl_online {
                label Online
                callback {cb_dl_fldigi_toggle_dl_online();
set_menu_dl_online();}
                xywh {40 75 200 25} down_box DOWN_BOX
                code0 {o->value(progdefaults.dl_online);}
              }
              Fl_Input {} {
                label {Server:}
                callback {progdefaults.server_location = o->value();
progdefaults.changed = true;}
                tooltip {Tracker Server Address} xywh {90 105 334 20}
                code0 {o->value(progdefaults.server_location.c_str());}
              }
            }
          }
          Fl_Group tabDLPayload {
            label Payload open
            xywh {0 50 500 322} hide
          } {
            Fl_Group {} {
              label {Payload Autoconfig} open
              xywh {5 54 490 88} box ENGRAVED_FRAME align 21
            } {
              Fl_Choice habFlightXML_conf {
                callback {cb_dl_fldigi_select_payload(o, NULL);} open
                xywh {125 110 120 25} down_box BORDER_BOX labeltype NO_LABEL align 20
              } {}
              Fl_Button {} {
                label Autoconfigure
                callback {cb_dl_fldigi_configure_payload(NULL, NULL);}
                xywh {250 110 120 25}
              }
              Fl_Button {} {
                label {Redownload data from server}
                callback {dl_fldigi_download();
dl_fldigi_downloaded_once = 1;}
                xywh {125 80 245 25}
              }
            }
            Fl_Group {} {
              label {Payload Settings} open
              xywh {5 146 490 215} box ENGRAVED_FRAME align 21
            } {
              Fl_Input cd_xmlSentence_delimiter {
                label {Sentence Delimiter}
                callback {progdefaults.xmlSentence_delimiter = o->value();}
                xywh {195 169 35 25}
                code0 {o->value(progdefaults.xmlSentence_delimiter.c_str());}
              }
              Fl_Input cd_xmlField_delimiter {
                label {Field Delimiter}
                callback {progdefaults.xmlField_delimiter = o->value();}
                xywh {390 169 25 25}
                code0 {o->value(progdefaults.xmlField_delimiter.c_str());}
              }
              Fl_Input cd_xmlCallsign {
                label Callsign
                callback {progdefaults.xmlCallsign = o->value();}
                xywh {195 200 105 25}
                code0 {o->value(progdefaults.xmlCallsign.c_str());}
              }
              Fl_Group {} {
                label Fields open
                xywh {10 230 480 125} box ENGRAVED_FRAME align 21
              } {
                Fl_Input cd_xmlFields {
                  label {Field Count}
                  callback {progdefaults.xmlFields = o->value();}
                  xywh {170 245 25 25} type Int
                  code0 {o->value(progdefaults.xmlFields);}
                  class Fl_Value_Input2
                }
                Fl_Input cd_xml_time {
                  label {Time Field ID}
                  callback {progdefaults.xml_time = o->value();}
                  xywh {370 245 25 25} type Int
                  code0 {o->value(progdefaults.xml_time);}
                  class Fl_Value_Input2
                }
                Fl_Input cd_xml_latitude {
                  label {Latitude Field ID}
                  callback {progdefaults.xml_latitude = o->value();}
                  xywh {370 270 25 25} type Int
                  code0 {o->value(progdefaults.xml_latitude);}
                  class Fl_Value_Input2
                }
                Fl_Input cd_xml_longitude {
                  label {Longitude Field ID}
                  callback {progdefaults.xml_longitude = o->value();}
                  xywh {370 295 25 25} type Int
                  code0 {o->value(progdefaults.xml_longitude);}
                  class Fl_Value_Input2
                }
                Fl_Input cd_xml_altitude {
                  label {Altitude Field ID}
                  callback {progdefaults.xml_altitude = o->value();}
                  xywh {370 320 25 25} type Int
                  code0 {o->value(progdefaults.xml_altitude);}
                  class Fl_Value_Input2
                }
              }
            }
          }
          Fl_Group {} {
            label GPS open
            xywh {0 50 500 385}
          } {
            Fl_Group {} {
              label {GPS Upload Configuration} open
              xywh {5 55 490 90} box ENGRAVED_FRAME align 21
            } {
              Fl_Input {} {
                label Baud
                callback {progdefaults.gpsSpeed = o->value();
progdefaults.changed = true;
dl_fldigi_gps_setup_fromprogdefaults();}
                xywh {100 110 150 25} type Int
                code0 {o->value(progdefaults.gpsSpeed);}
                class Fl_Value_Input2
              }
              Fl_Input {} {
                label Identity
                callback {progdefaults.gpsIdentity = o->value();
progdefaults.changed = true;
dl_fldigi_gps_setup_fromprogdefaults();}
                xywh {315 110 140 25}
                code0 {o->value(progdefaults.gpsIdentity.c_str());}
              }
              Fl_Button {} {
                label {Refresh Device List}
                callback {/* As far as I can tell running this again is harmless. */
dl_fldigi_gps_update_ports(1, 1);}
                xywh {285 80 170 25}
              }
              Fl_Choice inpGPSdev {
                label Device
                callback {progdefaults.gpsDevice = o->text();
progdefaults.changed = true;
dl_fldigi_gps_setup_fromprogdefaults();} open
                xywh {100 80 180 25} down_box BORDER_BOX
              } {}
            }
            Fl_Group {} {
              label {GPS Thread Status} open
              xywh {5 150 490 120} box ENGRAVED_BOX align 21
            } {
              Fl_Output gpsTStatus {
                label Status
                xywh {100 175 105 25}
              }
              Fl_Output gpsTPort {
                label Port
                xywh {100 205 105 25}
              }
              Fl_Output gpsTIdentity {
                label Identity
                xywh {315 175 105 25}
              }
              Fl_Output gpsTBaud {
                label Baud
                xywh {315 205 105 25}
              }
              Fl_Button {} {
                label {Restart Thread}
                callback {dl_fldigi_gps_setup_fromprogdefaults();}
                xywh {100 235 155 25}
              }
              Fl_Button {} {
                label {Stop Thread}
                callback {dl_fldigi_gps_stop();} selected
                xywh {260 235 160 25}
              }
            }
            Fl_Group {} {
              label {GPS Last Known Position} open
              xywh {5 275 490 90} box ENGRAVED_BOX align 21
            } {
              Fl_Output gpsTLat {
                label Latitude
                xywh {100 300 105 25}
              }
              Fl_Output gpsTLon {
                label Longitude
                xywh {315 300 105 25}
              }
              Fl_Output gpsTAlt {
                label Altitude
                xywh {100 330 105 25}
              }
              Fl_Button {} {
                label {Save as operator position}
                callback {/* Copy coordinates to the operator form */
dl_fldigi_gps_save_position();}
                xywh {225 330 196 25}
              }
            }
          }
          Fl_Group {} {
            label Image open
            xywh {0 50 500 322} hide
          } {
            Fl_Group {} {
              label {Image Configuration} open
              xywh {4 54 492 116} box ENGRAVED_FRAME align 21
            } {
              Fl_Input imagepacketurl {
                label {Packet URL:}
                callback {progdefaults.ssdv_packet_url = o->value();
progdefaults.changed = true;}
                xywh {100 81 330 20} labelsize 12 textsize 12
                code0 {o->value(progdefaults.ssdv_packet_url.c_str());}
              }
            }
            Fl_Check_Button imagesave {
              label {Save received images}
              callback {progdefaults.ssdv_save_image = o->value();
progdefaults.changed = true;}
              xywh {100 115 150 15} down_box DOWN_BOX labelsize 12
              code0 {o->value(progdefaults.ssdv_save_image);}
            }
            Fl_Input imagesavedir {
              label {Location:}
              callback {progdefaults.ssdv_save_dir = o->value();
progdefaults.changed = true;}
              xywh {100 135 330 20} labelsize 12 textsize 12
              code0 {o->value(progdefaults.ssdv_save_dir.c_str());}
            }
          }
          Fl_Group {} {
            label Remote open
            xywh {5 55 492 105} hide
          } {
            Fl_Group {} {
              label {Waterfall PNG} open
              xywh {5 55 492 105} box ENGRAVED_FRAME align 21
            } {
              Fl_Check_Button {} {
                label {Waterfall PNG Export}
                callback {progdefaults.png_wfall = o->value();
progdefaults.changed = true;}
                xywh {45 75 200 25} down_box DOWN_BOX
                code0 {o->value(progdefaults.png_wfall);}
              }
              Fl_Input {} {
                label {Location:}
                callback {progdefaults.waterfall_png_location = o->value();
progdefaults.changed = true;}
                tooltip {Please use full path including filename} xywh {110 115 334 20}
                code0 {o->value(progdefaults.waterfall_png_location.c_str());}
              }
            }
          }
        }
      }
    }
    Fl_Button btnSaveConfig {
      label Save
      callback {progdefaults.saveDefaults();}
      xywh {235 375 130 22}
    }
    Fl_Return_Button btnCloseConfig {
      label Close
      callback {closeDialog();}
      xywh {367 375 130 22}
    }
    Fl_Button btnResetConfig {
      label {Restore defaults}
      callback {progdefaults.resetDefaults();
progdefaults.changed = false;}
      xywh {5 375 130 22}
    }
  }
} 

Function {openConfig()} {open return_type void
} {
  code {if (!dlgConfig) createConfig();
progdefaults.loadDefaults();} {}
} 

Function {closeDialog()} {open return_type void
} {
  code {if (dlgConfig) dlgConfig->hide();} {}
} 

Function {createConfig()} {open return_type void
} {
  code {if (!dlgConfig) {
    dlgConfig = ConfigureDialog();
    dlgConfig->xclass(PACKAGE_NAME);
  }} {}
} 
