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.

32 lines
522B

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