-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7e030ba
commit 5a6c708
Showing
31 changed files
with
468 additions
and
32,852 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,221 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Scenes - ContainableRenderableEntity</title> | ||
<base href="/Scenes/"/> | ||
<link rel="stylesheet" type="text/css" href="all.css" media="all" /> | ||
</head> | ||
<body> | ||
<header> | ||
<a href="/Scenes/"> | ||
<strong> | ||
Scenes | ||
</strong> | ||
<span>Documentation</span> | ||
</a> | ||
<sup>Beta</sup> | ||
</header> | ||
|
||
<!-- | ||
<form class="search"> | ||
<input type="search" placeholder="Search" /> | ||
</form> | ||
--> | ||
|
||
<nav> | ||
<div class="wrapper"> | ||
<h2>On This Page</h2> | ||
<ol><li><a href="#relationships">Relationships</a><ul><li><a href="#relationships">Superclass</a></li><li><a href="#relationships">Subclasses</a></li></ul></li><li><a href="#initializers">Initializers</a><ul><li class="initializer"><a href="#containablerenderableentity.init(name:topleft:fixedsize:)">init(name:topLeft:fixedSize:)</a></li></ul></li><li><a href="#properties">Properties</a><ul><li class="property"><a href="#containablerenderableentity.owningcontainer">owningContainer</a></li><li class="property"><a href="#containablerenderableentity.topleft">topLeft</a></li><li class="property"><a href="#containablerenderableentity.externalsize">externalSize</a></li><li class="property"><a href="#containablerenderableentity.currentcalculatedsize">currentCalculatedSize</a></li><li class="property"><a href="#containablerenderableentity.previouscalculatedsize">previousCalculatedSize</a></li><li class="property"><a href="#containablerenderableentity.mostrecentcalculatedsize">mostRecentCalculatedSize</a></li><li class="property"><a href="#containablerenderableentity.mostrecentsize">mostRecentSize</a></li><li class="property"><a href="#containablerenderableentity.fixedsize">fixedSize</a></li></ul></li><li><a href="#methods">Methods</a><ul><li class="method"><a href="#containablerenderableentity.sizechanged()">sizeChanged()</a></li><li class="method"><a href="#containablerenderableentity.topleftchanged()">topLeftChanged()</a></li></ul></li></ol> | ||
</div> | ||
</nav> | ||
|
||
<main> | ||
<article> | ||
<h1> | ||
<small>Class</small> | ||
<code class="name">ContainableRenderableEntity</code> | ||
</h1> | ||
|
||
<html><body><pre class="highlight"><code><span class="attribute">open</span> <span class="keyword">class</span> <span class="type">ContainableRenderableEntity</span>: <a href="RenderableEntity"><span class="type">RenderableEntity</span></a></code></pre></body></html> | ||
<div class="summary" role="doc-abstract"> | ||
<p>A <code>ContainableRenderableEntity</code> is used for subclassing entities which may be | ||
contained in a <code>RenderableEntityContainer</code>. | ||
Descendant classes must:</p> | ||
|
||
</div> | ||
<div class="discussion"> | ||
<html><body><ol> | ||
<li>Position the entity at <em>topLeft</em></li> | ||
<li>Always use the <em>mostRecentSize</em> to determine its actual size</li> | ||
<li>The entity must provide hints to its container by calculating | ||
its own size and setting <em>currentCalculatedSize</em> accordingly</li> | ||
<li>If the entity finds the <em>currentCalculatedSize</em> is nil, it must | ||
recalcualte its size in <em>calculate()</em></li> | ||
<li>Containers will resize and reposition their contained entities and | ||
maintaining the <em>currentCalculatedSize</em> as the minimum size</li> | ||
</ol> | ||
</body></html> | ||
</div> | ||
<section id="relationships"> | ||
<h2 hidden>Relationships</h2> | ||
|
||
<h3>Superclass</h3> | ||
<dl> | ||
<dt class="class"><code><a href="RenderableEntity">RenderableEntity</a></code></dt> | ||
<dd></dd> | ||
</dl> | ||
<h3>Subclasses</h3> | ||
<dl> | ||
<dt class="class"><code><a href="RenderableEntityContainer">RenderableEntityContainer</a></code></dt> | ||
<dd><p>A <code>RenderableEntityContainer</code> is used for containing zero or more | ||
<code>ContainableRenderableEntity</code>s. Because the container itself is | ||
a <code>ContainableRenderableEntity</code>, building a hierarchy of such | ||
containers is possible.</p> | ||
</dd> | ||
</dl> | ||
</section> | ||
<section id="initializers"> | ||
<h2>Initializers</h2> | ||
|
||
<div role="article" class="class" id="containablerenderableentity.init(name:topleft:fixedsize:)"> | ||
<h3> | ||
<code>init(name:topLeft:fixedSize:)</code> | ||
</h3> | ||
<html><body><pre class="highlight"><code><span class="keyword">public</span> <span class="keyword">init</span>(<span class="variable">name</span>: <span class="type">String</span>? = <span class="keyword">nil</span>, <span class="variable">topLeft</span>: <span class="type">Point</span> = <span class="variable">Point</span>.<span class="type">zero</span>, <span class="variable">fixedSize</span>: <span class="type">Size</span>?)</code></pre></body></html> | ||
</div> | ||
</section> | ||
<section id="properties"> | ||
<h2>Properties</h2> | ||
|
||
<div role="article" class="class" id="containablerenderableentity.owningcontainer"> | ||
<h3> | ||
<code>owningContainer</code> | ||
</h3> | ||
<html><body><pre class="highlight"><code><span class="keyword">var</span> <span class="variable">owningContainer</span>: <a href="RenderableEntityContainer"><span class="type">RenderableEntityContainer</span></a>?</code></pre></body></html> | ||
<div class="summary" role="doc-abstract"> | ||
<p>The owning container, if any | ||
This is set when this entity is inserted into a container</p> | ||
|
||
</div> | ||
</div> | ||
<div role="article" class="class" id="containablerenderableentity.topleft"> | ||
<h3> | ||
<code>topLeft</code> | ||
</h3> | ||
<html><body><pre class="highlight"><code><span class="keyword">var</span> <span class="variable">topLeft</span>: <span class="type">Point</span></code></pre></body></html> | ||
<div class="summary" role="doc-abstract"> | ||
<p>The topLeft point of the entity | ||
When set, this entity must reposition accordingly.</p> | ||
|
||
</div> | ||
</div> | ||
<div role="article" class="class" id="containablerenderableentity.externalsize"> | ||
<h3> | ||
<code>externalSize</code> | ||
</h3> | ||
<html><body><pre class="highlight"><code><span class="keyword">var</span> <span class="variable">externalSize</span>: <span class="type">Size</span>?</code></pre></body></html> | ||
<div class="summary" role="doc-abstract"> | ||
<p>The externally specified size of the entity, overriding | ||
the <em>currentCalculatedSize</em>.</p> | ||
|
||
</div> | ||
</div> | ||
<div role="article" class="class" id="containablerenderableentity.currentcalculatedsize"> | ||
<h3> | ||
<code>currentCalculatedSize</code> | ||
</h3> | ||
<html><body><pre class="highlight"><code><span class="keyword">var</span> <span class="variable">currentCalculatedSize</span>: <span class="type">Size</span>?</code></pre></body></html> | ||
</div> | ||
<div role="article" class="class" id="containablerenderableentity.previouscalculatedsize"> | ||
<h3> | ||
<code>previousCalculatedSize</code> | ||
</h3> | ||
<html><body><pre class="highlight"><code><span class="keyword">var</span> <span class="variable">previousCalculatedSize</span>: <span class="type">Size</span>?</code></pre></body></html> | ||
<div class="summary" role="doc-abstract"> | ||
<p>The previously calculated size, set to the <em>currentCalculatedSize</em> whenever | ||
that value is about to change to a non-nil value | ||
This is important for stand-alone <code>ContainableRenderableEntity</code>s because | ||
they never have an <em>externalSize</em> so they'd temporarily lose their size | ||
during a recalculation.</p> | ||
|
||
</div> | ||
</div> | ||
<div role="article" class="class" id="containablerenderableentity.mostrecentcalculatedsize"> | ||
<h3> | ||
<code>mostRecentCalculatedSize</code> | ||
</h3> | ||
<html><body><pre class="highlight"><code><span class="keyword">var</span> <span class="variable">mostRecentCalculatedSize</span>: <span class="type">Size</span>?</code></pre></body></html> | ||
<div class="summary" role="doc-abstract"> | ||
<p>The most recently available calculated size</p> | ||
|
||
</div> | ||
</div> | ||
<div role="article" class="class" id="containablerenderableentity.mostrecentsize"> | ||
<h3> | ||
<code>mostRecentSize</code> | ||
</h3> | ||
<html><body><pre class="highlight"><code><span class="keyword">var</span> <span class="variable">mostRecentSize</span>: <span class="type">Size</span>?</code></pre></body></html> | ||
<div class="summary" role="doc-abstract"> | ||
<p>The most recently available size and the size that the | ||
entity MUST use.</p> | ||
|
||
</div> | ||
</div> | ||
<div role="article" class="class" id="containablerenderableentity.fixedsize"> | ||
<h3> | ||
<code>fixedSize</code> | ||
</h3> | ||
<html><body><pre class="highlight"><code><span class="keyword">let</span> <span class="variable">fixedSize</span>: <span class="type">Size</span>?</code></pre></body></html> | ||
<div class="summary" role="doc-abstract"> | ||
<p>Used for the <em>currentCaclulcatedSize</em> if specified | ||
If specifed, the <em>currentCalculatedSize</em> cannot be changed</p> | ||
|
||
</div> | ||
</div> | ||
</section> | ||
<section id="methods"> | ||
<h2>Methods</h2> | ||
|
||
<div role="article" class="class" id="containablerenderableentity.sizechanged()"> | ||
<h3> | ||
<code>sizeChanged()</code> | ||
</h3> | ||
<html><body><pre class="highlight"><code><span class="attribute">open</span> <span class="keyword">func</span> <span class="function">sizeChanged</span>()</code></pre></body></html> | ||
<div class="summary" role="doc-abstract"> | ||
<p>Invoked to inform an entity that its size has changed. | ||
Descendant classes should only note this change and take action | ||
later in <em>calculate()</em>. | ||
The potential change in size may be due to a new, external size or a new | ||
calculated size, either of which MAY result in an actual change in rendered | ||
size.</p> | ||
|
||
</div> | ||
</div> | ||
<div role="article" class="class" id="containablerenderableentity.topleftchanged()"> | ||
<h3> | ||
<code>topLeftChanged()</code> | ||
</h3> | ||
<html><body><pre class="highlight"><code><span class="attribute">open</span> <span class="keyword">func</span> <span class="function">topLeftChanged</span>()</code></pre></body></html> | ||
<div class="summary" role="doc-abstract"> | ||
<p>Invoked to inform an entity that its <em>topLeft</em> has changed. | ||
Descendant classes should only note this change and take action | ||
later in <em>calculate()</em>.</p> | ||
|
||
</div> | ||
</div> | ||
</section> | ||
|
||
|
||
|
||
</article> | ||
</main> | ||
|
||
<footer> | ||
<p> | ||
Generated on <time datetime="2020-05-01T17:29:39-0500">May 1, 2020</time> using <a href="https://github.com/SwiftDocOrg/swift-doc">swift-doc</a> <span class="version">1.0.0-beta.2</span>. | ||
</p> | ||
</footer> | ||
</body> | ||
</html> |
Oops, something went wrong.