<?xml version="1.0" encoding="UTF-8"?>
<wiki>
  <body>&lt;h2&gt;App&lt;/h2&gt;
&lt;p&gt;Socks.app(&lt;em&gt;&amp;#91;object style&amp;#93;&lt;/em&gt;) { &amp;#8230; } &amp;rarr; App&lt;/p&gt;
&lt;p&gt;App slot is the entry point for Socks applications. App slot behaves like a Flow. An optional style property, &lt;code&gt;title&lt;/code&gt; can be set to set the title of the application.&lt;/p&gt;
&lt;h3&gt;Methods&lt;/h3&gt;
&lt;table style=&quot;border:1px solid black;&quot;&gt;
	&lt;tr&gt;
		&lt;td&gt; getTitle() &lt;/td&gt;
		&lt;td&gt; &amp;rarr; &lt;/td&gt;
		&lt;td&gt; string &lt;/td&gt;
		&lt;td&gt; Returns the title of an application. &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; setTitle(&lt;em&gt;string text&lt;/em&gt;) &lt;/td&gt;
		&lt;td&gt; &amp;rarr; &lt;/td&gt;
		&lt;td&gt; this &lt;/td&gt;
		&lt;td&gt; Sets the title of an application. &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; run(&lt;em&gt;string id &amp;#124; DOMElement element&lt;/em&gt;) &lt;/td&gt;
		&lt;td&gt; &amp;rarr; &lt;/td&gt;
		&lt;td&gt; this &lt;/td&gt;
		&lt;td&gt; Runs an application and renders the output into a specified element in the &lt;span class=&quot;caps&quot;&gt;DOM&lt;/span&gt;. &lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;
&lt;h2&gt;Flow&lt;/h2&gt;
&lt;p&gt;flow(&lt;em&gt;&amp;#91;object style&amp;#93;&lt;/em&gt;) { &amp;#8230; } &amp;rarr; Flow&lt;/p&gt;
&lt;p&gt;In a flow, elements are placed horizontally. It is equivalent to HBox in many other toolkits.&lt;/p&gt;
&lt;h2&gt;Stack&lt;/h2&gt;
&lt;p&gt;stack(&lt;em&gt;&amp;#91;object style&amp;#93;&lt;/em&gt;) { &amp;#8230; } &amp;rarr; Stack&lt;/p&gt;
&lt;p&gt;In a stack, elements are placed vertically. It is equivalent to VBox in many other toolkits.&lt;/p&gt;
&lt;h2&gt;Canvas&lt;/h2&gt;
&lt;p&gt;canvas(&lt;em&gt;{width: width, height:height &amp;#91;, other styles &amp;#93;}&lt;/em&gt;) { &amp;#8230; } &amp;rarr; Canvas&lt;/p&gt;
&lt;p&gt;You must explicitly specify width and height in terms of pixels in the style argument in order for canvas to behave correctly.&lt;/p&gt;
&lt;h2&gt;Common Methods&lt;/h2&gt;
&lt;p&gt;Slots have all Element methods (see [[Elements]]) and the following additional methods:&lt;/p&gt;
&lt;h3&gt;Slot Manipulation&lt;/h3&gt;
&lt;table style=&quot;border:1px solid black;&quot;&gt;
	&lt;tr&gt;
		&lt;td&gt; prepend() { &amp;#8230; } &lt;/td&gt;
		&lt;td&gt; &amp;rarr; &lt;/td&gt;
		&lt;td&gt; this &lt;/td&gt;
		&lt;td&gt; Inserts elements to the beginning of a slot. &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; append() { &amp;#8230; } &lt;/td&gt;
		&lt;td&gt; &amp;rarr; &lt;/td&gt;
		&lt;td&gt; this &lt;/td&gt;
		&lt;td&gt; Inserts elements to the end of a slot. &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; before(Element element &amp;#124; Slot slot) { &amp;#8230; } &lt;/td&gt;
		&lt;td&gt; &amp;rarr; &lt;/td&gt;
		&lt;td&gt; this &lt;/td&gt;
		&lt;td&gt; Inserts elements to a slot, before the element, which is in the slot. &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; after(Element element &amp;#124; Slot slot) { &amp;#8230; } &lt;/td&gt;
		&lt;td&gt; &amp;rarr; &lt;/td&gt;
		&lt;td&gt; this &lt;/td&gt;
		&lt;td&gt; Inserts elements to a slot, after the element, which is in the slot. &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; clear() { &amp;#8230; } &lt;/td&gt;
		&lt;td&gt; &amp;rarr; &lt;/td&gt;
		&lt;td&gt; this &lt;/td&gt;
		&lt;td&gt; Clears a slot, and optionally, replaces the slot with new elements. &lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;
&lt;h3&gt;Events&lt;/h3&gt;
&lt;p&gt;See [[Events]].&lt;/p&gt;
&lt;h3&gt;Elements&lt;/h3&gt;
&lt;p&gt;See [[Controls]], [[Text]] and [[Elements]].&lt;/p&gt;
&lt;h3&gt;Timers&lt;/h3&gt;
&lt;p&gt;See [[Timer]].&lt;/p&gt;
&lt;h3&gt;Miscellaneous&lt;/h3&gt;
&lt;table style=&quot;border:1px solid black;&quot;&gt;
	&lt;tr&gt;
		&lt;td&gt; abort() &lt;/td&gt;
		&lt;td&gt; &amp;rarr; &lt;/td&gt;
		&lt;td&gt; this &lt;/td&gt;
		&lt;td&gt; Kills an application. &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; redirect(string uri) &lt;/td&gt;
		&lt;td&gt; &amp;rarr; &lt;/td&gt;
		&lt;td&gt; this &lt;/td&gt;
		&lt;td&gt; Redirects to the &lt;span class=&quot;caps&quot;&gt;URI&lt;/span&gt;. &lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;</body>
  <created-at type="datetime">2009-11-27T00:10:29-08:00</created-at>
  <id type="integer">185552</id>
  <permalink>slots</permalink>
  <repository-id type="integer">76744</repository-id>
  <title>Slots</title>
  <updated-at type="datetime">2009-04-24T05:39:34-07:00</updated-at>
  <user-id type="integer">30173</user-id>
</wiki>
