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

#include "/build/infamousplugins/src/build/src/envfollower/envfollower_ui.h"

void EnvFollowerUI::cb_reverse_i(Button*, void*) {
  write_function(controller,REVERSE,sizeof(float),0,&reverse->floatvalue);
}
void EnvFollowerUI::cb_reverse(Button* o, void* v) {
  ((EnvFollowerUI*)(o->parent()->parent()->user_data()))->cb_reverse_i(o,v);
}

void EnvFollowerUI::cb_peakrms_i(Dial*, void*) {
  write_function(controller,PEAKRMS,sizeof(float),0,&peakrms->floatvalue);
}
void EnvFollowerUI::cb_peakrms(Dial* o, void* v) {
  ((EnvFollowerUI*)(o->parent()->parent()->user_data()))->cb_peakrms_i(o,v);
}

void EnvFollowerUI::cb_attack_i(Dial*, void*) {
  write_function(controller,ATIME,sizeof(float),0,&attack->floatvalue);
}
void EnvFollowerUI::cb_attack(Dial* o, void* v) {
  ((EnvFollowerUI*)(o->parent()->parent()->user_data()))->cb_attack_i(o,v);
}

void EnvFollowerUI::cb_decay_i(Dial*, void*) {
  write_function(controller,DTIME,sizeof(float),0,&decay->floatvalue);
}
void EnvFollowerUI::cb_decay(Dial* o, void* v) {
  ((EnvFollowerUI*)(o->parent()->parent()->user_data()))->cb_decay_i(o,v);
}

void EnvFollowerUI::cb_threshold_i(Dial*, void*) {
  write_function(controller,THRESHOLD,sizeof(float),0,&threshold->floatvalue);
if(threshold->value() >= saturation->value()){saturation->value(threshold->value()+.01); inBound->max=saturation->value();}
inBound->min = threshold->floatvalue;
inBound->drawlines=true;
inBound->redraw();outBound->redraw();
}
void EnvFollowerUI::cb_threshold(Dial* o, void* v) {
  ((EnvFollowerUI*)(o->parent()->parent()->user_data()))->cb_threshold_i(o,v);
}

void EnvFollowerUI::cb_saturation_i(Dial*, void*) {
  write_function(controller,SATURATION,sizeof(float),0,&saturation->floatvalue);
if(threshold->value() >= saturation->value()){threshold->value(saturation->value()-.01); inBound->min=threshold->value();}
inBound->max = saturation->floatvalue;
inBound->drawlines=true;
inBound->redraw();outBound->redraw();
}
void EnvFollowerUI::cb_saturation(Dial* o, void* v) {
  ((EnvFollowerUI*)(o->parent()->parent()->user_data()))->cb_saturation_i(o,v);
}

void EnvFollowerUI::cb_min_i(Dial*, void*) {
  write_function(controller,MINV,sizeof(float),0,&min->floatvalue);
if(min->value() >= max->value()){max->value(min->value()+1); outBound->max=max->value()/127.0; max->floatvalue = max->value(); write_function(controller,MAXV,sizeof(float),0,&max->floatvalue);}
outBound->min = min->floatvalue/127.0;
outBound->drawlines=true;
outBound->redraw();inBound->redraw();
}
void EnvFollowerUI::cb_min(Dial* o, void* v) {
  ((EnvFollowerUI*)(o->parent()->parent()->user_data()))->cb_min_i(o,v);
}

void EnvFollowerUI::cb_max_i(Dial*, void*) {
  write_function(controller,MAXV,sizeof(float),0,&max->floatvalue);
if(min->value() >= max->value()){min->value(max->value()-1); outBound->min=min->value()/127.0; min->floatvalue = min->value(); write_function(controller,MINV,sizeof(float),0,&min->floatvalue);}
outBound->max = max->floatvalue/127.0;
outBound->drawlines=true;
outBound->redraw();inBound->redraw();
}
void EnvFollowerUI::cb_max(Dial* o, void* v) {
  ((EnvFollowerUI*)(o->parent()->parent()->user_data()))->cb_max_i(o,v);
}

void EnvFollowerUI::cb_channel_i(Dial*, void*) {
  write_function(controller,CHANNEL,sizeof(float),0,&channel->floatvalue);
}
void EnvFollowerUI::cb_channel(Dial* o, void* v) {
  ((EnvFollowerUI*)(o->parent()->parent()->user_data()))->cb_channel_i(o,v);
}

