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
662B

  1. #pragma once
  2. #include "app/common.hpp"
  3. #include "widgets/OpaqueWidget.hpp"
  4. #include "ui/Tooltip.hpp"
  5. #include "app/ParamQuantity.hpp"
  6. #include "history.hpp"
  7. namespace rack {
  8. struct ParamWidget : OpaqueWidget {
  9. ParamQuantity *paramQuantity = NULL;
  10. float dirtyValue = NAN;
  11. Tooltip *tooltip = NULL;
  12. ~ParamWidget();
  13. void step() override;
  14. void draw(NVGcontext *vg) override;
  15. void onButton(const event::Button &e) override;
  16. void onEnter(const event::Enter &e) override;
  17. void onLeave(const event::Leave &e) override;
  18. /** For legacy patch loading */
  19. void fromJson(json_t *rootJ);
  20. void createContextMenu();
  21. void resetAction();
  22. };
  23. } // namespace rack