|
- # data file for the Fltk User Interface Designer (fluid)
- version 1.0300
- header_name {.h}
- code_name {.cxx}
- class DuckaUI {open
- } {
- Function {update_button(int button)} {
- comment {if the type of filter changes, this function will highlight the right button} open return_type void
- } {
- code {} {}
- }
- Function {DuckaUI()} {open
- } {
- Fl_Window window {open selected
- xywh {1734 413 160 220} type Double
- code0 {\#include "lv2/lv2plug.in/ns/extensions/ui/ui.h"}
- code1 {\#include "avtk.h"}
- code2 {window->color( fl_rgb_color( 17,17,17) );}
- code3 {close_cb( o, 0 );} visible
- } {
- Fl_Box headerImage {
- label {header.png}
- callback {//system("xdg-open http://www.openavproductions.com/artyfx\#ducka");}
- xywh {0 0 160 29} labelcolor 20 when 6
- code0 {using namespace std;}
- code1 {\#include <stdio.h>}
- code2 {\#include "header.c"}
- code3 {headerImage->setPixbuf(header.pixel_data,4);}
- class {Avtk::Image}
- }
- Fl_Dial graph {
- label graph
- callback {//cutoff = o->value();
- //float g = o->getGain();
- //gainDial->value( g );
- //freq->value( cutoff ); // update dial
- //writePort(CUTOFF_FREQ, cutoff);
- //writePort(CUTOFF_GAIN, g);}
- xywh {5 36 150 126} box UP_BOX color 179 labeltype NO_LABEL
- code1 {\#include "../dsp/ducka.hxx"}
- class {Avtk::SidechainGain}
- }
- Fl_Dial threshold {
- label Thres
- callback {float tmp = o->value();
- graph->threshold( tmp );
- writePort( int(DUCKA_THRESHOLD), tmp );}
- xywh {10 169 37 37} color 90 labelsize 10
- class {Avtk::Dial}
- }
- Fl_Dial drop {
- label Drop
- callback {float tmp = o->value();
- graph->reduce( tmp );
- writePort( int(DUCKA_REDUCTION), tmp );}
- xywh {62 169 37 37} color 90 labelsize 10
- class {Avtk::Dial}
- }
- Fl_Dial time {
- label Time
- callback {float tmp = o->value();
- graph->release( tmp );
- writePort( int(DUCKA_RELEASE_TIME),tmp );}
- xywh {113 168 37 37} color 90 labelsize 10
- class {Avtk::Dial}
- }
- }
- }
- decl {LV2UI_Write_Function write_function;} {public local
- }
- decl {LV2UI_Controller controller;} {public local
- }
- Function {idle()} {open return_type void
- } {
- code {Fl::check();
- Fl::flush();} {}
- }
- Function {getWidth()} {open return_type int
- } {
- code {return window->w();} {}
- }
- Function {getHeight()} {open return_type int
- } {
- code {return window->h();} {}
- }
- decl {float gain;} {private local
- }
- decl {float cutoff;} {private local
- }
- decl {float Q;} {private local
- }
- Function {writePort(int port, float& value)} {open
- } {
- code {//cout << "port " << port << " value " << value << endl;
- write_function(controller, port, sizeof(float), 0, &value);} {}
- }
- Function {close_cb(Fl_Widget* o, void*)} {open
- } {
- code {if ((Fl::event() == FL_KEYDOWN || Fl::event() == FL_SHORTCUT) && Fl::event_key() == FL_Escape)
- {
- return; // ignore ESC
- }
- else
- {
- o->hide();
- }} {}
- }
- }
|