void EnvFollowerUI::cb_cc_i(Dial*, void*) {
  write_function(controller,CONTROL_NO,sizeof(float),0,&cc->floatvalue);
}
void EnvFollowerUI::cb_cc(Dial* o, void* v) {
  ((EnvFollowerUI*)(o->parent()->parent()->user_data()))->cb_cc_i(o,v);
}

Fl_Double_Window* EnvFollowerUI::show() {
  { Fl_Double_Window* o = ui = new Fl_Double_Window(603, 420, "the infamous envelope follower");
    ui->box(FL_UP_BOX);
    ui->user_data((void*)(this));
    { Fl_Group* o = new Fl_Group(0, 0, 603, 420);
      { Background* o = logo = new Background(23, 1, 15, 31);
        logo->box(FL_NO_BOX);
        logo->color(FL_BACKGROUND_COLOR);
        logo->selection_color(FL_BACKGROUND_COLOR);
        logo->labeltype(FL_NORMAL_LABEL);
        logo->labelfont(0);
        logo->labelsize(14);
        logo->labelcolor(FL_FOREGROUND_COLOR);
        logo->align(Fl_Align(FL_ALIGN_CENTER));
        logo->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_infamousLogoTiny_get_height(); o->drawing_w = cairo_code_draw_infamousLogoTiny_get_width(); o->drawing_f = &cairo_code_draw_infamousLogoTiny_render;
        o->stretch = false;
      } // Background* logo
      { Background* o = bg = new Background(0, 0, 603, 420);
        bg->box(FL_NO_BOX);
        bg->color(FL_BACKGROUND_COLOR);
        bg->selection_color(FL_BACKGROUND_COLOR);
        bg->labeltype(FL_NORMAL_LABEL);
        bg->labelfont(0);
        bg->labelsize(14);
        bg->labelcolor(FL_FOREGROUND_COLOR);
        bg->align(Fl_Align(FL_ALIGN_CENTER));
        bg->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_envfollowerbg_get_height(); o->drawing_w = cairo_code_draw_envfollowerbg_get_width(); o->drawing_f = &cairo_code_draw_envfollowerbg_render;
      } // Background* bg
      { Background* o = title = new Background(83, 0, 520, 18);
        title->box(FL_NO_BOX);
        title->color(FL_BACKGROUND_COLOR);
        title->selection_color(FL_BACKGROUND_COLOR);
        title->labeltype(FL_NORMAL_LABEL);
        title->labelfont(0);
        title->labelsize(14);
        title->labelcolor(FL_FOREGROUND_COLOR);
        title->align(Fl_Align(FL_ALIGN_CENTER));
        title->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_envTitleLabel_get_height(); o->drawing_w = cairo_code_draw_envTitleLabel_get_width(); o->drawing_f = &cairo_code_draw_envTitleLabel_render;
        o->stretch = false;
      } // Background* title
      { Background* o = prmslab = new Background(36, 250, 7, 156);
        prmslab->box(FL_NO_BOX);
        prmslab->color(FL_BACKGROUND_COLOR);
        prmslab->selection_color(FL_BACKGROUND_COLOR);
        prmslab->labeltype(FL_NORMAL_LABEL);
        prmslab->labelfont(0);
        prmslab->labelsize(14);
        prmslab->labelcolor(FL_FOREGROUND_COLOR);
        prmslab->align(Fl_Align(FL_ALIGN_CENTER));
        prmslab->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_envPeakrmsLabel_get_height(); o->drawing_w = cairo_code_draw_envPeakrmsLabel_get_width(); o->drawing_f = &cairo_code_draw_envPeakrmsLabel_render;
        o->stretch = false;
      } // Background* prmslab
      { Background* o = alab = new Background(76, 296, 7, 63);
        alab->box(FL_NO_BOX);
        alab->color(FL_BACKGROUND_COLOR);
        alab->selection_color(FL_BACKGROUND_COLOR);
        alab->labeltype(FL_NORMAL_LABEL);
        alab->labelfont(0);
        alab->labelsize(14);
        alab->labelcolor(FL_FOREGROUND_COLOR);
        alab->align(Fl_Align(FL_ALIGN_CENTER));
        alab->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_envAttackLabel_get_height(); o->drawing_w = cairo_code_draw_envAttackLabel_get_width(); o->drawing_f = &cairo_code_draw_envAttackLabel_render;
        o->stretch = false;
      } // Background* alab
      { Background* o = dlab = new Background(116, 302, 7, 52);
        dlab->box(FL_NO_BOX);
        dlab->color(FL_BACKGROUND_COLOR);
        dlab->selection_color(FL_BACKGROUND_COLOR);
        dlab->labeltype(FL_NORMAL_LABEL);
        dlab->labelfont(0);
        dlab->labelsize(14);
        dlab->labelcolor(FL_FOREGROUND_COLOR);
        dlab->align(Fl_Align(FL_ALIGN_CENTER));
        dlab->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_envDecayLabel_get_height(); o->drawing_w = cairo_code_draw_envDecayLabel_get_width(); o->drawing_f = &cairo_code_draw_envDecayLabel_render;
        o->stretch = false;
      } // Background* dlab
      { Background* o = threshlab = new Background(266, 284, 7, 87);
        threshlab->box(FL_NO_BOX);
        threshlab->color(FL_BACKGROUND_COLOR);
        threshlab->selection_color(FL_BACKGROUND_COLOR);
        threshlab->labeltype(FL_NORMAL_LABEL);
        threshlab->labelfont(0);
        threshlab->labelsize(14);
        threshlab->labelcolor(FL_FOREGROUND_COLOR);
        threshlab->align(Fl_Align(FL_ALIGN_CENTER));
        threshlab->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_envThresholdLabel_get_height(); o->drawing_w = cairo_code_draw_envThresholdLabel_get_width(); o->drawing_f = &cairo_code_draw_envThresholdLabel_render;
        o->stretch = false;
      } // Background* threshlab
      { Background* o = satlab = new Background(306, 280, 7, 97);
        satlab->box(FL_NO_BOX);
        satlab->color(FL_BACKGROUND_COLOR);
        satlab->selection_color(FL_BACKGROUND_COLOR);
        satlab->labeltype(FL_NORMAL_LABEL);
        satlab->labelfont(0);
        satlab->labelsize(14);
        satlab->labelcolor(FL_FOREGROUND_COLOR);
        satlab->align(Fl_Align(FL_ALIGN_CENTER));
        satlab->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_envSaturationLabel_get_height(); o->drawing_w = cairo_code_draw_envSaturationLabel_get_width(); o->drawing_f = &cairo_code_draw_envSaturationLabel_render;
        o->stretch = false;
      } // Background* satlab
      { Background* o = minlab = new Background(360, 295, 7, 65);
        minlab->box(FL_NO_BOX);
        minlab->color(FL_BACKGROUND_COLOR);
        minlab->selection_color(FL_BACKGROUND_COLOR);
        minlab->labeltype(FL_NORMAL_LABEL);
        minlab->labelfont(0);
        minlab->labelsize(14);
        minlab->labelcolor(FL_FOREGROUND_COLOR);
        minlab->align(Fl_Align(FL_ALIGN_CENTER));
        minlab->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_envMinimumLabel_get_height(); o->drawing_w = cairo_code_draw_envMinimumLabel_get_width(); o->drawing_f = &cairo_code_draw_envMinimumLabel_render;
        o->stretch = false;
      } // Background* minlab
      { Background* o = maxlab = new Background(400, 292, 7, 73);
        maxlab->box(FL_NO_BOX);
        maxlab->color(FL_BACKGROUND_COLOR);
        maxlab->selection_color(FL_BACKGROUND_COLOR);
        maxlab->labeltype(FL_NORMAL_LABEL);
        maxlab->labelfont(0);
        maxlab->labelsize(14);
        maxlab->labelcolor(FL_FOREGROUND_COLOR);
        maxlab->align(Fl_Align(FL_ALIGN_CENTER));
        maxlab->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_envMaximumLabel_get_height(); o->drawing_w = cairo_code_draw_envMaximumLabel_get_width(); o->drawing_f = &cairo_code_draw_envMaximumLabel_render;
        o->stretch = false;
      } // Background* maxlab
      { Background* o = chanlab = new Background(550, 296, 7, 65);
        chanlab->box(FL_NO_BOX);
        chanlab->color(FL_BACKGROUND_COLOR);
        chanlab->selection_color(FL_BACKGROUND_COLOR);
        chanlab->labeltype(FL_NORMAL_LABEL);
        chanlab->labelfont(0);
        chanlab->labelsize(14);
        chanlab->labelcolor(FL_FOREGROUND_COLOR);
        chanlab->align(Fl_Align(FL_ALIGN_CENTER));
        chanlab->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_envChannelLabel_get_height(); o->drawing_w = cairo_code_draw_envChannelLabel_get_width(); o->drawing_f = &cairo_code_draw_envChannelLabel_render;
        o->stretch = false;
      } // Background* chanlab
      { Background* o = cclab = new Background(590, 296, 7, 65);
        cclab->box(FL_NO_BOX);
        cclab->color(FL_BACKGROUND_COLOR);
        cclab->selection_color(FL_BACKGROUND_COLOR);
        cclab->labeltype(FL_NORMAL_LABEL);
        cclab->labelfont(0);
        cclab->labelsize(14);
        cclab->labelcolor(FL_FOREGROUND_COLOR);
        cclab->align(Fl_Align(FL_ALIGN_CENTER));
        cclab->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_envControlLabel_get_height(); o->drawing_w = cairo_code_draw_envControlLabel_get_width(); o->drawing_f = &cairo_code_draw_envControlLabel_render;
        o->stretch = false;
      } // Background* cclab
      { Background* o = curlab1 = new Background(151, 352, 73, 7);
        curlab1->box(FL_NO_BOX);
        curlab1->color(FL_BACKGROUND_COLOR);
        curlab1->selection_color(FL_BACKGROUND_COLOR);
        curlab1->labeltype(FL_NORMAL_LABEL);
        curlab1->labelfont(0);
        curlab1->labelsize(14);
        curlab1->labelcolor(FL_FOREGROUND_COLOR);
        curlab1->align(Fl_Align(FL_ALIGN_CENTER));
        curlab1->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_envCurrentLabel_get_height(); o->drawing_w = cairo_code_draw_envCurrentLabel_get_width(); o->drawing_f = &cairo_code_draw_envCurrentLabel_render;
        o->stretch = false;
      } // Background* curlab1
      { Background* o = curlab2 = new Background(417, 388, 73, 7);
        curlab2->box(FL_NO_BOX);
        curlab2->color(FL_BACKGROUND_COLOR);
        curlab2->selection_color(FL_BACKGROUND_COLOR);
        curlab2->labeltype(FL_NORMAL_LABEL);
        curlab2->labelfont(0);
        curlab2->labelsize(14);
        curlab2->labelcolor(FL_FOREGROUND_COLOR);
        curlab2->align(Fl_Align(FL_ALIGN_CENTER));
        curlab2->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_envCurrentLabel_get_height(); o->drawing_w = cairo_code_draw_envCurrentLabel_get_width(); o->drawing_f = &cairo_code_draw_envCurrentLabel_render;
        o->stretch = false;
      } // Background* curlab2
      { Background* o = speedlab = new Background(29, 230, 72, 12);
        speedlab->box(FL_NO_BOX);
        speedlab->color(FL_BACKGROUND_COLOR);
        speedlab->selection_color(FL_BACKGROUND_COLOR);
        speedlab->labeltype(FL_NORMAL_LABEL);
        speedlab->labelfont(0);
        speedlab->labelsize(14);
        speedlab->labelcolor(FL_FOREGROUND_COLOR);
        speedlab->align(Fl_Align(FL_ALIGN_CENTER));
        speedlab->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_envSpeedLabel_get_height(); o->drawing_w = cairo_code_draw_envSpeedLabel_get_width(); o->drawing_f = &cairo_code_draw_envSpeedLabel_render;
        o->stretch = false;
      } // Background* speedlab
      { Background* o = inlab = new Background(199, 230, 59, 12);
        inlab->box(FL_NO_BOX);
        inlab->color(FL_BACKGROUND_COLOR);
        inlab->selection_color(FL_BACKGROUND_COLOR);
        inlab->labeltype(FL_NORMAL_LABEL);
        inlab->labelfont(0);
        inlab->labelsize(14);
        inlab->labelcolor(FL_FOREGROUND_COLOR);
        inlab->align(Fl_Align(FL_ALIGN_CENTER));
        inlab->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_envInLabel_get_height(); o->drawing_w = cairo_code_draw_envInLabel_get_width(); o->drawing_f = &cairo_code_draw_envInLabel_render;
        o->stretch = false;
      } // Background* inlab
      { Background* o = outlab = new Background(373, 230, 86, 12);
        outlab->box(FL_NO_BOX);
        outlab->color(FL_BACKGROUND_COLOR);
        outlab->selection_color(FL_BACKGROUND_COLOR);
        outlab->labeltype(FL_NORMAL_LABEL);
        outlab->labelfont(0);
        outlab->labelsize(14);
        outlab->labelcolor(FL_FOREGROUND_COLOR);
        outlab->align(Fl_Align(FL_ALIGN_CENTER));
        outlab->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_envOutLabel_get_height(); o->drawing_w = cairo_code_draw_envOutLabel_get_width(); o->drawing_f = &cairo_code_draw_envOutLabel_render;
        o->stretch = false;
      } // Background* outlab
      { Background* o = midilab = new Background(538, 230, 38, 9);
        midilab->box(FL_NO_BOX);
        midilab->color(FL_BACKGROUND_COLOR);
        midilab->selection_color(FL_BACKGROUND_COLOR);
        midilab->labeltype(FL_NORMAL_LABEL);
        midilab->labelfont(0);
        midilab->labelsize(14);
        midilab->labelcolor(FL_FOREGROUND_COLOR);
        midilab->align(Fl_Align(FL_ALIGN_CENTER));
        midilab->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_envMidiLabel_get_height(); o->drawing_w = cairo_code_draw_envMidiLabel_get_width(); o->drawing_f = &cairo_code_draw_envMidiLabel_render;
        o->stretch = false;
      } // Background* midilab
      { Background* o = revlab = new Background(417, 312, 74, 7);
        revlab->box(FL_NO_BOX);
        revlab->color(FL_BACKGROUND_COLOR);
        revlab->selection_color(FL_BACKGROUND_COLOR);
        revlab->labeltype(FL_NORMAL_LABEL);
        revlab->labelfont(0);
        revlab->labelsize(14);
        revlab->labelcolor(FL_FOREGROUND_COLOR);
        revlab->align(Fl_Align(FL_ALIGN_CENTER));
        revlab->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_envReverseLabel_get_height(); o->drawing_w = cairo_code_draw_envReverseLabel_get_width(); o->drawing_f = &cairo_code_draw_envReverseLabel_render;
        o->stretch = false;
      } // Background* revlab
      { Button* o = reverse = new Button(439, 260, 30, 45);
        reverse->tooltip("reverse output");
        reverse->box(FL_UP_BOX);
        reverse->color(FL_BACKGROUND_COLOR);
        reverse->selection_color(FL_BACKGROUND_COLOR);
        reverse->labeltype(FL_NORMAL_LABEL);
        reverse->labelfont(0);
        reverse->labelsize(14);
        reverse->labelcolor(FL_FOREGROUND_COLOR);
        reverse->callback((Fl_Callback*)cb_reverse);
        reverse->align(Fl_Align(FL_ALIGN_CENTER));
        reverse->when(FL_WHEN_RELEASE);
        o->type(FL_TOGGLE_BUTTON);
        o->drawing_h = cairo_code_draw_blackLEDbutton_get_height(); o->drawing_w = cairo_code_draw_blackLEDbutton_get_width(); o->drawing_f = &cairo_code_draw_blackLEDbutton_render;
      } // Button* reverse
      { Dial* o = peakrms = new Dial(5, 250, 38, 156);
        peakrms->tooltip("envelope type");
        peakrms->box(FL_NO_BOX);
        peakrms->color(FL_BACKGROUND_COLOR);
        peakrms->selection_color(FL_INACTIVE_COLOR);
        peakrms->labeltype(FL_NORMAL_LABEL);
        peakrms->labelfont(0);
        peakrms->labelsize(14);
        peakrms->labelcolor(FL_FOREGROUND_COLOR);
        peakrms->step(0.01);
        peakrms->callback((Fl_Callback*)cb_peakrms);
        peakrms->align(Fl_Align(FL_ALIGN_BOTTOM));
        peakrms->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_ivorySlider_get_height(); o->drawing_w = cairo_code_draw_ivorySlider_get_width(); o->drawing_f = &cairo_code_draw_ivorySlider_render;o->labelcolor(FL_DARK3);o->labelsize(12);
      } // Dial* peakrms
      { Dial* o = attack = new Dial(45, 250, 38, 156);
        attack->tooltip("attack time");
        attack->box(FL_NO_BOX);
        attack->color(FL_BACKGROUND_COLOR);
        attack->selection_color(FL_INACTIVE_COLOR);
        attack->labeltype(FL_NORMAL_LABEL);
        attack->labelfont(0);
        attack->labelsize(14);
        attack->labelcolor(FL_FOREGROUND_COLOR);
        attack->minimum(0.001);
        attack->maximum(15);
        attack->step(0.1);
        attack->value(0.01);
        attack->callback((Fl_Callback*)cb_attack);
        attack->align(Fl_Align(FL_ALIGN_BOTTOM));
        attack->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_ivorySlider_get_height(); o->drawing_w = cairo_code_draw_ivorySlider_get_width(); o->drawing_f = &cairo_code_draw_ivorySlider_render;
        sprintf(o->units,"s");o->labelcolor(FL_DARK3);o->labelsize(12);
      } // Dial* attack
      { Dial* o = decay = new Dial(85, 250, 38, 156);
        decay->tooltip("decay time");
        decay->box(FL_NO_BOX);
        decay->color(FL_BACKGROUND_COLOR);
        decay->selection_color(FL_INACTIVE_COLOR);
        decay->labeltype(FL_NORMAL_LABEL);
        decay->labelfont(0);
        decay->labelsize(14);
        decay->labelcolor(FL_FOREGROUND_COLOR);
        decay->minimum(0.001);
        decay->maximum(15);
        decay->step(0.1);
        decay->value(0.01);
        decay->callback((Fl_Callback*)cb_decay);
        decay->align(Fl_Align(FL_ALIGN_BOTTOM));
        decay->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_ivorySlider_get_height(); o->drawing_w = cairo_code_draw_ivorySlider_get_width(); o->drawing_f = &cairo_code_draw_ivorySlider_render;
        sprintf(o->units,"s");o->labelcolor(FL_DARK3);o->labelsize(12);
      } // Dial* decay
      { Dial* o = threshold = new Dial(235, 250, 38, 156);
        threshold->tooltip("input threshold value");
        threshold->box(FL_NO_BOX);
        threshold->color(FL_BACKGROUND_COLOR);
        threshold->selection_color(FL_INACTIVE_COLOR);
        threshold->labeltype(FL_NORMAL_LABEL);
        threshold->labelfont(0);
        threshold->labelsize(14);
        threshold->labelcolor(FL_FOREGROUND_COLOR);
        threshold->step(0.01);
        threshold->callback((Fl_Callback*)cb_threshold);
        threshold->align(Fl_Align(FL_ALIGN_BOTTOM));
        threshold->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_ivorySlider_get_height(); o->drawing_w = cairo_code_draw_ivorySlider_get_width(); o->drawing_f = &cairo_code_draw_ivorySlider_render;o->labelcolor(FL_DARK3);o->labelsize(12);
      } // Dial* threshold
      { Dial* o = saturation = new Dial(275, 250, 38, 156);
        saturation->tooltip("input saturation value");
        saturation->box(FL_NO_BOX);
        saturation->color(FL_BACKGROUND_COLOR);
        saturation->selection_color(FL_INACTIVE_COLOR);
        saturation->labeltype(FL_NORMAL_LABEL);
        saturation->labelfont(0);
        saturation->labelsize(14);
        saturation->labelcolor(FL_FOREGROUND_COLOR);
        saturation->maximum(2);
        saturation->step(0.02);
        saturation->callback((Fl_Callback*)cb_saturation);
        saturation->align(Fl_Align(FL_ALIGN_BOTTOM));
        saturation->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_ivorySlider_get_height(); o->drawing_w = cairo_code_draw_ivorySlider_get_width(); o->drawing_f = &cairo_code_draw_ivorySlider_render;o->labelcolor(FL_DARK3);o->labelsize(12);
      } // Dial* saturation
      { Dial* o = min = new Dial(330, 250, 38, 156);
        min->tooltip("MIDI output minimum value");
        min->box(FL_NO_BOX);
        min->color(FL_BACKGROUND_COLOR);
        min->selection_color(FL_INACTIVE_COLOR);
        min->labeltype(FL_NORMAL_LABEL);
        min->labelfont(0);
        min->labelsize(14);
        min->labelcolor(FL_FOREGROUND_COLOR);
        min->maximum(126);
        min->step(1);
        min->callback((Fl_Callback*)cb_min);
        min->align(Fl_Align(FL_ALIGN_BOTTOM));
        min->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_ivorySlider_get_height(); o->drawing_w = cairo_code_draw_ivorySlider_get_width(); o->drawing_f = &cairo_code_draw_ivorySlider_render;
        o->lock2int = true;o->labelcolor(FL_DARK3);o->labelsize(12);
      } // Dial* min
      { Dial* o = max = new Dial(370, 250, 38, 156);
        max->tooltip("MIDI output maximum value");
        max->box(FL_NO_BOX);
        max->color(FL_BACKGROUND_COLOR);
        max->selection_color(FL_INACTIVE_COLOR);
        max->labeltype(FL_NORMAL_LABEL);
        max->labelfont(0);
        max->labelsize(14);
        max->labelcolor(FL_FOREGROUND_COLOR);
        max->minimum(1);
        max->maximum(127);
        max->step(1);
        max->value(127);
        max->callback((Fl_Callback*)cb_max);
        max->align(Fl_Align(FL_ALIGN_BOTTOM));
        max->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_ivorySlider_get_height(); o->drawing_w = cairo_code_draw_ivorySlider_get_width(); o->drawing_f = &cairo_code_draw_ivorySlider_render;
        o->lock2int = true;o->labelcolor(FL_DARK3);o->labelsize(12);
      } // Dial* max
      { Dial* o = channel = new Dial(519, 250, 38, 156);
        channel->tooltip("MIDI output channel");
        channel->box(FL_NO_BOX);
        channel->color(FL_BACKGROUND_COLOR);
        channel->selection_color(FL_INACTIVE_COLOR);
        channel->labeltype(FL_NORMAL_LABEL);
        channel->labelfont(0);
        channel->labelsize(14);
        channel->labelcolor(FL_FOREGROUND_COLOR);
        channel->minimum(1);
        channel->maximum(16);
        channel->step(0.2);
        channel->value(1);
        channel->callback((Fl_Callback*)cb_channel);
        channel->align(Fl_Align(FL_ALIGN_BOTTOM));
        channel->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_ivorySlider_get_height(); o->drawing_w = cairo_code_draw_ivorySlider_get_width(); o->drawing_f = &cairo_code_draw_ivorySlider_render;
        o->lock2int = true;o->labelcolor(FL_DARK3);o->labelsize(12);
      } // Dial* channel
      { Dial* o = cc = new Dial(559, 250, 38, 156);
        cc->tooltip("MIDI output control number");
        cc->box(FL_NO_BOX);
        cc->color(FL_BACKGROUND_COLOR);
        cc->selection_color(FL_INACTIVE_COLOR);
        cc->labeltype(FL_NORMAL_LABEL);
        cc->labelfont(0);
        cc->labelsize(14);
        cc->labelcolor(FL_FOREGROUND_COLOR);
        cc->maximum(127);
        cc->step(1);
        cc->callback((Fl_Callback*)cb_cc);
        cc->align(Fl_Align(FL_ALIGN_BOTTOM));
        cc->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_ivorySlider_get_height(); o->drawing_w = cairo_code_draw_ivorySlider_get_width(); o->drawing_f = &cairo_code_draw_ivorySlider_render;
        o->lock2int = true;o->labelcolor(FL_DARK3);o->labelsize(12);
      } // Dial* cc
      { EnvAsciiDisplay* o = inLCD = new EnvAsciiDisplay(143, 298, 89, 45);
        inLCD->tooltip("current input value");
        inLCD->box(FL_NO_BOX);
        inLCD->color(FL_BACKGROUND_COLOR);
        inLCD->selection_color(FL_BACKGROUND_COLOR);
        inLCD->labeltype(FL_NORMAL_LABEL);
        inLCD->labelfont(0);
        inLCD->labelsize(14);
        inLCD->labelcolor(FL_FOREGROUND_COLOR);
        inLCD->align(Fl_Align(FL_ALIGN_CENTER));
        inLCD->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_16seg_get_height(); o->drawing_w = cairo_code_draw_16seg_get_width(); o->drawing_f = &cairo_code_draw_blue16seg_light_render;o->bg_drawing_f = &cairo_code_draw_blue16seg_lightbg_render;
        o->nchars = 3; o->periods = false;
      } // EnvAsciiDisplay* inLCD
      { EnvAsciiDisplay* o = outLCD = new EnvAsciiDisplay(409, 335, 89, 45);
        outLCD->tooltip("current output value");
        outLCD->box(FL_NO_BOX);
        outLCD->color(FL_BACKGROUND_COLOR);
        outLCD->selection_color(FL_BACKGROUND_COLOR);
        outLCD->labeltype(FL_NORMAL_LABEL);
        outLCD->labelfont(0);
        outLCD->labelsize(14);
        outLCD->labelcolor(FL_FOREGROUND_COLOR);
        outLCD->align(Fl_Align(FL_ALIGN_CENTER));
        outLCD->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_16seg_get_height(); o->drawing_w = cairo_code_draw_16seg_get_width(); o->drawing_f = &cairo_code_draw_green16seg_light_render;o->bg_drawing_f = &cairo_code_draw_green16seg_lightbg_render;
        o->nchars = 3; o->periods = false;
      } // EnvAsciiDisplay* outLCD
      { Scope* o = inScope = new Scope(1, 24, 600, 193);
        inScope->tooltip("input and output graph");
        inScope->box(FL_NO_BOX);
        inScope->color(FL_BACKGROUND_COLOR);
        inScope->selection_color(FL_BACKGROUND_COLOR);
        inScope->labeltype(FL_NORMAL_LABEL);
        inScope->labelfont(0);
        inScope->labelsize(14);
        inScope->labelcolor(FL_FOREGROUND_COLOR);
        inScope->align(Fl_Align(FL_ALIGN_CENTER));
        inScope->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_envScope_get_height(); o->drawing_w = cairo_code_draw_envScope_get_width(); o->drawing_f = &cairo_code_draw_blue_envScope_render;
      } // Scope* inScope
      { Scope* o = outScope = new Scope(1, 24, 600, 193);
        outScope->tooltip("input and output graph");
        outScope->box(FL_NO_BOX);
        outScope->color(FL_BACKGROUND_COLOR);
        outScope->selection_color(FL_BACKGROUND_COLOR);
        outScope->labeltype(FL_NORMAL_LABEL);
        outScope->labelfont(0);
        outScope->labelsize(14);
        outScope->labelcolor(FL_FOREGROUND_COLOR);
        outScope->align(Fl_Align(FL_ALIGN_CENTER));
        outScope->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_envScope_get_height(); o->drawing_w = cairo_code_draw_envScope_get_width(); o->drawing_f = &cairo_code_draw_green_envScope_render;
      } // Scope* outScope
      { EnvBounds* o = inBound = new EnvBounds(1, 20, 600, 193);
        inBound->tooltip("input and output graph");
        inBound->box(FL_NO_BOX);
        inBound->color(FL_BACKGROUND_COLOR);
        inBound->selection_color(FL_BACKGROUND_COLOR);
        inBound->labeltype(FL_NORMAL_LABEL);
        inBound->labelfont(0);
        inBound->labelsize(14);
        inBound->labelcolor(FL_FOREGROUND_COLOR);
        inBound->align(Fl_Align(FL_ALIGN_CENTER));
        inBound->when(FL_WHEN_RELEASE);
        o->blue = true;
      } // EnvBounds* inBound
      { outBound = new EnvBounds(10, 20, 589, 193);
        outBound->tooltip("input and output graph");
        outBound->box(FL_NO_BOX);
        outBound->color(FL_BACKGROUND_COLOR);
        outBound->selection_color(FL_BACKGROUND_COLOR);
        outBound->labeltype(FL_NORMAL_LABEL);
        outBound->labelfont(0);
        outBound->labelsize(14);
        outBound->labelcolor(FL_FOREGROUND_COLOR);
        outBound->align(Fl_Align(FL_ALIGN_CENTER));
        outBound->when(FL_WHEN_RELEASE);
      } // EnvBounds* outBound
      o->end();
      Fl_Group::current()->resizable(o);
    } // Fl_Group* o
    o->show();
    ui->end();
  } // Fl_Double_Window* ui
  return ui;
}

void EnvFollowerUI::idle() {
  Fl::check();
  Fl::flush();
}
