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

#include "/build/infamousplugins/src/build/src/stuck/stuck_ui.h"

void StuckUI::cb_stickit_i(Button*, void*) {
  led->value(stickit->value());
write_function(controller,STICKIT,sizeof(float),0,&stickit->floatvalue);
}
void StuckUI::cb_stickit(Button* o, void* v) {
  ((StuckUI*)(o->parent()->parent()->user_data()))->cb_stickit_i(o,v);
}

void StuckUI::cb_volume_i(Dial*, void*) {
  write_function(controller,DRONEGAIN,sizeof(float),0,&volume->floatvalue);
}
void StuckUI::cb_volume(Dial* o, void* v) {
  ((StuckUI*)(o->parent()->parent()->user_data()))->cb_volume_i(o,v);
}

void StuckUI::cb_time_i(Dial*, void*) {
  write_function(controller,RELEASE,sizeof(float),0,&time->floatvalue);
}
void StuckUI::cb_time(Dial* o, void* v) {
  ((StuckUI*)(o->parent()->parent()->user_data()))->cb_time_i(o,v);
}

Fl_Double_Window* StuckUI::show() {
  { Fl_Double_Window* o = ui = new Fl_Double_Window(1436, 1740, "the infamous stuck");
    ui->box(FL_UP_BOX);
    ui->user_data((void*)(this));
    { Aspect_Group* o = bg = new Aspect_Group(0, 0, 256, 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);
      { Button* o = stickit = new Button(43, 191, 22, 72);
        stickit->tooltip("Stick It!");
        stickit->box(FL_UP_BOX);
        stickit->color(FL_BACKGROUND_COLOR);
        stickit->selection_color(FL_BACKGROUND_COLOR);
        stickit->labeltype(FL_NORMAL_LABEL);
        stickit->labelfont(0);
        stickit->labelsize(14);
        stickit->labelcolor(FL_FOREGROUND_COLOR);
        stickit->callback((Fl_Callback*)cb_stickit);
        stickit->align(Fl_Align(FL_ALIGN_CENTER));
        stickit->when(FL_WHEN_RELEASE);
        o->type(FL_TOGGLE_BUTTON);
        o->drawing_h = cairo_code_draw_toggleSwitch_get_height(); o->drawing_w = cairo_code_draw_toggleSwitch_get_width(); o->drawing_f = &cairo_code_draw_toggleSwitch_render;
      } // Button* stickit
      { Button* o = led = new Button(77, 217, 18, 18);
        led->box(FL_UP_BOX);
        led->color(FL_BACKGROUND_COLOR);
        led->selection_color(FL_BACKGROUND_COLOR);
        led->labeltype(FL_NORMAL_LABEL);
        led->labelfont(0);
        led->labelsize(14);
        led->labelcolor(FL_FOREGROUND_COLOR);
        led->align(Fl_Align(FL_ALIGN_CENTER));
        led->when(FL_WHEN_RELEASE);
        led->deactivate();
        o->type(FL_TOGGLE_BUTTON);
        o->drawing_h = cairo_code_draw_LED_get_height(); o->drawing_w = cairo_code_draw_LED_get_width(); o->drawing_f = &cairo_code_draw_blueLED_render;
      } // Button* led
      { Dial* o = volume = new Dial(50, 280, 71, 71);
        volume->tooltip("Drone Gain");
        volume->box(FL_NO_BOX);
        volume->color(FL_BACKGROUND_COLOR);
        volume->selection_color(FL_INACTIVE_COLOR);
        volume->labeltype(FL_NORMAL_LABEL);
        volume->labelfont(0);
        volume->labelsize(14);
        volume->labelcolor(FL_FOREGROUND_COLOR);
        volume->maximum(2);
        volume->step(0.01);
        volume->value(0.5);
        volume->callback((Fl_Callback*)cb_volume);
        volume->align(Fl_Align(FL_ALIGN_BOTTOM));
        volume->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_tabDial_get_height(); o->drawing_w = cairo_code_draw_tabDial_get_width(); o->drawing_f = &cairo_code_draw_tabDial_render;
      } // Dial* volume
      { Dial* o = time = new Dial(147, 280, 71, 71);
        time->tooltip("Release");
        time->box(FL_NO_BOX);
        time->color(FL_BACKGROUND_COLOR);
        time->selection_color(FL_INACTIVE_COLOR);
        time->labeltype(FL_NORMAL_LABEL);
        time->labelfont(0);
        time->labelsize(14);
        time->labelcolor(FL_FOREGROUND_COLOR);
        time->minimum(0.01);
        time->maximum(3);
        time->step(0.01);
        time->value(0.5);
        time->callback((Fl_Callback*)cb_time);
        time->align(Fl_Align(FL_ALIGN_BOTTOM));
        time->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_tabDial_get_height(); o->drawing_w = cairo_code_draw_tabDial_get_width(); o->drawing_f = &cairo_code_draw_tabDial_render;
        sprintf(o->units,"s");
      } // Dial* time
      o->drawing_h = cairo_code_draw_stuckbg_get_height(); o->drawing_w = cairo_code_draw_stuckbg_get_width(); o->drawing_f = &cairo_code_draw_stuckbg_render;
      bg->end();
      Fl_Group::current()->resizable(bg);
    } // Aspect_Group* bg
    o->show();
    ui->end();
  } // Fl_Double_Window* ui
  return ui;
}

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