The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
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.

19 lines
935B

  1. /**
  2. @page controlling_control_buttons Controlling control buttons
  3. In addition to sending button pressed and button released events, ControlButton objects can allow your application code to change the colour of the LED behind the corresponding physical button on a BLOCKS device.
  4. An array of pointers to the available %ControlButton objects can be obtained from the Block::getButtons method of a Block---see the @ref discovering_blocks section for details of how to obtain a %Block object.
  5. Once you have a %ControlButton, the functions involving the LED are ControlButton::hasLight and ControlButton::setLightColour, which are descriptively named.
  6. A code snippet showing how to turn all the available buttons of a %Block red is shown below.
  7. @code{.cpp}
  8. void setAllButtonsRed (Block& block)
  9. {
  10. for (auto button : block->getButtons())
  11. if (button->hasLight())
  12. button->setLightColour (Colours::red);
  13. }
  14. @endcode
  15. */