Difference between revisions of "SpecCommandLineDrawing/DraftCmdList"

From Inkscape Wiki
Jump to navigation Jump to search
(New page: This is a proposed format for an XML-based list of available commands and parameters. <tt><pre> <!-- Command directory --> <command_directory> <!-- List of types for the parameters -->...)
 
 
Line 1: Line 1:
 +
*Return to [[SpecCommandLineDrawing]]
 +
 
This is a proposed format for an XML-based list of available commands and parameters.
 
This is a proposed format for an XML-based list of available commands and parameters.
  
Line 52: Line 54:
 
</command_directory>
 
</command_directory>
 
</pre></tt>
 
</pre></tt>
 +
 +
*Return to [[SpecCommandLineDrawing]]

Latest revision as of 04:05, 11 October 2008

This is a proposed format for an XML-based list of available commands and parameters.


<!-- Command directory -->
<command_directory>

	<!-- List of types for the parameters -->
	<type-list>
		<type>
			<name>number</name>
			<desc>A single number</desc>
		</type>
		<type>
			<name>point</name>
			<desc>A pair of numbers specifying a point</desc>
		</type>
	</type-list>
	
	<!-- List of commands available on the command line -->
	<command-list>
		<cmd name="circle" desc="Draws a circle.">
			<parameter>
				<name>r</name>
				<desc>Radius of the circle.</desc>
				<type>number</type>
				<default>200</default>
			</parameter>
			<parameter>
				<name>c</name>
				<desc>Centre of the circle.</desc>
				<type>point</type>
				<default>0,0</default>
			</parameter>
		</cmd>
		<cmd name="rect" desc="Draws a rectangle.">
			<parameter>
				<name>w</name>
				<desc>Width of the rectangle.</desc>
				<type>number</type>
				<default>100</default>
			</parameter>
			<parameter>
				<name>h</name>
				<desc>Height of the rectangle.</desc>
				<type>point</type>
				<default>100</default>
			</parameter>
		</cmd>
	</command-list>
	
</command_directory>