// generated by Fast Light User Interface Designer (fluid) version 1.0302

#include "gettext.h"
#include "ghpsdr.h"
#include <config.h>
#include <FL/Fl_Tooltip.H>
#include <FL/Fl_Box.H>
#include "main.h"
#include "sound.h"
#include "fl_digi.h"
#include "trx.h"
#include "configuration.h"

Fl_Value_Input2 *SdrAudioGain=(Fl_Value_Input2 *)0;

static void cb_SdrAudioGain(Fl_Value_Input2* o, void*) {
  ((SoundSDR *)scard)->AudioGain(o->value());
}

Fl_Button *SaveAG=(Fl_Button *)0;

static void cb_SaveAG(Fl_Button*, void*) {
  progdefaults.SdrAudioGain = SdrAudioGain->value();
	progdefaults.changed = true;
}

Fl_Value_Input2 *SdrRFGain=(Fl_Value_Input2 *)0;

static void cb_SdrRFGain(Fl_Value_Input2* o, void*) {
  ((SoundSDR *)scard)->RFGain(o->value());
}

Fl_Button *SaveRFG=(Fl_Button *)0;

static void cb_SaveRFG(Fl_Button*, void*) {
  progdefaults.SdrRFGain = SdrRFGain->value();
	progdefaults.changed = true;
}

Fl_Button *btnSaveConfigFile=(Fl_Button *)0;

static void cb_btnSaveConfigFile(Fl_Button*, void*) {
  progdefaults.saveDefaults();
}

Fl_Round_Button *Dither=(Fl_Round_Button *)0;

static void cb_Dither(Fl_Round_Button* o, void*) {
  ((SoundSDR *)scard)->Dither(o->value());
	progdefaults.SdrDither = o->value();
	progdefaults.changed = true;
}

Fl_Round_Button *Random=(Fl_Round_Button *)0;

static void cb_Random(Fl_Round_Button* o, void*) {
  ((SoundSDR *)scard)->Random(o->value());
	progdefaults.SdrRandom = o->value();
	progdefaults.changed = true;
}

Fl_Round_Button *PreAmp=(Fl_Round_Button *)0;

static void cb_PreAmp(Fl_Round_Button* o, void*) {
  ((SoundSDR *)scard)->PreAmp(o->value());
	progdefaults.SdrPreAmp = o->value();
	progdefaults.changed = true;
}

