DPF Plugin examples
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

109 lines
3.0KB

  1. # data file for the Fltk User Interface Designer (fluid)
  2. version 1.0300
  3. header_name {.h}
  4. code_name {.cxx}
  5. class DuckaUI {open
  6. } {
  7. Function {update_button(int button)} {
  8. comment {if the type of filter changes, this function will highlight the right button} open return_type void
  9. } {
  10. code {} {}
  11. }
  12. Function {DuckaUI()} {open
  13. } {
  14. Fl_Window window {open selected
  15. xywh {1734 413 160 220} type Double
  16. code0 {\#include "lv2/lv2plug.in/ns/extensions/ui/ui.h"}
  17. code1 {\#include "avtk.h"}
  18. code2 {window->color( fl_rgb_color( 17,17,17) );}
  19. code3 {close_cb( o, 0 );} visible
  20. } {
  21. Fl_Box headerImage {
  22. label {header.png}
  23. callback {//system("xdg-open http://www.openavproductions.com/artyfx\#ducka");}
  24. xywh {0 0 160 29} labelcolor 20 when 6
  25. code0 {using namespace std;}
  26. code1 {\#include <stdio.h>}
  27. code2 {\#include "header.c"}
  28. code3 {headerImage->setPixbuf(header.pixel_data,4);}
  29. class {Avtk::Image}
  30. }
  31. Fl_Dial graph {
  32. label graph
  33. callback {//cutoff = o->value();
  34. //float g = o->getGain();
  35. //gainDial->value( g );
  36. //freq->value( cutoff ); // update dial
  37. //writePort(CUTOFF_FREQ, cutoff);
  38. //writePort(CUTOFF_GAIN, g);}
  39. xywh {5 36 150 126} box UP_BOX color 179 labeltype NO_LABEL
  40. code1 {\#include "../dsp/ducka.hxx"}
  41. class {Avtk::SidechainGain}
  42. }
  43. Fl_Dial threshold {
  44. label Thres
  45. callback {float tmp = o->value();
  46. graph->threshold( tmp );
  47. writePort( int(DUCKA_THRESHOLD), tmp );}
  48. xywh {10 169 37 37} color 90 labelsize 10
  49. class {Avtk::Dial}
  50. }
  51. Fl_Dial drop {
  52. label Drop
  53. callback {float tmp = o->value();
  54. graph->reduce( tmp );
  55. writePort( int(DUCKA_REDUCTION), tmp );}
  56. xywh {62 169 37 37} color 90 labelsize 10
  57. class {Avtk::Dial}
  58. }
  59. Fl_Dial time {
  60. label Time
  61. callback {float tmp = o->value();
  62. graph->release( tmp );
  63. writePort( int(DUCKA_RELEASE_TIME),tmp );}
  64. xywh {113 168 37 37} color 90 labelsize 10
  65. class {Avtk::Dial}
  66. }
  67. }
  68. }
  69. decl {LV2UI_Write_Function write_function;} {public local
  70. }
  71. decl {LV2UI_Controller controller;} {public local
  72. }
  73. Function {idle()} {open return_type void
  74. } {
  75. code {Fl::check();
  76. Fl::flush();} {}
  77. }
  78. Function {getWidth()} {open return_type int
  79. } {
  80. code {return window->w();} {}
  81. }
  82. Function {getHeight()} {open return_type int
  83. } {
  84. code {return window->h();} {}
  85. }
  86. decl {float gain;} {private local
  87. }
  88. decl {float cutoff;} {private local
  89. }
  90. decl {float Q;} {private local
  91. }
  92. Function {writePort(int port, float& value)} {open
  93. } {
  94. code {//cout << "port " << port << " value " << value << endl;
  95. write_function(controller, port, sizeof(float), 0, &value);} {}
  96. }
  97. Function {close_cb(Fl_Widget* o, void*)} {open
  98. } {
  99. code {if ((Fl::event() == FL_KEYDOWN || Fl::event() == FL_SHORTCUT) && Fl::event_key() == FL_Escape)
  100. {
  101. return; // ignore ESC
  102. }
  103. else
  104. {
  105. o->hide();
  106. }} {}
  107. }
  108. }