ASPiK SDK
VSTGUI::Standalone::Value Namespace Reference

Classes

class  Listener
 
class  ListenerT
 

Functions

Create values
ValuePtr make (const UTF8String &id, IValue::Type initialValue=0., const ValueConverterPtr &valueConverter=nullptr)
 
ValuePtr makeStepValue (const UTF8String &id, IStepValue::StepType numSteps, IValue::Type initialValue=0., const ValueConverterPtr &valueConverter=nullptr)
 
ValuePtr makeStringListValue (const UTF8String &id, const std::initializer_list< IStringListValue::StringType > &strings, IValue::Type initialValue=0.)
 
ValuePtr makeStringListValue (const UTF8String &id, const IStringListValue::StringList &strings)
 
ValuePtr makeStaticStringValue (const UTF8String &id, const UTF8String &value)
 
ValuePtr makeStaticStringValue (const UTF8String &id, UTF8String &&value)
 
Create value converters
ValueConverterPtr makePercentConverter ()
 
ValueConverterPtr makeRangeConverter (IValue::Type minValue, IValue::Type maxValue)
 
Value helper functions
IValue::Type plainToNormalize (IValue &value, IValue::Type plainValue)
 
IValue::Type normalizeToPlain (IValue &value, IValue::Type normalizeValue)
 
IValue::Type stepToNormalize (IValue &value, IStepValue::StepType stepValue)
 
IStepValue::StepType normalizeToStep (IValue &value, IValue::Type normalizeValue)
 
IValue::Type currentPlainValue (IValue &value)
 
IStepValue::StepType currentStepValue (IValue &value)
 
void performSingleEdit (IValue &value, IValue::Type newValue)
 
void performSinglePlainEdit (IValue &value, IValue::Type plainValue)
 
bool performSingleStepEdit (IValue &value, IStepValue::StepType step)
 

Detailed Description

value create and helper functions

Function Documentation

◆ make()

ValuePtr VSTGUI::Standalone::Value::make ( const UTF8String id,
IValue::Type  initialValue = 0.,
const ValueConverterPtr &  valueConverter = nullptr 
)

make a value in the normalized range [0..1]

Parameters
idvalue ID
initialValueinitial value
valueConvertervalue converter
Returns
shared value pointer

◆ makePercentConverter()

ValueConverterPtr VSTGUI::Standalone::Value::makePercentConverter ( )

make a percent value converter

converts normalized values to the range [0..100]

◆ makeRangeConverter()

ValueConverterPtr VSTGUI::Standalone::Value::makeRangeConverter ( IValue::Type  minValue,
IValue::Type  maxValue 
)

make a range value converter

converts normalized values to the range [minValue..maxValue]

◆ makeStaticStringValue() [1/2]

ValuePtr VSTGUI::Standalone::Value::makeStaticStringValue ( const UTF8String id,
const UTF8String value 
)

make a static string value

a static string value is an inactive unchangeable value

Parameters
idvalue ID
valuestatic string
Returns
shared value pointer

◆ makeStaticStringValue() [2/2]

ValuePtr VSTGUI::Standalone::Value::makeStaticStringValue ( const UTF8String id,
UTF8String &&  value 
)

make a static string value

a static string value is an inactive unchangeable value

Parameters
idvalue ID
valuestatic string
Returns
shared value pointer

◆ makeStepValue()

ValuePtr VSTGUI::Standalone::Value::makeStepValue ( const UTF8String id,
IStepValue::StepType  numSteps,
IValue::Type  initialValue = 0.,
const ValueConverterPtr &  valueConverter = nullptr 
)

make a step value

Parameters
idvalue ID
numStepsnumber of discrete steps
initialValueinitial value in the normalized range [0..1]
valueConvertervalue converter
Returns
shared value pointer

◆ makeStringListValue() [1/2]

ValuePtr VSTGUI::Standalone::Value::makeStringListValue ( const UTF8String id,
const std::initializer_list< IStringListValue::StringType > &  strings,
IValue::Type  initialValue = 0. 
)

make a string list value

a string list value is a step value where each step has a string representation.

to modify the string list you can cast the returned value object to IStringListValue and use the updateStringList method.

Parameters
idvalue ID
stringsstring list
initialValueinitial value in the normalized range [0..1]
Returns
shared value pointer

◆ makeStringListValue() [2/2]

ValuePtr VSTGUI::Standalone::Value::makeStringListValue ( const UTF8String id,
const IStringListValue::StringList &  strings 
)

make a string list value

the returned value object has the IStringListValue interface

Parameters
idvalue ID
stringsstring list
Returns
shared value pointer