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.

31 lines
549B

  1. #pragma once
  2. #include "widgets/Widget.hpp"
  3. #include "ui/common.hpp"
  4. namespace rack {
  5. /** Positions children in a row/column based on their widths/heights */
  6. struct SequentialLayout : Widget {
  7. enum Orientation {
  8. HORIZONTAL_ORIENTATION,
  9. VERTICAL_ORIENTATION,
  10. };
  11. enum Alignment {
  12. LEFT_ALIGNMENT,
  13. CENTER_ALIGNMENT,
  14. RIGHT_ALIGNMENT,
  15. };
  16. Orientation orientation = HORIZONTAL_ORIENTATION;
  17. Alignment alignment = LEFT_ALIGNMENT;
  18. /** Space between adjacent elements */
  19. math::Vec spacing;
  20. void step() override;
  21. };
  22. } // namespace rack