Fl_Double_Window* ghpsdrDialogRx() {
  Fl_Double_Window* w;
  { Fl_Double_Window* o = new Fl_Double_Window(485, 200, _("Receiver"));
    w = o;
    o->color(FL_DARK2);
    o->selection_color((Fl_Color)51);
    o->labelsize(18);
    o->align(Fl_Align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE));
    { Fl_Value_Input2* o = SdrAudioGain = new Fl_Value_Input2(30, 15, 80, 50, _("Audio Gain"));
      SdrAudioGain->tooltip(_("Adjust audio gain: 0 thru 100"));
      SdrAudioGain->box(FL_UP_BOX);
      SdrAudioGain->color(FL_BACKGROUND_COLOR);
      SdrAudioGain->selection_color(FL_BACKGROUND_COLOR);
      SdrAudioGain->labeltype(FL_NORMAL_LABEL);
      SdrAudioGain->labelfont(0);
      SdrAudioGain->labelsize(14);
      SdrAudioGain->labelcolor(FL_FOREGROUND_COLOR);
      SdrAudioGain->maximum(100);
      SdrAudioGain->step(1);
      SdrAudioGain->callback((Fl_Callback*)cb_SdrAudioGain);
      SdrAudioGain->align(Fl_Align(FL_ALIGN_BOTTOM));
      SdrAudioGain->when(FL_WHEN_RELEASE);
      o->value(progdefaults.SdrAudioGain);
      SdrAudioGain->labelsize(FL_NORMAL_SIZE);
    } // Fl_Value_Input2* SdrAudioGain
    { SaveAG = new Fl_Button(20, 109, 100, 20, _("Make default"));
      SaveAG->tooltip(_("Set as startup default"));
      SaveAG->callback((Fl_Callback*)cb_SaveAG);
    } // Fl_Button* SaveAG
    { Fl_Value_Input2* o = SdrRFGain = new Fl_Value_Input2(145, 15, 80, 50, _("RF Gain"));
      SdrRFGain->tooltip(_("Adjust RF gain: 0.1 thru 10.0"));
      SdrRFGain->box(FL_UP_BOX);
      SdrRFGain->color(FL_BACKGROUND_COLOR);
      SdrRFGain->selection_color(FL_BACKGROUND_COLOR);
      SdrRFGain->labeltype(FL_NORMAL_LABEL);
      SdrRFGain->labelfont(0);
      SdrRFGain->labelsize(14);
      SdrRFGain->labelcolor(FL_FOREGROUND_COLOR);
      SdrRFGain->minimum(0.1);
      SdrRFGain->maximum(10);
      SdrRFGain->step(0.1);
      SdrRFGain->callback((Fl_Callback*)cb_SdrRFGain);
      SdrRFGain->align(Fl_Align(FL_ALIGN_BOTTOM));
      SdrRFGain->when(FL_WHEN_RELEASE);
      o->value(progdefaults.SdrRFGain);
      SdrRFGain->labelsize(FL_NORMAL_SIZE);
    } // Fl_Value_Input2* SdrRFGain
    { SaveRFG = new Fl_Button(135, 109, 100, 20, _("Make default"));
      SaveRFG->tooltip(_("Set as startup default"));
      SaveRFG->callback((Fl_Callback*)cb_SaveRFG);
    } // Fl_Button* SaveRFG
    { btnSaveConfigFile = new Fl_Button(20, 150, 450, 22, _("Save Configuration File"));
      btnSaveConfigFile->tooltip(_("Write fldigi configuration data to disk"));
      btnSaveConfigFile->callback((Fl_Callback*)cb_btnSaveConfigFile);
    } // Fl_Button* btnSaveConfigFile
    { Fl_Round_Button* o = Dither = new Fl_Round_Button(380, 55, 80, 15, _("Dither"));
      Dither->down_box(FL_DOWN_BOX);
      Dither->selection_color((Fl_Color)1);
      Dither->callback((Fl_Callback*)cb_Dither);
      o->value(progdefaults.SdrDither);
    } // Fl_Round_Button* Dither
    { Fl_Round_Button* o = Random = new Fl_Round_Button(380, 85, 80, 15, _("Random"));
      Random->down_box(FL_DOWN_BOX);
      Random->selection_color((Fl_Color)1);
      Random->callback((Fl_Callback*)cb_Random);
      o->value(progdefaults.SdrRandom);
    } // Fl_Round_Button* Random
    { Fl_Round_Button* o = PreAmp = new Fl_Round_Button(380, 25, 80, 15, _("PreAmp"));
      PreAmp->down_box(FL_DOWN_BOX);
      PreAmp->selection_color((Fl_Color)1);
      PreAmp->callback((Fl_Callback*)cb_PreAmp);
      o->value(progdefaults.SdrPreAmp);
    } // Fl_Round_Button* PreAmp
    o->set_non_modal();
    o->end();
  } // Fl_Double_Window* o
  return w;
}

Fl_Double_Window* ghpsdrDialogTx() {
  Fl_Double_Window* w;
  { Fl_Double_Window* o = new Fl_Double_Window(485, 200, _("Transmitter (under construction)"));
    w = o;
    o->color(FL_DARK2);
    o->selection_color((Fl_Color)51);
    o->labelsize(18);
    o->align(Fl_Align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE));
    { Fl_Roller* o = new Fl_Roller(425, 15, 50, 50, _("Test"));
      o->maximum(100);
      o->step(1);
    } // Fl_Roller* o
    o->set_non_modal();
    o->end();
  } // Fl_Double_Window* o
  return w;
}

Fl_Double_Window* ghpsdrDialogAlex() {
  Fl_Double_Window* w;
  { Fl_Double_Window* o = new Fl_Double_Window(485, 200, _("Alex Config (under construction)"));
    w = o;
    o->color(FL_DARK2);
    o->selection_color((Fl_Color)51);
    o->labelsize(18);
    o->align(Fl_Align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE));
    { Fl_Roller* o = new Fl_Roller(425, 15, 50, 50, _("Test"));
      o->maximum(100);
      o->step(1);
    } // Fl_Roller* o
    o->set_non_modal();
    o->end();
  } // Fl_Double_Window* o
  return w;
}

Fl_Double_Window* ghpsdrDialogMisc() {
  Fl_Double_Window* w;
  { Fl_Double_Window* o = new Fl_Double_Window(485, 200, _("Misc Control (under construction)"));
    w = o;
    o->color(FL_DARK2);
    o->selection_color((Fl_Color)51);
    o->labelsize(18);
    o->align(Fl_Align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE));
    { Fl_Roller* o = new Fl_Roller(425, 15, 50, 50, _("Test"));
      o->maximum(100);
      o->step(1);
    } // Fl_Roller* o
    o->set_non_modal();
    o->end();
  } // Fl_Double_Window* o
  return w;
}
