<?xml version="1.0" encoding="WIN-1251"?>
<rmml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="L:\collaborative-nir\program\Cscl3DWS\rmml\RMML.xsd">
	<include src="ordered.xml"/>
	<include src="ScaleFrame.xml"/>
	<styles name="stExpGreen2" fontFamily="Arial" fontSize="18"/>
	<composition name="CInputValue" class="COrderedCompositionBase" userEvents="onOK onCancel">
		<composition name="cmFrame" class="CScaleFrame">
			<script>
				this.init("Select.png", 14, 7);
			</script>
		</composition>

		<input name="iptValue" x="0" y="0" width="300" height="20" depth="-1" style="stExpGreen2"/>

		<composition name="btnOK" class="CSkinedButton" x="0" y="0" depth="-2" enabled="true">
			<image name="imSkin" src="rmgr:task/ok.png" width="19"/>
			<script>
				this.init(4, false);
			</script>
			<script event="onRelease">
				this.parent.fireEvent( "onOK");
			</script>
		</composition>

		<composition name="btnCancel" class="CSkinedButton" x="0" y="0" depth="-2" enabled="true">
			<image name="imSkin" src="rmgr:task/cancel.png" width="19"/>
			<script>
				this.init(4, false);
			</script>
			<script event="onRelease">
				this.parent.fireEvent( "onCancel");
			</script>
		</composition>

		<script>
			this.minWidth = 50;
			this.addOrdered( this.iptValue, false);
			this.addOrdered( this.btnOK, false);
			this.addOrdered( this.btnCancel, false);

			function show( aValue, ax, ay, aWidth, aHeight)
			{
				this.x = ax;
				this.y = ay;
				this.iptValue.width = Math.max( aWidth, this.minWidth);
				this.iptValue.height = aHeight;
				this.iptValue.value = aValue;
				this.update();
				this.cmFrame.visible = false;
				this.cmFrame.show(-2, -1, this.width + 4, this.height + 2);
				this.visible = true;
				//setFocus( this.iptValue);
			}

			function hide()
			{
				this.visible = false;
				//setFocus( null);
				this.sqEnterWait.stop();
				return this.getValue();
			}

			function getValue()
			{
				return this.iptValue.value;
			}
		</script>

		<script event="iptValue.onSetFocus">
			this.sqEnterWait.play();
		</script>

		<script event="iptValue.onKillFocus">
			this.sqEnterWait.stop();
		</script>

		<sequencer name="sqEnterWait" loop="true">
			<script>
				"onKeyDown";
			</script>
			<script>
				if (Key.keyCode == Key.ENTER)
					this.parent.fireEvent( "onOK");
				true;
			</script>
		</sequencer>
	</composition>
</rmml>