paper.js/build/jsdoc-toolkit/templates/jsdoc/class.tmpl

112 lines
No EOL
4.3 KiB
Cheetah

{! data.classId = data.alias.toLowerCase() !}
{!
var ownProperties = data.properties.filter(function($){return $.memberOf == data.alias && !$.isNamespace && !$.isStatic});
var staticProperties = data.properties.filter(function($){return $.memberOf == data.alias && !$.isNamespace && $.isStatic});
var ownMethods = data.methods.filter(function($){return $.memberOf == data.alias && !$.isNamespace && !$.isStatic && !$.isOperator});
var staticMethods = data.methods.filter(function($){return $.memberOf == data.alias && !$.isNamespace && $.isStatic && !$.isOperator});
var operatorMethods = data.methods.filter(function($){return $.memberOf == data.alias && !$.isNamespace && !$.isStatic && $.isOperator});
if (operatorMethods.length) {
var operators = {};
for (var i = 0, l = operatorMethods.length; i < l; i++) {
var operator = operatorMethods[i];
var name = operator.name.replace(/\^[0-9]$/, '');
if (!operators[name])
operators[name] = [];
operators[name].push(operator);
}
}
!}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>{+data.alias+}</title>
<base target="classFrame">
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
<link rel="stylesheet" href="../resources/css/style.css" type="text/css">
<link rel="stylesheet" href="../resources/css/lighter.css" type="text/css">
<script src="../resources/js/bootstrap.js" type="text/javascript"></script>
<script src="../resources/js/lighter.js" type="text/javascript"></script>
<script src="../resources/js/reference.js" type="text/javascript"></script>
</head>
<body class="reference">
<div class="reference-class">
<h1>{+data.alias+}</h1>
<p>{+processInlineTags(data.classDesc)+}</p>
</div>
<!-- ============================== constructors ========================= -->
<if test="!/(Event|Style)/.test(data.alias)">
<div class="reference-members"><h2>Constructors</h2>
<div id="{+data.classId+}" class="member">
<div id="{+data.classId+}-link" class="member-link">
<a name="{+data.classId+}" href="#" onClick="return toggleMember('{+data.classId+}', false);"><tt><b>{+ data.alias +}</b>{+ makeSignature(data.params) +}</tt></a>
</div>
<div id="{+data.classId+}-description" class="member-description hidden">
<div class="member-header">
<div class="member-title">
<div class="member-link">
<a href="#" onClick="return toggleMember('{+data.classId+}', false);"><tt><b>{+ data.alias +}</b>{+ makeSignature(data.params) +}</tt></a>
</div>
</div>
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('{+data.classId+}', false);"></div>
<div class="clear"></div>
</div>
<div class="member-text"><p>{+processInlineTags(data.desc)+}</p>
<if test="data.example.length">
<for each="example" in="data.example">
<pre>{+example+}</pre>
</for>
</if>
{+ templates.parameters.process(data) +}
<if test="data.returns.length">
<ul><b>Returns:</b>
<li>
<for each="item" in="data.returns">
<dd>{+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+}{+processInlineTags(item.desc)+}</dd>
</for>
</li>
</ul>
</if>
</div>
</div>
</div>
</div>
</if>
<!-- ============================== properties ========================= -->
<if test="defined(operators)">
<div class="reference-members"><h2>Operators</h2>
<for each="member" in="operators">
{+ templates.operators.process(member) +}
</for>
</div>
</if>
<if test="defined(ownProperties) && ownProperties.length">
<div class="reference-members"><h2>Properties</h2>
<for each="member" in="ownProperties">
{+ templates.property.process(member) +}
</for>
</div>
</if>
<!-- ============================== method details ========================= -->
<if test="defined(ownMethods) && ownMethods.length">
<div class="reference-members"><h2>Functions</h2>
<for each="member" in="ownMethods">
{! member.desc = processGroupTitle(member.desc, member) !}
<if test="defined(member.groupTitle)">
<h3>{+member.groupTitle+}</h3>
</if>
{+ templates.method.process(member) +}
</for>
</div>
</if>
<if test="defined(staticMethods) && staticMethods.length">
<div class="reference-members"><h2>Static Functions</h2>
<for each="member" in="staticMethods">
{+ templates.method.process(member) +}
</for>
</div>
</if>
</body>