VSTGUI 4.10 Graphical User Interface Framework not only for VST plugins

Namespaces | Classes
VSTGUI::Standalone::Value Namespace Reference
Standalone Library

value create and helper functions More...

## Namespaces
namespace | Detail

## Classes
class | Listener
| Value listener More...
class | ListenerT
| Value listener More...

## Functions
Create values
ValuePtr | make (const UTF8String &id, IValue::Type initialValue=0., const ValueConverterPtr &valueConverter=nullptr)
| make a value in the normalized range [0..1] More...
ValuePtr | makeStepValue (const UTF8String &id, IStepValue::StepType numSteps, IValue::Type initialValue=0., const ValueConverterPtr &valueConverter=nullptr)
| make a step value More...
ValuePtr | makeStringListValue (const UTF8String &id, const std::initializer_list< IStringListValue::StringType > &strings, IValue::Type initialValue=0.)
| make a string list value More...
ValuePtr | makeStringListValue (const UTF8String &id, const IStringListValue::StringList &strings)
| make a string list value More...
ValuePtr | makeStaticStringValue (const UTF8String &id, const UTF8String &value)
| make a static string value More...
ValuePtr | makeStaticStringValue (const UTF8String &id, UTF8String &&value)
| make a static string value More...
ValuePtr | makeStringValue (const UTF8String &id, const UTF8String &initialString)
| make a string value More...
ValuePtr | makeStringValue (const UTF8String &id, UTF8String &&initialString)
| make a string value More...
Create value converters
ValueConverterPtr | makePercentConverter ()
| make a percent value converter More...
ValueConverterPtr | makeRangeConverter (IValue::Type minValue, IValue::Type maxValue, uint32_t stringPrecision=4)
| make a range value converter More...
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)
UTF8String | currentStringValue (IValue &value)
void | performSingleEdit (IValue &value, IValue::Type newValue)
void | performSinglePlainEdit (IValue &value, IValue::Type plainValue)
bool | performSingleStepEdit (IValue &value, IStepValue::StepType step)
bool | performStringValueEdit (IValue &value, const UTF8String &str)
bool | performStringAppendValueEdit (IValue &value, const UTF8String &str)

## Detailed Description

value create and helper functions

## Function Documentation

## ◆ currentPlainValue()

IValue::Type VSTGUI::Standalone::Value::currentPlainValue | ( | IValue & | value | ) |
| inline

## ◆ currentStepValue()

IStepValue::StepType VSTGUI::Standalone::Value::currentStepValue | ( | IValue & | value | ) |
| inline

## ◆ currentStringValue()

UTF8String VSTGUI::Standalone::Value::currentStringValue | ( | IValue & | value | ) |
| inline

## ◆ 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

  id | value ID
  initialValue | initial value
  valueConverter | value 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,
|  | uint32_t | stringPrecision = `4`
| ) |  |

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

  id | value ID
  value | static 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

  id | value ID
  value | static 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

  id | value ID
  numSteps | number of discrete steps, must be greater than zero
  initialValue | initial value in the normalized range [0..1]
  valueConverter | value converter

Returns
  shared value pointer

## ◆ makeStringListValue() [1/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

  id | value ID
  strings | string list

Returns
  shared value pointer

## ◆ makeStringListValue() [2/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

  id | value ID
  strings | string list
  initialValue | initial value in the normalized range [0..1]

Returns
  shared value pointer

## ◆ makeStringValue() [1/2]

ValuePtr VSTGUI::Standalone::Value::makeStringValue | ( | const UTF8String & | id,
|  | const UTF8String & | initialString
| ) |  |

make a string value

a string value has always the same numerical but different string representations

Parameters

  id | value ID
  value | initial string

Returns
  shared value pointer

## ◆ makeStringValue() [2/2]

ValuePtr VSTGUI::Standalone::Value::makeStringValue | ( | const UTF8String & | id,
|  | UTF8String && | initialString
| ) |  |

make a string value

a string value has always the same numerical but different string representations

Parameters

  id | value ID
  value | initial string

Returns
  shared value pointer

## ◆ normalizeToPlain()

IValue::Type VSTGUI::Standalone::Value::normalizeToPlain | ( | IValue & | value,
|  | IValue::Type | normalizeValue
| ) |  |
| inline

## ◆ normalizeToStep()

IStepValue::StepType VSTGUI::Standalone::Value::normalizeToStep | ( | IValue & | value,
|  | IValue::Type | normalizeValue
| ) |  |
| inline

## ◆ performSingleEdit()

void VSTGUI::Standalone::Value::performSingleEdit | ( | IValue & | value,
|  | IValue::Type | newValue
| ) |  |
| inline

## ◆ performSinglePlainEdit()

void VSTGUI::Standalone::Value::performSinglePlainEdit | ( | IValue & | value,
|  | IValue::Type | plainValue
| ) |  |
| inline

## ◆ performSingleStepEdit()

bool VSTGUI::Standalone::Value::performSingleStepEdit | ( | IValue & | value,
|  | IStepValue::StepType | step
| ) |  |
| inline

## ◆ performStringAppendValueEdit()

bool VSTGUI::Standalone::Value::performStringAppendValueEdit | ( | IValue & | value,
|  | const UTF8String & | str
| ) |  |
| inline

## ◆ performStringValueEdit()

bool VSTGUI::Standalone::Value::performStringValueEdit | ( | IValue & | value,
|  | const UTF8String & | str
| ) |  |
| inline

## ◆ plainToNormalize()

IValue::Type VSTGUI::Standalone::Value::plainToNormalize | ( | IValue & | value,
|  | IValue::Type | plainValue
| ) |  |
| inline

## ◆ stepToNormalize()

IValue::Type VSTGUI::Standalone::Value::stepToNormalize | ( | IValue & | value,
|  | IStepValue::StepType | stepValue
| ) |  |
| inline