HikoGUI
A low latency retained GUI
|
Opens the preferences file of the application. The location of the preferences file is operating system depended. On windows this file is located in: \USERPROFILE%\AppData\Local\<vendor>\<application name>\preferences.json
Observer values are linked to values in the preferences located using a json-path. In the example below the json-path is "bar.foo" which results in the preferences file as {"bar": {"foo": 1}}
:
The example above will work with observers with types that can be natively stored in a json file: integers, floating point, booleans, strings, vectors and maps.
For more complex types, you will need to add a template specialization for hi::pickle
. This specialization adds an encoder and decoder between the complex type and a hi::datum
. The hi::preferences
knows how to read and write a json file using hi::datum
values.
The example below shows how to specialize hi::pickle
for the complex foo_type
type: