<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type="text/xsl" href="../xsl/grammar-xhtml.xsl"?>
<!DOCTYPE grammar SYSTEM "../dtd/grammar.dtd">

<grammar xmlns="http://cking.be/wx/xrv/ns" version="0.5.3" xml:lang="en">
	<meta>
		<xrc min="2.3.0.1" max="2.5.3.0"/>
		<src dir="file:///c:/dev/shared/wx/src/xrc/"/> <!-- edit this to match your own setup (enables hyperlinks to cpp files; only works from local XML) -->
		<doc dir="http://wiki.wxwidgets.org/docbrowse.cgi/"/>
		<author name="Anton Triest" e-mail="anton@cking.be"/>
		<history>
			<creation date="2005-09-21"/>
			<revision date="2005-10-08" version="0.5.0"/>
			<revision date="2006-06-04" version="0.5.1">
				<fix>allow nested wxMenu</fix>
				<upd>added wxTreebook</upd>
			</revision>
			<revision date="2006-10-06" version="0.5.2">
				<fix>added flag, border, option and minsize props to "button"</fix>
			</revision>
		</history>
	</meta>
	<types>
		<title>data types</title>
		<type id="tBitmap">
			<dscr>first tries to fetch a bitmap via wxArtProvider, using the 2 attributes; if that fails, loads the bitmap file pointed to by the URL in the element's text contents</dscr>
			<attribute name="stock_id" type="tID"/>
			<attribute name="stock_client" type="tID"/>
			<string type="tURL"/>
		</type>
		<type id="tBoolean">
			<dscr>either 0 or 1</dscr>
			<choice>0</choice>
			<choice>1</choice>
		</type>
		<type id="tChoice">
			<dscr>the value must be one out of a fixed list</dscr>
		</type>
		<type id="tColor">
			<dscr>#RRGGBB format or symbolic color name</dscr>
		</type>
		<type id="tCSV">
			<dscr>comma separated values</dscr>
		</type>
		<type id="tDimension">
			<dscr>a distance, can be like tInteger with optional 'd' suffix (dialog units instead of pixels)</dscr>
		</type>
		<type id="tFloat">
			<dscr>floating point value, can only contain digits, one dot and optional '-' prefix</dscr>
		</type>
		<type id="tFont">
			<dscr>property elements, defining a font</dscr>
			<prop name="size" type="tUInteger"/>
			<prop name="style" type="tChoice" default="normal">
				<choice>normal</choice>
				<choice>italic</choice>
				<choice>slant</choice>
			</prop>
			<prop name="weight" type="tChoice" default="normal">
				<choice>normal</choice>
				<choice>bold</choice>
				<choice>light</choice>
			</prop>
			<prop name="family" type="tChoice" default="roman">
				<choice>roman</choice>
				<choice>script</choice>
				<choice>decorative</choice>
				<choice>swiss</choice>
				<choice>modern</choice>
				<choice>teletype</choice>
			</prop>
			<prop name="underlined" type="tBoolean" default="0"/>
			<prop name="face" type="tCSV"/>
			<prop name="encoding" type="tString"/>
			<prop name="sysfont" type="tString"/>
			<prop name="relativesize" type="tFloat"/> <!-- only if sysfont is used and size is not used -->
		</type>
		<type id="tHTML">
			<dscr>contains the HTML code as a string, with escaped angle brackets (&amp;lt; &amp;gt;)</dscr>
		</type>
		<type id="tID">
			<dscr>eg. wxART_FILE_OPEN, wxART_MENU</dscr>
		</type>
		<type id="tInteger">
			<dscr>can only contain digits and an optional '-' prefix. Or, of course, a constant like wxSL_DEFAULT_MIN</dscr>
		</type>
		<type id="tList">
			<dscr>one or more &lt;item&gt; elements (each with an optional 'checked' attribute)</dscr>
			<items name="item" type="tString" min="1">
				<attribute name="checked" type="tBoolean" default="1"/>
			</items>
		</type>
		<type id="tSize">
			<dscr>two integers, separated by a comma; optional 'd' suffix (dialog units instead of pixels)</dscr>
		</type>
		<type id="tString">
			<dscr>any string</dscr>
		</type>
		<type id="tStyle">
			<dscr>combination of wx style flags, separated with '|'</dscr>
		</type>
		<type id="tUInteger">
			<dscr>unsigned integer, can only contain digits</dscr>
		</type>
		<type id="tURL">
			<dscr>pointer to a file</dscr>
		</type>
	</types>
	<common>
		<title>common properties</title>
		<prop name="pos" type="tSize" default="-1,-1"/>
		<prop name="size" type="tSize" default="-1,-1"/>
		<prop name="style" type="tStyle"/>
		<prop name="exstyle" type="tStyle"/>
		<prop name="bg" type="tColor"/>
		<prop name="fg" type="tColor"/>
		<prop name="enabled" type="tBoolean" default="1"/>
		<prop name="focused" type="tBoolean" default="0"/>
		<prop name="hidden" type="tBoolean" default="0"/>
		<prop name="tooltip" type="tString"/>
		<prop name="font" type="tFont"/>
	</common>
	<controls>
		<title>control classes</title>
		<class name="wxBitmap" type="tBitmap" src="xh_bmp.cpp">
		</class>
		<class name="wxIcon" type="tBitmap" src="xh_bmp.cpp">
		</class>
		<class name="wxBitmapButton" src="xh_bmpbt.cpp">
			<commonprops/>
			<prop name="default" type="tBoolean" default="0"/>
			<prop name="bitmap" type="tBitmap"/>
			<prop name="selected" type="tBitmap"/>
			<prop name="focus" type="tBitmap"/>
			<prop name="disabled" type="tBitmap"/>
		</class>
		<class name="wxButton" src="xh_bttn.cpp">
			<commonprops/>
			<prop name="label" type="tString"/>
			<prop name="default" type="tBoolean" default="0"/>
		</class>
		<class name="wxCalendarCtrl" src="xh_cald.cpp">
			<commonprops/>
		</class>
		<class name="wxCheckBox" src="xh_chckb.cpp">
			<commonprops/>
			<prop name="label" type="tString"/>
			<prop name="checked" type="tBoolean" default="0"/>
		</class>
		<class name="wxCheckList" src="xh_chckl.cpp">
			<deprecated use="wxCheckListBox"/>
			<commonprops/>
			<prop name="content" type="tList"/>
		</class>
		<class name="wxCheckListBox" src="xh_chckl.cpp">
			<commonprops/>
			<prop name="content" type="tList"/>
		</class>
		<class name="wxChoice" src="xh_choic.cpp">
			<commonprops/>
			<prop name="selection" type="tInteger" default="-1"/>
			<prop name="content" type="tList"/>
		</class>
		<class name="wxComboBox" src="xh_combo.cpp">
			<commonprops/>
			<prop name="selection" type="tInteger" default="-1"/>
			<prop name="content" type="tList"/>
			<prop name="value" type="tString"/>
		</class>
		<class name="wxDatePickerCtrl" src="xh_datectrl.cpp">
			<commonprops defaultstyle="wxDP_DEFAULT | wxDP_SHOWCENTURY"/>
		</class>
		<class name="wxGauge" src="xh_gauge.cpp">
			<commonprops/>
			<prop name="range" type="tInteger" default="wxGAUGE_DEFAULT_RANGE"/>
			<prop name="value" type="tInteger"/>
			<prop name="shadow" type="tDimension"/>
			<prop name="bezel" type="tDimension"/>
		</class>
		<class name="wxGenericDirCtrl" src="xh_gdctl.cpp">
			<commonprops/>
			<prop name="defaultfolder" type="tString"/>
			<prop name="filter" type="tString"/>
			<prop name="defaultfilter" type="tInteger"/>
		</class>
		<class name="wxListBox" src="xh_listb.cpp">
			<commonprops/>
			<prop name="selection" type="tInteger"/>
			<prop name="content" type="tList"/>
		</class>
		<class name="wxListCtrl" src="xh_listc.cpp">
			<commonprops/>
		</class>
		<class name="wxRadioButton" src="xh_radbt.cpp">
			<commonprops/>
			<prop name="label" type="tString"/>
			<prop name="value" type="tBoolean" default="0"/>
		</class>
		<class name="wxRadioBox" src="xh_radbx.cpp">
			<commonprops/>
			<prop name="label" type="tString"/>
			<prop name="dimension" type="tInteger" default="1"/>
			<prop name="selection" type="tInteger"/>
			<prop name="content" type="tList"/>
		</class>
		<class name="wxScrollBar" src="xh_scrol.cpp">
			<commonprops/>
			<prop name="value" type="tInteger" default="0"/>
			<prop name="thumbsize" type="tInteger" default="1"/>
			<prop name="range" type="tInteger" default="10"/>
			<prop name="pagesize" type="tInteger" default="1"/>
		</class>
		<class name="wxSlider" src="xh_slidr.cpp">
			<commonprops/>
			<prop name="value" type="tInteger" default="wxSL_DEFAULT_VALUE"/>
			<prop name="min" type="tInteger" default="wxSL_DEFAULT_MIN"/>
			<prop name="max" type="tInteger" default="wxSL_DEFAULT_MAX"/>
			<prop name="tickfreq" type="tInteger" default="0"/>
			<prop name="pagesize" type="tInteger"/>
			<prop name="linesize" type="tInteger"/>
			<prop name="thumb" type="tInteger"/>
			<prop name="tick" type="tInteger"/>
			<prop name="selmin" type="tInteger"/>
			<prop name="selmax" type="tInteger"/>
		</class>
		<class name="wxSpinButton" src="xh_spin.cpp">
			<commonprops defaultstyle="wxSP_VERTICAL | wxSP_ARROW_KEYS"/>
			<prop name="value" type="tInteger" default="wxSP_DEFAULT_VALUE"/>
			<prop name="min" type="tInteger" default="wxSP_DEFAULT_MIN"/>
			<prop name="max" type="tInteger" default="wxSP_DEFAULT_MAX"/>
		</class>
		<class name="wxSpinCtrl" src="xh_spin.cpp">
			<commonprops defaultstyle="wxSP_ARROW_KEYS"/>
			<prop name="value" type="tInteger" default="wxSP_DEFAULT_VALUE"/>
			<prop name="min" type="tInteger" default="wxSP_DEFAULT_MIN"/>
			<prop name="max" type="tInteger" default="wxSP_DEFAULT_MAX"/>
		</class>
		<class name="wxStaticBitmap" src="xh_stbmp.cpp">
			<commonprops/>
			<prop name="bitmap" type="tBitmap"/>
		</class>
		<class name="wxStaticBox" src="xh_stbox.cpp">
			<commonprops/>
			<prop name="label" type="tString"/>
		</class>
		<class name="wxStaticLine" src="xh_stlin.cpp">
			<commonprops defaultstyle="wxLI_HORIZONTAL"/>
		</class>
		<class name="wxStaticText" src="xh_sttxt.cpp">
			<commonprops/>
			<prop name="label" type="tString"/>
		</class>
		<class name="wxTextCtrl" src="xh_text.cpp">
			<commonprops/>
			<prop name="value" type="tString"/>
		</class>
		<class name="wxToggleButton" src="xh_tglbtn.cpp">
			<commonprops/>
			<prop name="label" type="tString"/>
			<prop name="checked" type="tBoolean"/>
		</class>
		<class name="wxTreeCtrl" src="xh_tree.cpp">
			<commonprops defaultstyle="wxTR_DEFAULT_STYLE"/>
		</class>
	</controls>
	<windows>
		<title>window classes</title>
		<class name="wxDialog" src="xh_dlg.cpp">
			<commonprops defaultstyle="wxDEFAULT_DIALOG_STYLE"/>
			<prop name="title" type="tString"/>
			<prop name="icon" type="tBitmap"/>
			<prop name="centered" type="tBoolean" default="0"/>
			<child-controls/>
			<child-sizers/>
		</class>
		<class name="wxFrame" src="xh_frame.cpp">
			<commonprops defaultstyle="wxDEFAULT_FRAME_STYLE"/>
			<prop name="title" type="tString"/>
			<prop name="icon" type="tBitmap"/>
			<prop name="centered" type="tBoolean" default="0"/>
			<child-bars/>
			<child-controls/>
			<child-sizers/>
		</class>
		<class name="wxMDIParentFrame" src="xh_mdi.cpp">
			<commonprops defaultstyle="wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL"/>
			<prop name="title" type="tString"/>
			<prop name="icon" type="tBitmap"/>
			<prop name="centered" type="tBoolean" default="0"/>
			<class name="wxMDIChildFrame" src="xh_mdi.cpp">
				<prop name="pos" type="tSize" default="-1,-1"/>
				<prop name="size" type="tSize" default="-1,-1"/>
				<prop name="style" type="tStyle" default="wxDEFAULT_FRAME_STYLE"/>
				<prop name="font" type="tFont"/>
				<prop name="title" type="tString"/>
				<prop name="icon" type="tBitmap"/>
				<prop name="centered" type="tBoolean" default="0"/>
				<child-bars/> <!-- TODO check if wxMDIChildFrame can have bars -->
				<child-controls/>
				<child-sizers/>
			</class>
			<child-bars/>
			<child-controls/>
			<child-sizers/> <!-- TODO check if wxMDIParentFrame can have sizers -->
		</class>
		<class name="wxPanel" src="xh_panel.cpp">
			<commonprops defaultstyle="wxTAB_TRAVERSAL"/>
			<child-controls/>
			<child-sizers/>
		</class>
		<class name="wxScrolledWindow" src="xh_scwin.cpp">
			<commonprops defaultstyle="wxHSCROLL | wxVSCROLL"/>
			<child-controls/>
		</class>
		<class name="wxSplitterWindow" src="xh_split.cpp">
			<commonprops defaultstyle="wxSP_3D"/>
			<prop name="sashpos" type="tInteger" default="0"/>
			<prop name="minsize" type="tInteger" default="-1"/>
			<prop name="orientation" type="tChoice" default="horizontal">
				<choice>horizontal</choice>
				<choice>vertical</choice>
			</prop>
			<child-windows min="1" max="2"/>
		</class>
		<class name="wxHtmlWindow" src="xh_html.cpp">
			<commonprops defaultstyle="wxHW_SCROLLBAR_AUTO"/>
			<prop name="borders" type="tDimension"/>
			<prop name="url" type="tURL"/>
			<prop name="htmlcode" type="tHTML"/>
		</class>
		<class name="wxChoicebook" src="xh_choicbk.cpp">
			<commonprops/>
			<class name="choicebookpage">
				<prop name="label" type="tString"/>
				<prop name="selected" type="tBoolean" default="0"/>
				<prop name="bitmap" type="tBitmap"/>
				<child-windows/>
				<child-controls/>
			</class>
		</class>
		<class name="wxListbook" src="xh_listbk.cpp">
			<commonprops/>
			<class name="listbookpage">
				<prop name="label" type="tString"/>
				<prop name="selected" type="tBoolean" default="0"/>
				<prop name="bitmap" type="tBitmap"/>
				<child-windows/>
				<child-controls/>
			</class>
		</class>
		<class name="wxNotebook" src="xh_notbk.cpp">
			<commonprops/>
			<class name="notebookpage">
				<prop name="label" type="tString"/>
				<prop name="selected" type="tBoolean" default="0"/>
				<prop name="bitmap" type="tBitmap"/>
				<child-windows/>
				<child-controls/>
			</class>
		</class>
		<class name="wxTreebook" src="xh_treebk.cpp"> <!-- xrv 0.5.1  wx 2.7.0 -->
			<commonprops/>
			<class name="treebookpage">
				<prop name="label" type="tString"/>
				<prop name="selected" type="tBoolean" default="0"/>
				<prop name="bitmap" type="tBitmap"/>
				<prop name="depth" type="tInteger" default="0"/>
				<child-windows/>
				<child-controls/>
			</class>
		</class>
		<class name="wxWizard" src="xh_wizrd.cpp">
			<commonprops/>
			<prop name="title" type="tString"/>
			<class name="wxWizardPage">
				<dscr>abstract class, must be subclassed</dscr>
				<commonprops/>
				<child-windows/>
				<child-controls/>
			</class>
			<class name="wxWizardPageSimple">
				<commonprops/>
				<child-windows/>
				<child-controls/>
			</class>
		</class>
	</windows>
	<sizers>
		<title>sizer classes</title>
		<class name="wxBoxSizer" src="xh_sizer.cpp">
			<prop name="orient" type="tChoice" default="wxHORIZONTAL">
				<choice>wxHORIZONTAL</choice>
				<choice>wxVERTICAL</choice>
			</prop>
			<class name="sizeritem">
				<prop name="option" type="tInteger"/>
				<prop name="flag" type="tStyle"/>
				<prop name="border" type="tDimension"/>
				<prop name="minsize" type="tSize"/>
				<prop name="ratio" type="tSize"/>
				<prop name="cellpos" type="tInteger"/>
				<prop name="cellspan" type="tInteger"/>
				<child-bars/>
				<child-controls/>
				<child-sizers/>
				<child-windows/>
			</class>
			<class name="spacer"/>
		</class>
		<class name="wxStaticBoxSizer" src="xh_sizer.cpp">
			<prop name="orient" type="tChoice" default="wxHORIZONTAL">
				<choice>wxHORIZONTAL</choice>
				<choice>wxVERTICAL</choice>
			</prop>
			<prop name="label" type="tString"/>
			<class name="sizeritem"/>
			<class name="spacer"/>
		</class>
		<class name="wxGridSizer" src="xh_sizer.cpp">
			<prop name="rows" type="tInteger"/>
			<prop name="cols" type="tInteger"/>
			<prop name="vgap" type="tDimension"/>
			<prop name="hgap" type="tDimension"/>
			<class name="sizeritem"/>
			<class name="spacer"/>
		</class>
		<class name="wxFlexGridSizer" src="xh_sizer.cpp">
			<prop name="orient" type="tChoice" default="wxBOTH">
				<choice>wxHORIZONTAL</choice>
				<choice>wxVERTICAL</choice>
				<choice>wxBOTH</choice>
			</prop>
			<prop name="rows" type="tInteger"/>
			<prop name="cols" type="tInteger"/>
			<prop name="vgap" type="tDimension"/>
			<prop name="hgap" type="tDimension"/>
			<prop name="growablerows" type="tCSV"/>
			<prop name="growablecols" type="tCSV"/>
			<class name="sizeritem"/>
			<class name="spacer"/>
		</class>
		<class name="wxGridBagSizer" src="xh_sizer.cpp">
			<prop name="orient" type="tChoice" default="wxBOTH">
				<choice>wxHORIZONTAL</choice>
				<choice>wxVERTICAL</choice>
				<choice>wxBOTH</choice>
			</prop>
			<prop name="vgap" type="tDimension"/>
			<prop name="hgap" type="tDimension"/>
			<prop name="growablerows" type="tCSV"/>
			<prop name="growablecols" type="tCSV"/>
			<class name="sizeritem"/>
			<class name="spacer"/>
		</class>
		<class name="wxStdDialogButtonSizer" src="xh_sizer.cpp">
			<prop name="orient" type="tChoice" default="wxHORIZONTAL">
				<choice>wxHORIZONTAL</choice>
				<choice>wxVERTICAL</choice>
			</prop>
			<class name="button">
				<prop name="option" type="tInteger"/>
				<prop name="flag" type="tStyle"/>
				<prop name="border" type="tDimension"/>
				<prop name="minsize" type="tSize"/>
				<class name="wxButton"/>
			</class>
		</class>
	</sizers>
	<bars>
		<title>bar classes</title>
		<class name="wxMenuBar" src="xh_menu.cpp">
			<commonprops/>
			<class name="wxMenu">
				<commonprops/>
				<prop name="label" type="tString"/>
				<prop name="help" type="tString"/>
				<class name="wxMenuItem">
					<commonprops/>
					<prop name="label" type="tString"/>
					<prop name="help" type="tString"/>
					<prop name="accel" type="tString"/>
					<prop name="enabled" type="tBoolean" default="1"/>
					<prop name="checkable" type="tBoolean"/>
					<prop name="checked" type="tBoolean"/>
					<prop name="bitmap" type="tBitmap"/>
				</class>
				<class name="wxMenu"/> <!-- xrv 0.5.1 -->
				<class name="break"/>
				<class name="separator"/>
			</class>
		</class>
		<class name="wxToolBar" src="xh_toolb.cpp">
			<commonprops defaultstyle="wxNO_BORDER | wxTB_HORIZONTAL"/>
			<prop name="bitmapsize" type="tSize" default="-1,-1"/>
			<prop name="margins" type="tSize" default="-1,-1"/>
			<prop name="packing" type="tInteger" default="-1"/>
			<prop name="separation" type="tInteger" default="-1"/>
			<prop name="dontattachtoframe" type="tBoolean"/>
			<class name="tool">
				<prop name="bitmap" type="tBitmap"/>
				<prop name="bitmap2" type="tBitmap" default="wxNullBitmap"/>
				<prop name="toggle" type="tBoolean" default="0"/>
				<prop name="radio" type="tBoolean" default="0"/> <!-- at most one of "toggle" and "radio" attributes may be 1 -->
				<prop name="label" type="tString"/>
				<prop name="tooltip" type="tString"/>
				<prop name="longhelp" type="tString"/>
				<prop name="pos" type="tSize" default="-1,-1"/> <!-- illegal if parent wxToolBar's style contains wxTB_TEXT or if 'label' or 'radio' is present -->
			</class>
			<class name="separator"/>
			<child-controls/>
		</class>
		<class name="wxStatusBar" src="xh_statbar.cpp">
			<prop name="style" type="tStyle"/>
			<prop name="fields" type="tInteger"/>
			<prop name="widths" type="tCSV"/>
			<prop name="styles" type="tCSV">
				<choice>wxSB_NORMAL</choice>
				<choice>wxSB_FLAT</choice>
				<choice>wxSB_RAISED</choice>
			</prop>
		</class>
	</bars>
</grammar>

