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.

38 lines
859B

  1. #include "rack.hpp"
  2. using namespace rack;
  3. namespace rack_plugin_rcm {
  4. namespace SongRoll {
  5. struct SongRollData;
  6. struct PatternHeaderWidget;
  7. struct PatternControlWidget;
  8. struct RepeatControlWidget;
  9. struct ClockDivControlWidget;
  10. class PatternControllerSlice : public VirtualWidget {
  11. public:
  12. const int channel;
  13. SongRollData& data;
  14. SequentialLayout* layout;
  15. PatternHeaderWidget* header;
  16. PatternControlWidget* pattern;
  17. RepeatControlWidget* repeats;
  18. ClockDivControlWidget* clock_div;
  19. PatternControllerSlice(int channel, SongRollData& data, int section);
  20. void draw(NVGcontext* ctx) override;
  21. void step() override;
  22. void onMouseDown(EventMouseDown& e) override;
  23. void setSection(int section);
  24. private:
  25. int section = 0;
  26. bool sectionChanged = true;
  27. };
  28. }
  29. } // namespace rack_plugin_rcm