lsp-plugins
lsp-plugins copied to clipboard
Add support of combo box items defined in the XML markup of the UI
Something like this (inspired by HTML):
<select id="value">
<option text="Text" value="1" (active=":value igt 5") />
</select>
The current element is checking top-down
If the value
attribute equals to the value or the active
attribute is true
, the item is marked as active (current)
If not, the search continues
Some examples
Fixed list:
<combo id="param">
<option text="Low" value="0" />
<option text="Medium" value="1" />
<option text="High" value="2" visibility=":advanced_mode" />
</combo>
Sampling list:
<combo id="param">
<option text="Low" value="0.5" selected=":value le 1" />
<option text="Medium" value="1" selected=":value le 2" /> <!-- else-if -->
<option text="High" value="2" selected="true" /> <!-- else -->
</combo>
Example code snippet:
<combo id="react">
<option text="Fast" value="0.005" selected=":react le 0.01" />
<option text="Rapid" value="0.05" selected="(:react gt 0.01) and (:react le 0.1)" />
<option text="Normal" value="0.2" selected="(:react gt 0.1) and (:react le 0.3)" />
<option text="Slow" value="0.4" selected="(:react gt 0.3) and (:react le 0.6)" />
<option text="Slowest" value="0.8" selected=":react gt 0.6" />
</combo>
Available in 1.2.16!