<?xml version="1.0"?>
<!--
###################################################
##Parameter block: a grc variable with key, value
###################################################
 -->
<block>
	<name>Parameter</name>
	<key>parameter</key>
	<var_make>self.$(id) = $(id)</var_make>
	<make>$value</make>
	<param>
		<name>Label</name>
		<key>label</key>
		<value></value>
		<type>string</type>
		<hide>#if $label() then 'none' else 'part'#</hide>
	</param>
	<param>
		<name>Value</name>
		<key>value</key>
		<value>0</value>
		<type>$type.type</type>
	</param>
	<param>
		<name>Type</name>
		<key>type</key>
		<value></value>
		<type>enum</type>
		<hide>#if $type() then 'none' else 'part'#</hide>
		<option>
			<name>None</name>
			<key></key>
			<opt>type:raw</opt>
		</option>
		<option>
			<name>Complex</name>
			<key>complex</key>
			<opt>type:complex</opt>
		</option>
		<option>
			<name>Float</name>
			<key>eng_float</key>
			<opt>type:real</opt>
		</option>
		<option>
			<name>Int</name>
			<key>intx</key>
			<opt>type:int</opt>
		</option>
		<option>
			<name>Long</name>
			<key>long</key>
			<opt>type:int</opt>
		</option>
		<option>
			<name>String</name>
			<key>string</key>
			<opt>type:string</opt>
		</option>
		<!-- not supported yet in tmpl
		<option>
			<name>Boolean</name>
			<key>bool</key>
			<opt>type:bool</opt>
		</option>
		-->
	</param>
	<param>
		<name>Short ID</name>
		<key>short_id</key>
		<value></value>
		<type>string</type>
		<hide>#if not $type()
all#slurp
#elif $short_id()
none#slurp
#else
part#slurp
#end if</hide>
	</param>
	<param>
		<name>Show</name>
		<key>hide</key>
		<value></value>
		<type>enum</type>
		<hide>part</hide>
		<option>
			<name>Always</name>
			<key>none</key> <!--## Do not hide the parameter value-->
		</option>
		<option>
			<name>Only in Properties</name>
			<key>part</key> <!--## Partially hide the parameter value-->
		</option>
	</param>
	<check>len($short_id) in (0, 1)</check>
	<check>$short_id == '' or $(short_id).isalpha()</check>
	<doc>
This block represents a parameter to the flow graph. \
A parameter can be used to pass command line arguments into a top block. \
Or, parameters can pass arguments into an instantiated hierarchical block.

The parameter value cannot depend on any variables.

Leave the label blank to use the parameter id as the label.

When type is not None, this parameter also becomes a command line option of the form:

-[short_id] --[id] [value]

The Short ID field may be left blank.

To disable showing the parameter on the hierarchical block in GRC, use Only in Properties option in the Show field.
	</doc>
</block>
