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.

29 lines
562B

  1. #pragma once
  2. #include "widgets/OpaqueWidget.hpp"
  3. #include "ui/common.hpp"
  4. namespace rack {
  5. /** Parent must be a ScrollWidget */
  6. struct ScrollBar : OpaqueWidget {
  7. enum Orientation {
  8. VERTICAL,
  9. HORIZONTAL
  10. };
  11. Orientation orientation;
  12. BNDwidgetState state = BND_DEFAULT;
  13. float offset = 0.0;
  14. float size = 0.0;
  15. ScrollBar();
  16. void draw(const DrawContext &ctx) override;
  17. void onDragStart(const event::DragStart &e) override;
  18. void onDragMove(const event::DragMove &e) override;
  19. void onDragEnd(const event::DragEnd &e) override;
  20. };
  21. } // namespace rack