This section is created in order to give the user the idea of XML Format Template. It aims at helping users in creating XML files for dhtmlxMenu initialization.
<?xml version="1.0"?> <menu> // a top xml tag, mandatory <item id="file" text="File"> // a top-level item, each item must have a unique ID <item id="new" text="New"/> // a sub-level item <item id="ms1" type="separator"/> // a sub-level separator item ... <item id="export" text="Export"> <item id="export_pdf" text="PDF"/> // a sub-level item ... </item> ... </item> </menu>
<?xml version="1.0"?> <menu> <item id="file" text="File"> <item id="new" text="New" img="new.gif" imgdis="new_dis.gif"/> // a sub-level item with images for enabled/disabled states <item id="ms1" type="separator"/> ... <item id="export" text="Export"> <item id="export_pdf" text="PDF" enabled="false"/> // a sub-level item disabled by default ... </item> ... </item> </menu>
<?xml version="1.0"?> <menu> <item id="file" text="File"> <item id="new" text="New" img="new.gif" imgdis="new_dis.gif"> <hotkey>Ctrl+N</hotkey> // a hotkey (just a text) to a menu item </item> <item id="ms1" type="separator"/> <item id="udf" text="UDF"> <userdata name="align">left</userdata> // userdata </item> ... <item id="export" text="Export"> <item id="export_pdf" text="PDF" enabled="false"/> ... </item> ... <item id="eol" text="End Of Line"> <item id="eol_u" text="Unix (\n)" type="radio" group="eol" checked="true"/> // a radiobutton, group "eol", checked by default <item id="eol_w" text="DOS/Windows (\r\n)" type="radio" group="eol"/> // a radiobutton, group "eol" <item id="eol_m" text="MacOS (\r)" type="radio" group="eol"/> // a radiobutton, group "eol" <item id="eol_m" text="MacOS (\r)" type="radio" group="eol"/> // a radiobutton, group "eol", disabled // we got a radiogroup "eol" with 4 buttons, 1 disabled </item> <item id="ms2" type="separator"/> <item id="ignorecase" text="Ignore Case" type="checkbox" checked="true" enabled="false"/> // a disabled checked checkbox <item id="checkspelling" text="Check Spelling" type="checkbox"/> // an unchecked checkbox </item> <item id="company" text="Company"> <href target="blank"><![CDATA[http://dhtmlx.com/docs/company.shtml]]></href> // link, page will opened in new window </item> </menu>