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.

31 lines
500B

  1. #pragma once
  2. #include "widgets/OpaqueWidget.hpp"
  3. #include "app/ParamQuantity.hpp"
  4. #include "app/common.hpp"
  5. namespace rack {
  6. /** Controls a ParamQuantity */
  7. struct ParamWidget : OpaqueWidget {
  8. ParamQuantity *quantity;
  9. ParamWidget() {
  10. quantity = new ParamQuantity;
  11. }
  12. ~ParamWidget() {
  13. delete quantity;
  14. }
  15. /** For legacy patch loading */
  16. void fromJson(json_t *rootJ);
  17. virtual void reset();
  18. virtual void randomize();
  19. void onButton(event::Button &e) override;
  20. };
  21. } // namespace rack