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.

111 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 RoomyUI {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 {RoomyUI()} {open
  13. } {
  14. Fl_Window window {open selected
  15. xywh {1024 378 160 220} type Double
  16. code0 {\#include "lv2/lv2plug.in/ns/extensions/ui/ui.h"}
  17. code1 {window->color( fl_rgb_color( 17, 17, 17) );}
  18. code2 {close_cb(o, 0);}
  19. code3 {\#include "../dsp/roomy.hxx"} 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 {\#include "avtk.h"}
  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 {using namespace std;}
  41. code2 {\#include <iostream>}
  42. class {Avtk::Reverb}
  43. }
  44. Fl_Dial time {
  45. label Time
  46. callback {float tmp = o->value();
  47. graph->size( tmp );
  48. writePort( int(ROOMY_TIME), tmp );}
  49. xywh {10 169 37 37} color 90 labelsize 10
  50. class {Avtk::Dial}
  51. }
  52. Fl_Dial damping {
  53. label Damping
  54. callback {float tmp = o->value();
  55. graph->damping( tmp );
  56. writePort( int(ROOMY_DAMPING), tmp );}
  57. xywh {62 169 37 37} color 90 labelsize 10
  58. class {Avtk::Dial}
  59. }
  60. Fl_Dial dryWet {
  61. label {Dry / Wet}
  62. callback {float tmp = o->value();
  63. graph->wet( tmp );
  64. writePort( int(ROOMY_DRY_WET),tmp );}
  65. xywh {113 168 37 37} color 90 labelsize 10
  66. class {Avtk::Dial}
  67. }
  68. }
  69. }
  70. decl {LV2UI_Write_Function write_function;} {public local
  71. }
  72. decl {LV2UI_Controller controller;} {public local
  73. }
  74. Function {idle()} {open return_type void
  75. } {
  76. code {Fl::check();
  77. Fl::flush();} {}
  78. }
  79. Function {getWidth()} {open return_type int
  80. } {
  81. code {return window->w();} {}
  82. }
  83. Function {getHeight()} {open return_type int
  84. } {
  85. code {return window->h();} {}
  86. }
  87. decl {float gain;} {private local
  88. }
  89. decl {float cutoff;} {private local
  90. }
  91. decl {float Q;} {private local
  92. }
  93. Function {writePort(int port, float& value)} {open
  94. } {
  95. code {//cout << "port " << port << " value " << value << endl;
  96. write_function(controller, port, sizeof(float), 0, &value);} {}
  97. }
  98. }
  99. Function {close_cb(Fl_Widget* o, void*)} {open
  100. } {
  101. code {if ((Fl::event() == FL_KEYDOWN || Fl::event() == FL_SHORTCUT) && Fl::event_key() == FL_Escape)
  102. {
  103. return; // ignore ESC
  104. }
  105. else
  106. {
  107. o->hide();
  108. }} {}
  109. }