|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261 |
- # data file for the Fltk User Interface Designer (fluid)
- version 1.0302
- header_name {.h}
- code_name {.cc}
- decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {private local
- }
-
- decl {//License: GNU GPL version 2 or later} {private local
- }
-
- decl {\#include <FL/Fl_Box.H>} {public local
- }
-
- decl {\#include <FL/fl_draw.H>} {public local
- }
-
- decl {\#include <FL/Fl_Value_Output.H>} {public local
- }
-
- decl {\#include <math.h>} {private local
- }
-
- decl {\#include <stdio.h>} {private local
- }
-
- decl {\#include <stdlib.h>} {private local
- }
-
- decl {\#include <string.h>} {private local
- }
-
- decl {\#include "Fl_Osc_Dial.H"} {public local
- }
-
- decl {\#include "Fl_Osc_Pane.H"} {selected public local
- }
-
- decl {\#include "Fl_Osc_Button.H"} {public local
- }
-
- decl {\#include "Fl_Osc_Check.H"} {public local
- }
-
- decl {\#include "Fl_Osc_Roller.H"} {public local
- }
-
- decl {\#include "Fl_Osc_Output.H"} {public local
- }
-
- decl {\#include "Fl_Resonance_Graph.H"} {public local
- }
-
- decl {\#include "PresetsUI.h"} {public local
- }
-
- class ResonanceUI {open : PresetsUI_
- } {
- Function {make_window(Fl_Osc_Interface *osc, std::string loc)} {open
- } {
- Fl_Window resonancewindow {
- label Resonance open
- xywh {123 93 780 305} type Double
- class Fl_Osc_Window visible
- } {
- Fl_Value_Output khzvalue {
- label kHz
- xywh {415 264 45 18} labelsize 12 align 8 minimum 0.001 maximum 48 step 0.01 textfont 1 textsize 12
- code0 {//this widget must be before the calling widgets}
- code1 {resonancewindow->init(osc,loc);}
- }
- Fl_Value_Output dbvalue {
- label dB
- xywh {415 282 45 18} labelsize 12 align 8 minimum -150 maximum 150 step 0.1 textfont 1 textsize 12
- code0 {//this widget must be before the calling widgets}
- }
- Fl_Button {} {
- label Close
- callback {resonancewindow->hide();}
- xywh {690 283 84 17} box THIN_UP_BOX
- }
- Fl_Button {} {
- label Zero
- callback {
- o->oscWrite("zero");
- redrawPADnoteApply();}
- tooltip {Clear the resonance function} xywh {491 264 66 15} box THIN_UP_BOX labelfont 1 labelsize 12
- class Fl_Osc_Button
- }
- Fl_Button {} {
- label Smooth
- callback {o->oscWrite("smooth");
- redrawPADnoteApply();}
- tooltip {Smooth the resonance function} xywh {491 282 66 18} box THIN_UP_BOX labelfont 1 labelsize 12
- class Fl_Osc_Button
- }
- Fl_Check_Button enabled {
- label Enable
- xywh {6 270 78 27} box THIN_UP_BOX down_box DOWN_BOX
- code0 {o->init("Penabled");}
- class Fl_Osc_Check
- }
- Fl_Roller maxdb {
- callback {maxdbvo->value(o->value());
- redrawPADnoteApply();}
- xywh {90 282 84 15} type Horizontal minimum 1 maximum 90 step 1 value 30
- code0 {o->init("PmaxdB");}
- class Fl_Osc_Roller
- }
- Fl_Value_Output maxdbvo {
- label {Max.}
- tooltip {The Maximum amplitude (dB)} xywh {126 264 24 18} labelsize 12 minimum 1 maximum 127 step 1 value 30 textfont 1 textsize 12
- }
- Fl_Box {} {
- label dB
- xywh {150 264 24 18}
- }
- Fl_Value_Output centerfreqvo {
- label {C.f.}
- callback {o->value(o->newvalue()/1000.0);}
- tooltip {Center Frequency (kHz)} xywh {210 264 33 18} labelsize 12 when 3 minimum 1 maximum 10 step 0.01 value 1 textfont 1 textsize 12
- code0 {o->init("centerfreq");}
- class Fl_Osc_Output
- }
- Fl_Value_Output octavesfreqvo {
- label {Oct.}
- callback {o->value(o->newvalue());}
- tooltip {No. of octaves} xywh {210 282 33 18} labelsize 12 when 3 minimum 1 maximum 127 step 1 value 30 textfont 1 textsize 12
- code0 {o->init("octavesfreq");}
- class Fl_Osc_Output
- }
- Fl_Button {} {
- label RND2
- callback {o->oscWrite("randomize", "i", 1);
- redrawPADnoteApply();}
- tooltip {Randomize the resonance function} xywh {566 276 42 12} box THIN_UP_BOX labelfont 1 labelsize 10
- class Fl_Osc_Button
- }
- Fl_Button {} {
- label RND1
- callback {o->oscWrite("randomize", "i", 0);
- redrawPADnoteApply();}
- tooltip {Randomize the resonance function} xywh {566 264 42 12} box THIN_UP_BOX labelfont 1 labelsize 10
- class Fl_Osc_Button
- }
- Fl_Button {} {
- label RND3
- callback {o->oscWrite("randomize", "i", 2);
- redrawPADnoteApply();}
- tooltip {Randomize the resonance function} xywh {566 288 42 12} box THIN_UP_BOX labelfont 1 labelsize 10
- class Fl_Osc_Button
- }
- Fl_Check_Button p1st {
- label {P.1st}
- tooltip {Protect the fundamental frequency (do not damp the first harmonic)} xywh {365 285 45 15} down_box DOWN_BOX labelsize 10
- code0 {o->init("Pprotectthefundamental");}
- class Fl_Osc_Check
- }
- Fl_Button {} {
- label InterpP
- callback {int type;
- if (Fl::event_button()==FL_LEFT_MOUSE) type=0;
- else type=1;
- o->oscWrite("interpolatepeaks", "i", type);
- redrawPADnoteApply();}
- tooltip {Interpolate the peaks} xywh {365 265 46 15} box THIN_UP_BOX labelfont 1 labelsize 10
- class Fl_Osc_Button
- }
- Fl_Dial centerfreq {
- label {C.f.}
- callback {centerfreqvo->do_callback();
- redrawPADnoteApply();}
- xywh {245 265 30 30} box ROUND_UP_BOX labelsize 10 maximum 127 step 1
- code0 {o->init("Pcenterfreq");}
- class Fl_Osc_Dial
- }
- Fl_Dial octavesfreq {
- label {Oct.}
- callback {octavesfreqvo->do_callback();
- redrawPADnoteApply();}
- xywh {280 265 30 30} box ROUND_UP_BOX labelsize 10 maximum 127 step 1
- code0 {o->init("Poctavesfreq");}
- class Fl_Osc_Dial
- }
- Fl_Button {} {
- label C
- callback {presetsui->copy(resonancewindow->loc());}
- xywh {625 275 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 55
- }
- Fl_Button {} {
- label P
- callback {presetsui->paste(resonancewindow->loc(),this);}
- xywh {655 275 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 55
- }
- Fl_Button applybutton {
- label Apply
- callback {applybutton->color(FL_GRAY);
- applybutton->redraw();
- if (cbapplywidget!=NULL) {
- cbapplywidget->do_callback();
- cbapplywidget->color(FL_GRAY);
- cbapplywidget->redraw();
- };}
- xywh {690 265 85 15} box THIN_UP_BOX labelfont 1 labelsize 11
- }
- Fl_Box rg {
- xywh {6 5 768 256} box BORDER_BOX
- class Fl_Resonance_Graph
- }
- }
- }
- Function {ResonanceUI(Fl_Osc_Interface *osc, std::string loc)} {open
- } {
- code {
- assert(osc);
- cbwidget=NULL;
- cbapplywidget=NULL;
- make_window(osc, loc);
- rg->init(khzvalue,dbvalue);
- applybutton->hide();} {}
- }
- Function {~ResonanceUI()} {} {
- code {resonancewindow->hide();
- delete resonancewindow;
- } {}
- }
- Function {redrawPADnoteApply()} {} {
- code {
- rg->update();
- if (cbwidget!=NULL) {
- cbwidget->do_callback();
- applybutton->color(FL_RED);
- applybutton->redraw();
- };} {}
- }
- Function {setcbwidget(Fl_Widget *cbwidget,Fl_Widget *cbapplywidget)} {} {
- code {this->cbwidget=cbwidget;
- this->cbapplywidget=cbapplywidget;
- rg->setcbwidget(cbwidget,applybutton);
- applybutton->show();} {}
- }
- Function {refresh()} {} {
- code {redrawPADnoteApply();
- //TODO fix me when controls are relocatable
- //enabled->value(respar->Penabled);
-
- //maxdb->value(respar->PmaxdB);
- //maxdbvo->value(respar->PmaxdB);
- //
- //centerfreqvo->value(respar->getcenterfreq()/1000.0);
- //octavesfreqvo->value(respar->getoctavesfreq());
- //
- //centerfreq->value(respar->Pcenterfreq);
- //octavesfreq->value(respar->Poctavesfreq);
- //
- //p1st->value(respar->Pprotectthefundamental);
-
- rg->update();} {}
- }
- decl {Fl_Widget *cbwidget,*cbapplywidget;} {private local
- }
- }
|