HISE Docs

ScriptSliderPack


Create a reference to a SliderPack UI component and modify its values.

const var SliderPack1 = Content.getComponent("SliderPack1");


Class methods

addToMacroControl

Adds the knob / button to a macro controller (from 0 to 7).

ScriptSliderPack.addToMacroControl(int macroIndex)



createLocalLookAndFeel

Returns a local look and feel if it was registered before.

ScriptSliderPack.createLocalLookAndFeel(ScriptContentComponent *contentComponent, Component *componentToRegister)



fadeComponent

Toggles the visibility and fades a component using the global animator.

ScriptSliderPack.fadeComponent(bool shouldBeVisible, int milliseconds)



get

returns the value of the property.

ScriptSliderPack.get(String propertyName)



getAllProperties

Returns a list of all property IDs as array.

ScriptSliderPack.getAllProperties()



getChildComponents

Returns list of component's children

ScriptSliderPack.getChildComponents()



getDataAsBuffer

Returns a Buffer object containing all slider values (as reference).

ScriptSliderPack.getDataAsBuffer()



getGlobalPositionX

Returns the absolute x-position relative to the interface.

ScriptSliderPack.getGlobalPositionX()



getGlobalPositionY

Returns the absolute y-position relative to the interface.

ScriptSliderPack.getGlobalPositionY()



getHeight

Returns the height of the component.

ScriptSliderPack.getHeight()



getId

Returns the ID of the component.

ScriptSliderPack.getId()



getLocalBounds

Returns a [x, y, w, h] array that was reduced by the given amount.

ScriptSliderPack.getLocalBounds(float reduceAmount)



getNumSliders

Returns the number of sliders.

ScriptSliderPack.getNumSliders()



getSliderValueAt

Returns the value at the given index.

ScriptSliderPack.getSliderValueAt(int index)



getValueNormalized

Returns the normalized value.

ScriptSliderPack.getValueNormalized()



getWidth

Returns the width of the component.

ScriptSliderPack.getWidth()



grabFocus

Call this method in order to grab the keyboard focus for this component.

ScriptSliderPack.grabFocus()



loseFocus

Call this method in order to give away the focus for this component.

ScriptSliderPack.loseFocus()



referToData

Connects this SliderPack to an existing SliderPackData object. -1 sets it back to its internal data object.

ScriptSliderPack.referToData(var sliderPackData)



registerAtParent

Registers this sliderpack to the script processor to be acessible from the outside.

ScriptSliderPack.registerAtParent(int pIndex)



sendRepaintMessage

Manually sends a repaint message for the component.

ScriptSliderPack.sendRepaintMessage()



set

Sets the property.

ScriptSliderPack.set(String propertyName, var value)



setAllValueChangeCausesCallback

Enables or disables the control callback execution when the SliderPack is changed via setAllValues.

ScriptSliderPack.setAllValueChangeCausesCallback(bool shouldBeEnabled)



setAllValues

Sets all slider values to the given value. If value is a number it will be filled with the number. If it's a buffer (or array) it will set the values accordingly (without resizing the slider packs).

ScriptSliderPack.setAllValues(var value)



setAllValuesWithUndo

Like setAllValues, but with undo support (if useUndoManager is enabled).

ScriptSliderPack.setAllValuesWithUndo(var value)



setColour

sets the colour of the component (BG, IT1, IT2, TXT).

ScriptSliderPack.setColour(int colourId, int colourAs32bitHex)



setConsumedKeyPresses

Registers a selection of key presses to be consumed by this component.

ScriptSliderPack.setConsumedKeyPresses(var listOfKeys)



setControlCallback

Pass a inline function for a custom callback event.

ScriptSliderPack.setControlCallback(var controlFunction)



setKeyPressCallback

Adds a callback to react on key presses (when this component is focused).

ScriptSliderPack.setKeyPressCallback(var keyboardFunction)



setLocalLookAndFeel

Attaches the local look and feel to this component.

ScriptSliderPack.setLocalLookAndFeel(var lafObject)



setPosition

Sets the position of the component.

ScriptSliderPack.setPosition(int x, int y, int w, int h)



setPropertiesFromJSON

Restores all properties from a JSON object.

ScriptSliderPack.setPropertiesFromJSON( var jsonData)



setSliderAtIndex

sets the slider value at the given index.

ScriptSliderPack.setSliderAtIndex(int index, double value)



setStyleSheetClass

Sets the given class selectors for the component stylesheet.

ScriptSliderPack.setStyleSheetClass( String classIds)



setStyleSheetProperty

Sets a variable for this component that can be queried from a style sheet.

ScriptSliderPack.setStyleSheetProperty( String variableId,  var value,  String type)



setStyleSheetPseudoState

Programatically sets a pseudo state (:hover, :active, :checked, :focus, :disabled) that will be used by the CSS renderer.

ScriptSliderPack.setStyleSheetPseudoState( String pseudoState)



setTooltip

Shows a informative text on mouse hover.

ScriptSliderPack.setTooltip( String tooltip)



setUsePreallocatedLength

Sets a preallocated length that will retain values when the slider pack is resized below that limit.

ScriptSliderPack.setUsePreallocatedLength(int numMaxSliders)



setValueNormalized

Sets the current value from a range 0.0 ... 1.0.

ScriptSliderPack.setValueNormalized(double normalizedValue)



setValueWithUndo

Sets the current value and adds it to the undo list. Don't call this from onControl!

ScriptSliderPack.setValueWithUndo(var newValue)



setWidthArray

Sets a non-uniform width per slider using an array in the form [0.0, ... a[i], ... 1.0].

ScriptSliderPack.setWidthArray(var normalizedWidths)



setZLevel

Changes the depth hierarchy (z-axis) of sibling components (Back, Default, Front or AlwaysOnTop).

ScriptSliderPack.setZLevel(String zLevel)



showControl

Hides / Shows the control.

ScriptSliderPack.showControl(bool shouldBeVisible)



updateContentPropertyInternal

This updates the internal content data object from the script processor.

ScriptSliderPack.updateContentPropertyInternal(int propertyId,  var newValue)



updateValueFromProcessorConnection

Updates the value from the processor connection. Call this method whenever the module state has changed and you want to refresh the knob value to show the current state.

ScriptSliderPack.updateValueFromProcessorConnection()