﻿<DWAC>

	<fragments>
		<fragment id = "Frag1">
			<p>Fragment 1</p>
		</fragment>

	</fragments>
	<tasks>
		<!--
			The .apply is used because the task implementation currently evaluates the function as a string
		-->
		<task id="dwac_driver" action-type="default" action="[nothing]" handler-type="function" handler="${this}.handle_dwac_task.apply(${this})" />
	</tasks>

	 <Templates>
		 <Template Title ="Engine Framework Profiler" id = "EngineProfiler">
					
					<import-xml src = "Templates/TemplateTools.xml" id = "TemplateTools" />
					<import-xml src = "Templates/TabTools.xml" id = "TabTools" />
					<div rid = "stats">
						<div class = "title">Engine Stats</div>
						
						<import-xml src = "Templates/EngineStats.xml" id = "EngineStats" />
						
					</div>
					<div rid = "jsprof">
						<!--
						<div class = "title">Script Profiler</div>
						-->
						<import-xml src = "Templates/ScriptProfiler.xml" id = "ScriptProfiler" />
						
					</div>
					<div rid = "source">
						<div class="title">Active Source</div>
						
						<import-xml src = "Templates/ActiveSource.xml" id = "ActiveSource" />
						
					</div>
					<div rid = "xmlxsl">
						<div class = "title">XML / XSL</div>
						<import-xml src = "Templates/XslTransformer.xml" id = "XslTransformer" />
					</div>

 				<embedded-script>
						<![CDATA[
						template_init : function(){
							//this.InitTabs("designer","source","preview");
							this.AddTab("stats","Engine Stats");
							this.AddTab("jsprof","Script Profiler",this._prehandle_show_jsprofiler);
							this.AddTab("source","Active Source");
							this.AddTab("xmlxsl","XML/XSL");
							this.ShowTab(0);
						},
						ChangeTemplate : function(){
							/// this.loadTemplate(this.GetDwacTemplatePath(),"DWACTest2");
						}
					 ]]>
					</embedded-script>
			</Template>
		 <Template id = "DWACTest2">
	 			<embedded-script>
						<![CDATA[
						template_init : function(){
							
						},
						ChangeTemplate : function(){
							/// this.loadTemplate(this.GetDwacTemplatePath(),"DWACTest1");
						}
					 ]]>
					</embedded-script>
			</Template>

		 </Templates>
	<application-components>
			<application-component id = "DwacClickComponent1">
			<![CDATA[
				component_init : function(){

				},
				_handle_click : function(){
					alert('click 1');
				}
			]]>
			</application-component>

	</application-components>

</DWAC>
