<?xml version="1.0" encoding="utf-8"?>
<Application>
	<AppTitle>Untitled Application</AppTitle>
	<AppShortName>MyApp</AppShortName>
	<Author>Author name</Author>
	<Version>1.0</Version>
	<DesignDeviceName>Desktop</DesignDeviceName>
	<VariablesScanned>False</VariablesScanned>
	<PageWidth>1280</PageWidth>
	<PageHeight>800</PageHeight>
	<AutoSizeWidth>False</AutoSizeWidth>
	<AutoSizeHeight>False</AutoSizeHeight>
	<HideScrollbars>False</HideScrollbars>
	<ResponsiveSize>False</ResponsiveSize>
	<PublishPlatform>WebApp</PublishPlatform>
	<EmptyBuildFolder>False</EmptyBuildFolder>
	<AppIcon>C:\Users\cgiebel\Documents\VisualNeoWeb\Libraries\img\default-icon.png</AppIcon>
	<LanguageCode>en</LanguageCode>
	<DisplayMode>standalone</DisplayMode>
	<ServiceWorker>OfflineCopyOfPages</ServiceWorker>
	<ThemeColor>#000000</ThemeColor>
	<MobileOSTypes>[AndroidOS,iOS,WindowsPhoneOS]</MobileOSTypes>
	<WindowState>normal</WindowState>
	<TitleBar>True</TitleBar>
	<Sizeable>True</Sizeable>
	<MaximizeBtn>False</MaximizeBtn>
	<MinimizeBtn>True</MinimizeBtn>
	<SystemMenu>True</SystemMenu>
	<ContextMenu>False</ContextMenu>
	<AlwaysOnTop>False</AlwaysOnTop>
	<ShowInTaskbar>True</ShowInTaskbar>
	<SingleInstance>False</SingleInstance>
	<ChromeKioskMode>False</ChromeKioskMode>
	<Components>
		<FunctionList name="Subroutines">
			<Components>
				<Function name="DuplicateObjectEx">
					<Code>//Deletes the new object if already exists.
     if($App.NAB[objName]){
      $App.NAB[objName].remove();
      delete $App.NAB[objName];
     }else{
      $(&quot;#&quot;+objName).remove();
      delete $App.NAB[objName];
     }

     if($App.NAB[objId]){
      $App.NAB[objName] = $App.NAB[objId].clone().appendTo(&quot;#&quot;+containerId);
     }else if($App[objId]){
      //Drawing
      $App.NAB[objName] = $(&quot;#&quot;+objId).clone().appendTo(&quot;#&quot;+containerId);
      $App.NAB[objName].attr(&quot;id&quot;, &quot;&quot;);
     }else{
      $App.NAB[objName] = $(&quot;#&quot;+objId).clone().appendTo(&quot;#&quot;+containerId);
     }
     $App.NAB[objName].attr(&quot;VisualNEOWebName&quot;, objName);
     $App.NAB[objName].attr(&quot;ng-style&quot;,&quot;NAB.&quot;+objName+&quot;_style&quot;);
     $App.NAB[objName].attr(&quot;ng-hide&quot;,&quot;NAB.&quot;+objName+&quot;_hidden&quot;);
     $App.NAB[objName].attr(&quot;ng-disabled&quot;,&quot;NAB.&quot;+objName+&quot;_disabled&quot;);
     $(&quot;#&quot;+objId).html(objHTML);

     //$App.NAB[objName].attr(&quot;id&quot;,objName);

     var e = document.getElementById(containerId);
     $compile(e)($scope);</Code>
					<Params>objId|OBJID|The name of an existing object to be duplicated.;objName|STRING|The new object name.;containerId|OBJID|The name of the Container (or Page) where the new object will be placed.;objHTML|STRING|Add InnerHTML to the duplicated object</Params>
					<ScriptLanguage>JavaScript</ScriptLanguage>
				</Function>
			</Components>
		</FunctionList>
		<LibraryList name="Libraries"/>
		<PageList name="Main">
			<Components>
				<Page id="NewPage">
					<pageenter>neoDragInit &quot;StaticContainer&quot;
CreateArray [myArray] &quot;&quot;

. Start value for dynamic containers
setVar [n] 0</pageenter>
					<Components>
						<Container id="Container1">
							<left>11px</left>
							<top>3px</top>
							<width>1080px</width>
							<height>781px</height>
							<style>border-width:1px;border-style:solid;background-color:#fff;</style>
						</Container>
						<Container id="Container2">
							<left>1105px</left>
							<top>17px</top>
							<width>157px</width>
							<height>124px</height>
							<style>border-width:1px;border-style:solid;background-color:#fff;</style>
							<Components>
								<Container id="Container3">
									<left>-1px</left>
									<top>0px</top>
									<width>157px</width>
									<height>25px</height>
									<style>background-color:#FFB505;border-width:1px</style>
								</Container>
								<Headline id="Headline1">
									<left>9px</left>
									<top>39px</top>
									<width>138px</width>
									<height>29px</height>
									<text>Hello World!</text>
									<kind>h4</kind>
								</Headline>
								<Headline id="Headline2">
									<left>12px</left>
									<top>79px</top>
									<width>138px</width>
									<height>29px</height>
									<text>A Sub Text</text>
									<kind>h6</kind>
								</Headline>
							</Components>
						</Container>
						<PushButton id="PushButton1">
							<left>1106px</left>
							<top>160px</top>
							<width>154px</width>
							<height>45px</height>
							<caption>Duplicate</caption>
							<click>SetVar [n] [n]+1

. ----- Duplicate Container1
DuplicateObjectEx &quot;Container2&quot; &quot;myContainer[n]&quot; &quot;Container1&quot; &quot;&lt;div id=&apos;Container3&apos; class=&apos;&apos; ng-style=&apos;NAB.Container3_style&apos; ng-hide=&apos;NAB.Container3_hidden&apos; ng-disabled=&apos;NAB.Container3_disabled&apos;&gt;&lt;/div&gt;&lt;h4 id=&apos;Headline1&apos; class=&apos;&apos; ng-style=&apos;NAB.Headline1_style&apos; ng-hide=&apos;NAB.Headline1_hidden&apos; ng-disabled=&apos;NAB.Headline1_disabled&apos;&gt;Hello World [n]!&lt;/h4&gt;&lt;h6 id=&apos;Headline2&apos; class=&apos;&apos; ng-style=&apos;NAB.Headline2_style&apos; ng-hide=&apos;NAB.Headline2_hidden&apos; ng-disabled=&apos;NAB.Headline2_disabled&apos;&gt;myContainer[n]&lt;/h6&gt;&quot;

BeginJS
  //This line modifies the id of the newly created object.
  $(&apos;[visualneowebname=&quot;myContainer[n]&quot;]&apos;).attr(&quot;id&quot;,&quot;myContainer[n]&quot;);
EndJS

CreateEmptyObject [myCSS]
Random 700 [posx]
Random 300 [posy]
SetVar [myCSS.top] &quot;[posy]px&quot;
SetVar [myCSS.left] &quot;[posx]px&quot;
Random 255 [red]
Random 255 [green]
Random 255 [blue]
SetVar [myCSS.background] &quot;rgb([red],[green],[blue])&quot;
SetObjectCSS &quot;myContainer[n]&quot; [myCSS]

ArrayAddItem [myArray] &quot;myContainer[n]&quot;
ListBoxAddItem &quot;Listbox1&quot; &quot;myContainer[n]&quot; &quot;[n]&quot;

. add drag and drop support (which does not work)
neoDragInit &quot;myContainer[n]&quot;</click>
						</PushButton>
						<Container id="StaticContainer">
							<left>923px</left>
							<top>664px</top>
							<width>124px</width>
							<height>103px</height>
							<style>border-width:1px;border-style:solid;background-color:#fff;</style>
							<Components>
								<Headline id="Headline3">
									<left>22px</left>
									<top>24px</top>
									<width>85px</width>
									<height>39px</height>
									<text>Static</text>
									<kind>h3</kind>
								</Headline>
								<Headline id="Headline4">
									<left>23px</left>
									<top>76px</top>
									<width>99px</width>
									<height>20px</height>
									<text>[n]</text>
									<kind>h6</kind>
								</Headline>
							</Components>
						</Container>
						<Listbox id="Listbox1">
							<left>1108px</left>
							<top>392px</top>
							<width>152px</width>
							<height>331px</height>
							<multi_select>False</multi_select>
						</Listbox>
						<PushButton id="PushButton2">
							<left>1108px</left>
							<top>738px</top>
							<width>154px</width>
							<height>45px</height>
							<caption>Move Item</caption>
							<click>ListBoxGetSelectedItem &quot;Listbox1&quot; [myVar]
.SetVar [myVar] [myVar]+1
MessageBox &quot;Info&quot; &quot;You selected  &apos;myContainer[myVar]&apos; But picked was a container with a different id...&quot; &quot;ok&quot; &quot;&quot;
ObjectToFront &quot;myContainer[myVar]&quot;
AnimateObject &quot;myContainer[myVar]&quot; &quot;5&quot; &quot;5&quot; 1500 &quot;easeOutElastic&quot; &quot;&quot;

</click>
						</PushButton>
						<Headline id="Headline5">
							<left>1106px</left>
							<top>223px</top>
							<width>167px</width>
							<height>151px</height>
							<text>1. Add some objects with &quot;Duplicate&quot; Button&lt;br&gt;2. Select an item in the Listbox and click &quot;Move Item&quot;&lt;br&gt;3. See an index number issue. Duplicated Object has wrong index number.</text>
							<kind>h5</kind>
						</Headline>
					</Components>
				</Page>
			</Components>
		</PageList>
		<PageList name="Master">
			<Components>
				<Page id="MasterPage"/>
			</Components>
		</PageList>
		<PageList name="Dialog">
			<Components>
				<Page id="NewDialog">
					<Components>
						<DialogContainer id="DialogContainer1">
							<left>0px</left>
							<top>0px</top>
							<width>1280px</width>
							<height>800px</height>
							<close_button>False</close_button>
							<kind>custom</kind>
						</DialogContainer>
					</Components>
				</Page>
			</Components>
		</PageList>
	</Components>
</Application>
