O'Reilly logo

Getting Started With JUCE by Martin Robinson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using other component types

There are many other built-in component types and variations on the sliders and buttons already seen. In the previous section we used the default horizontal slider, but the Slider class is very flexible, as illustrated by the Widget demo page of the JUCE Demo application. The sliders can adopt a rotary-type control, have minimum and maximum ranges, and warp the numerical track to adopt non-linear behavior. Similarly, buttons can adopt different styles such as toggle buttons, buttons that use images, and so on. The following example illustrates a toggle-type button that changes the style of two sliders. Create a new Introjucer project named Chapter02_04, and use the following code:

  • MainComponent.h:
    #ifndef __MAINCOMPONENT_H__ ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required