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.

35 lines
783B

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