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

#include "/build/infamousplugins/src/build/src/hip2b/hip2b_ui.h"

void Hip2BUI::cb_up_i(Dial*, void*) {
  write_function(controller,UPP,sizeof(float),0,&up->floatvalue);
}
void Hip2BUI::cb_up(Dial* o, void* v) {
  ((Hip2BUI*)(o->parent()->parent()->user_data()))->cb_up_i(o,v);
}

void Hip2BUI::cb_down_i(Dial*, void*) {
  write_function(controller,DOWNN,sizeof(float),0,&down->floatvalue);
}
void Hip2BUI::cb_down(Dial* o, void* v) {
  ((Hip2BUI*)(o->parent()->parent()->user_data()))->cb_down_i(o,v);
}

void Hip2BUI::cb_input_i(Dial*, void*) {
  write_function(controller,INGAIN,sizeof(float),0,&input->floatvalue);
}
void Hip2BUI::cb_input(Dial* o, void* v) {
  ((Hip2BUI*)(o->parent()->parent()->user_data()))->cb_input_i(o,v);
}

void Hip2BUI::cb_output_i(Dial*, void*) {
  write_function(controller,OUTGAIN,sizeof(float),0,&output->floatvalue);
}
void Hip2BUI::cb_output(Dial* o, void* v) {
  ((Hip2BUI*)(o->parent()->parent()->user_data()))->cb_output_i(o,v);
}

void Hip2BUI::cb_octave_i(Dial*, void*) {
  write_function(controller,OCTAVE,sizeof(float),0,&octave->floatvalue);
}
void Hip2BUI::cb_octave(Dial* o, void* v) {
  ((Hip2BUI*)(o->parent()->parent()->user_data()))->cb_octave_i(o,v);
}

void Hip2BUI::cb_wetdry_i(Dial*, void*) {
  write_function(controller,WETDRY,sizeof(float),0,&wetdry->floatvalue);
}
void Hip2BUI::cb_wetdry(Dial* o, void* v) {
  ((Hip2BUI*)(o->parent()->parent()->user_data()))->cb_wetdry_i(o,v);
}

