	<!DOCTYPE rkplugin>
	<document>
		<code file="barplot.php" />
		<help file="barplot.rkh" />
		<logic>
			<set id="barplot_embed.xvar" to="x"/>
			
			<convert id="custom_names" mode="equals" sources="names_mode.string" standard="custom"/>
			<convert id="rexp_names" mode="equals" sources="names_mode.string" standard="rexp"/>
			<connect client="names_custom.visible" governor="rexp_names.not"/>
			<connect client="names_custom.enabled" governor="custom_names"/>
			<connect client="names_exp.visible" governor="rexp_names"/>
			<connect client="names_exp.required" governor="rexp_names"/>
		</logic>
		<dialog label="Barplot" >		
			<tabbook>
				<tab label="Variables" id="tab_variables">
					<row>
						<varselector id="vars"/>
						<column>
						<varslot min_vars="1" id="x" source="vars" required="true" label="Matrix, Vector or Factor"/>
						<checkbox id="tabulate" label="Tabulate" value="1" value_unchecked="0" checked="false" />
						<stretch/>
						<frame label="Labels">
						<radio id="names_mode" label="Labeling" >
							<option value="default" label="Default labels" checked="true"/>
							<option value="custom" label="Custom labels"/>
							<option value="rexp" label="From R expression"/>
						</radio>
						<input id="names_exp" label="Expression to use for labels" initial="names (x)"/>
						<input id="names_custom" label="Labels (separated by ';')" initial="First label;Second label"/>
					</frame>
						<preview id="preview"/>
						</column>
					</row>
				</tab>
				<tab label="Options" id="tab_options">
					
					<embed id="barplot_embed" component="rkward::barplot_embed"/>
				</tab>
			</tabbook>
		</dialog>
	
	</document>
