![]() |
Klang C++ 0.7.15
Language Reference (draft)
|
Language Guide / Controls and Parameters · Generated API signature Creates a slider. Use a slider for a continuous value such as a wet/dry mix. The optional minimum, maximum, and initial value default to 0, 1, and 0. Add the control to the model’s Controls collection during setup. Pass the minimum, maximum, and initial value to set the range and starting position. This mix slider starts halfway through its range. Pass Slider
klang::SliderBasic use
controls = { Slider("Mix") };Optional properties
controls = { Slider("Mix", 0, 1, 0.5) };Optional placement and size
Control::Size as the last argument. Its values are x, y, width, and height. Omit it for automatic layout.controls = { Slider("Mix", 0, 1, 0.5, { 0, 0, 120, 24 }) };