Fl_Double_Window* Hip2BUI::show() {
  { Fl_Double_Window* o = ui = new Fl_Double_Window(400, 400, "the infamous hip2b");
    ui->box(FL_UP_BOX);
    ui->user_data((void*)(this));
    { Aspect_Group* o = bg = new Aspect_Group(0, 0, 400, 400);
      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_TOP));
      bg->when(FL_WHEN_RELEASE);
      { Dial* o = up = new Dial(35, 33, 89, 89);
        up->tooltip("Switch Up Threshold");
        up->box(FL_NO_BOX);
        up->color(FL_BACKGROUND_COLOR);
        up->selection_color(FL_INACTIVE_COLOR);
        up->labeltype(FL_NORMAL_LABEL);
        up->labelfont(0);
        up->labelsize(14);
        up->labelcolor(FL_FOREGROUND_COLOR);
        up->minimum(-0.5);
        up->maximum(0.5);
        up->step(0.01);
        up->value(0.2);
        up->callback((Fl_Callback*)cb_up);
        up->align(Fl_Align(FL_ALIGN_BOTTOM));
        up->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_squareDial_get_height(); o->drawing_w = cairo_code_draw_squareDial_get_width(); o->drawing_f = &cairo_code_draw_squareDialr_render;
      } // Dial* up
      { Dial* o = down = new Dial(162, 33, 89, 89);
        down->tooltip("Switch Down Threshold");
        down->box(FL_NO_BOX);
        down->color(FL_BACKGROUND_COLOR);
        down->selection_color(FL_INACTIVE_COLOR);
        down->labeltype(FL_NORMAL_LABEL);
        down->labelfont(0);
        down->labelsize(14);
        down->labelcolor(FL_FOREGROUND_COLOR);
        down->minimum(-0.5);
        down->maximum(0.5);
        down->step(0.01);
        down->value(0.2);
        down->callback((Fl_Callback*)cb_down);
        down->align(Fl_Align(FL_ALIGN_BOTTOM));
        down->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_squareDial_get_height(); o->drawing_w = cairo_code_draw_squareDial_get_width(); o->drawing_f = &cairo_code_draw_squareDialbccw_render;
      } // Dial* down
      { Dial* o = input = new Dial(35, 146, 89, 89);
        input->tooltip("Input Gain");
        input->box(FL_NO_BOX);
        input->color(FL_BACKGROUND_COLOR);
        input->selection_color(FL_INACTIVE_COLOR);
        input->labeltype(FL_NORMAL_LABEL);
        input->labelfont(0);
        input->labelsize(14);
        input->labelcolor(FL_FOREGROUND_COLOR);
        input->maximum(2);
        input->step(0.01);
        input->value(1);
        input->callback((Fl_Callback*)cb_input);
        input->align(Fl_Align(FL_ALIGN_BOTTOM));
        input->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_squareDial_get_height(); o->drawing_w = cairo_code_draw_squareDial_get_width(); o->drawing_f = &cairo_code_draw_squareDialy_render;
      } // Dial* input
      { Dial* o = output = new Dial(162, 146, 89, 89);
        output->tooltip("Output Gain");
        output->box(FL_NO_BOX);
        output->color(FL_BACKGROUND_COLOR);
        output->selection_color(FL_INACTIVE_COLOR);
        output->labeltype(FL_NORMAL_LABEL);
        output->labelfont(0);
        output->labelsize(14);
        output->labelcolor(FL_FOREGROUND_COLOR);
        output->maximum(2);
        output->step(0.01);
        output->value(1);
        output->callback((Fl_Callback*)cb_output);
        output->align(Fl_Align(FL_ALIGN_BOTTOM));
        output->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_squareDial_get_height(); o->drawing_w = cairo_code_draw_squareDial_get_width(); o->drawing_f = &cairo_code_draw_squareDialgccw_render;
      } // Dial* output
      { Dial* o = octave = new Dial(35, 258, 89, 89);
        octave->tooltip("Octave/Dirt");
        octave->box(FL_NO_BOX);
        octave->color(FL_BACKGROUND_COLOR);
        octave->selection_color(FL_INACTIVE_COLOR);
        octave->labeltype(FL_NORMAL_LABEL);
        octave->labelfont(0);
        octave->labelsize(14);
        octave->labelcolor(FL_FOREGROUND_COLOR);
        octave->minimum(-2);
        octave->maximum(0);
        octave->step(0.05);
        octave->callback((Fl_Callback*)cb_octave);
        octave->align(Fl_Align(FL_ALIGN_BOTTOM));
        octave->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_squareDial_get_height(); o->drawing_w = cairo_code_draw_squareDial_get_width(); o->drawing_f = &cairo_code_draw_squareDialo_render;
        o->lock2int = 1;
      } // Dial* octave
      { Dial* o = wetdry = new Dial(162, 258, 89, 89);
        wetdry->tooltip("Wet/Dry Mix");
        wetdry->box(FL_NO_BOX);
        wetdry->color(FL_BACKGROUND_COLOR);
        wetdry->selection_color(FL_INACTIVE_COLOR);
        wetdry->labeltype(FL_NORMAL_LABEL);
        wetdry->labelfont(0);
        wetdry->labelsize(14);
        wetdry->labelcolor(FL_FOREGROUND_COLOR);
        wetdry->step(0.01);
        wetdry->value(0.7);
        wetdry->callback((Fl_Callback*)cb_wetdry);
        wetdry->align(Fl_Align(FL_ALIGN_BOTTOM));
        wetdry->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_squareDial_get_height(); o->drawing_w = cairo_code_draw_squareDial_get_width(); o->drawing_f = &cairo_code_draw_squareDialpccw_render;
      } // Dial* wetdry
      o->drawing_h = cairo_code_draw_hip2bg_get_height(); o->drawing_w = cairo_code_draw_hip2bg_get_width(); o->drawing_f = &cairo_code_draw_hip2bg_render;
      bg->end();
      Fl_Group::current()->resizable(bg);
    } // Aspect_Group* bg
    o->show();
    ui->end();
  } // Fl_Double_Window* ui
  return ui;
}

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