123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583 |
- <?xml version="1.0" encoding="utf-8" ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <!-- This file is generated by Nim. -->
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <!-- Favicon -->
- <link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/>
- <link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4QQQEwksSS9ZWwAAAk1JREFUWMPtll2ITVEUx39nn/O7Y5qR8f05wtCUUr6ZIS++8pEnkZInPImneaCQ5METNdOkeFBKUhMPRIkHKfEuUZSUlGlKPN2TrgfncpvmnntnmlEyq1Z7t89/rf9a6+y99oZxGZf/XeIq61EdtgKXgdXA0xrYAvBjOIF1AI9zvjcC74BSpndrJPkBWDScTF8Aa4E3wDlgHbASaANmVqlcCnwHvgDvgVfAJ+AikAAvgfVZwLnSVZHZaOuKoQi3ZOMi4NkYkpe1p4J7A8BpYAD49hfIy/oqG0+hLomiKP2L5L+1ubn5115S+3OAn4EnwBlgMzCjyt6ZAnQCJ4A7wOs88iRJHvw50HoujuPBoCKwHWiosy8MdfZnAdcHk8dxXFJ3VQbQlCTJvRBCGdRbD4M6uc5glpY3eAihpN5S5w12diSEcCCEcKUO4ljdr15T76ur1FDDLIQQ3qv71EdDOe3Kxj3leRXyk+pxdWnFWod6Wt2bY3de3aSuUHcPBVimHs7mK9WrmeOF6lR1o9qnzskh2ar2qm1qizpfXaPeVGdlmGN5pb09qMxz1Xb1kLqgzn1RyH7JUXW52lr5e/Kqi9qpto7V1atuUzfnARrV7jEib1T76gG2qxdGmXyiekkt1GswPTtek0aBfJp6YySGBfWg2tPQ0FAYgf1stUfdmdcjarbYJEniKIq6gY/Aw+zWHAC+p2labGpqiorFYgGYCEzN7oQdQClN07O1/EfDyGgC0ALMBdYAi4FyK+4H3gLPsxfR1zRNi+NP7nH5J+QntnXe5B5mpfQAAAAASUVORK5CYII=">
- <!-- Google fonts -->
- <link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
- <link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
- <!-- CSS -->
- <title>node</title>
- <link rel="stylesheet" type="text/css" href="nimdoc.out.css">
- <script type="text/javascript" src="dochack.js"></script>
- <script type="text/javascript">
- function main() {
- var pragmaDots = document.getElementsByClassName("pragmadots");
- for (var i = 0; i < pragmaDots.length; i++) {
- pragmaDots[i].onclick = function(event) {
- // Hide tease
- event.target.parentNode.style.display = "none";
- // Show actual
- event.target.parentNode.nextElementSibling.style.display = "inline";
- }
- }
- const toggleSwitch = document.querySelector('.theme-switch input[type="checkbox"]');
- function switchTheme(e) {
- if (e.target.checked) {
- document.documentElement.setAttribute('data-theme', 'dark');
- localStorage.setItem('theme', 'dark');
- } else {
- document.documentElement.setAttribute('data-theme', 'light');
- localStorage.setItem('theme', 'light');
- }
- }
- toggleSwitch.addEventListener('change', switchTheme, false);
- if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
- document.documentElement.setAttribute('data-theme', "dark");
- toggleSwitch.checked = true;
- } else if (window.matchMedia && window.matchMedia('(prefers-color-scheme: light)').matches) {
- document.documentElement.setAttribute('data-theme', "light");
- toggleSwitch.checked = false;
- } else {
- const currentTheme = localStorage.getItem('theme') ? localStorage.getItem('theme') : null;
- if (currentTheme) {
- document.documentElement.setAttribute('data-theme', currentTheme);
- if (currentTheme === 'dark') {
- toggleSwitch.checked = true;
- }
- }
- }
- }
- </script>
- </head>
- <body onload="main()">
- <div class="document" id="documentId">
- <div class="container">
- <h1 class="title">node</h1>
- <div class="row">
- <div class="three columns">
- <div class="theme-switch-wrapper">
- <label class="theme-switch" for="checkbox">
- <input type="checkbox" id="checkbox" />
- <div class="slider round"></div>
- </label>
- <em>Dark Mode</em>
- </div>
- <div id="global-links">
- <ul class="simple">
- </ul>
- </div>
- <div id="searchInputDiv">
- Search: <input type="text" id="searchInput"
- onkeyup="search()" />
- </div>
- <div>
- Group by:
- <select onchange="groupBy(this.value)">
- <option value="section">Section</option>
- <option value="type">Type</option>
- </select>
- </div>
- <ul class="simple simple-toc" id="toc-list">
- <li>
- <a class="reference reference-toplevel" href="#6" id="56">Imports</a>
- <ul class="simple simple-toc-section">
-
- </ul>
- </li>
- <li>
- <a class="reference reference-toplevel" href="#7" id="57">Types</a>
- <ul class="simple simple-toc-section">
- <li><a class="reference" href="#NodeObj"
- title="NodeObj = object of RootObj
- visible*: bool
- is_ready*: bool
- can_use_anchor*: bool
- can_use_size_anchor*: bool
- pausemode*: PauseMode ## Pause mode, by default is INHERIT.
- name*: string ## Node name.
- position*: Vector2Ref ## Node position, by default is Vector2(0, 0).
- global_position*: Vector2Ref ## Node global position.
- rect_size*: Vector2Ref ## Node size.
- size_anchor*: Vector2Ref ## Node size anchor.
- anchor*: AnchorRef ## Node anchor.
- parent*: NodePtr ## Node parent.
- children*: seq[NodePtr] ## Node children.
- enter*: proc () ## This called when scene changed.
- exit*: proc () ## This called when exit from the scene.
- input*: proc (event: InputEvent) ## This called on user input.
- ready*: proc () ## This called when the scene changed and the `enter` was called.
- process*: proc () ## This called every frame."><wbr />Node<wbr />Obj<span class="attachedType"></span></a></li>
- <li><a class="reference" href="#NodePtr"
- title="NodePtr = ptr NodeObj"><wbr />Node<wbr />Ptr<span class="attachedType"></span></a></li>
- </ul>
- </li>
- <li>
- <a class="reference reference-toplevel" href="#12" id="62">Procs</a>
- <ul class="simple simple-toc-section">
- <li><a class="reference" href="#Node%2Cstring%2CNodeObj"
- title="Node(name: string; variable: var NodeObj): NodePtr"><wbr />Node<span class="attachedType">NodePtr</span></a></li>
- <li><a class="reference" href="#Node%2CNodeObj"
- title="Node(variable: var NodeObj): NodePtr"><wbr />Node<span class="attachedType">NodeObj</span></a></li>
- </ul>
- </li>
- <li>
- <a class="reference reference-toplevel" href="#14" id="64">Methods</a>
- <ul class="simple simple-toc-section">
- <li><a class="reference" href="#addChild.e%2CNodePtr%2CNodePtr"
- title="addChild(self: NodePtr; child: NodePtr)"><wbr />add<wbr />Child<span class="attachedType">NodePtr</span></a></li>
- <li><a class="reference" href="#calcGlobalPosition.e%2CNodePtr"
- title="calcGlobalPosition(self: NodePtr)"><wbr />calc<wbr />Global<wbr />Position<span class="attachedType">NodePtr</span></a></li>
- <li><a class="reference" href="#calcPositionAnchor.e%2CNodePtr"
- title="calcPositionAnchor(self: NodePtr)"><wbr />calc<wbr />Position<wbr />Anchor<span class="attachedType">NodePtr</span></a></li>
- <li><a class="reference" href="#draw.e%2CNodePtr%2CGLfloat%2CGLfloat"
- title="draw(self: NodePtr; w, h: GLfloat)"><wbr />draw<span class="attachedType">NodePtr</span></a></li>
- <li><a class="reference" href="#draw2stage.e%2CNodePtr%2CGLfloat%2CGLfloat"
- title="draw2stage(self: NodePtr; w, h: GLfloat)"><wbr />draw2stage<span class="attachedType">NodePtr</span></a></li>
- <li><a class="reference" href="#duplicate.e%2CNodePtr%2CNodeObj"
- title="duplicate(self: NodePtr; obj: var NodeObj): NodePtr"><wbr />duplicate<span class="attachedType">NodePtr</span></a></li>
- <li><a class="reference" href="#getChild.e%2CNodePtr%2Cint"
- title="getChild(self: NodePtr; index: int): NodePtr"><wbr />get<wbr />Child<span class="attachedType">NodePtr</span></a></li>
- <li><a class="reference" href="#getChildCount.e%2CNodePtr"
- title="getChildCount(self: NodePtr): int"><wbr />get<wbr />Child<wbr />Count<span class="attachedType">NodePtr</span></a></li>
- <li><a class="reference" href="#getChildIndex.e%2CNodePtr%2Cstring"
- title="getChildIndex(self: NodePtr; name: string): int"><wbr />get<wbr />Child<wbr />Index<span class="attachedType">NodePtr</span></a></li>
- <li><a class="reference" href="#getChildIndex.e%2CNodePtr%2CNodePtr"
- title="getChildIndex(self: NodePtr; child: NodePtr): int"><wbr />get<wbr />Child<wbr />Index<span class="attachedType">NodePtr</span></a></li>
- <li><a class="reference" href="#getChildIter.e%2CNodePtr"
- title="getChildIter(self: NodePtr): seq[NodePtr]"><wbr />get<wbr />Child<wbr />Iter<span class="attachedType">NodePtr</span></a></li>
- <li><a class="reference" href="#getNode.e%2CNodePtr%2Cstring"
- title="getNode(self: NodePtr; path: string): NodePtr"><wbr />get<wbr />Node<span class="attachedType">NodePtr</span></a></li>
- <li><a class="reference" href="#getPath.e%2CNodePtr"
- title="getPath(self: NodePtr): string"><wbr />get<wbr />Path<span class="attachedType">NodePtr</span></a></li>
- <li><a class="reference" href="#getParent.e%2CNodePtr"
- title="getParent(self: NodePtr): NodePtr"><wbr />get<wbr />Parent<span class="attachedType">NodePtr</span></a></li>
- <li><a class="reference" href="#getPauseMode.e%2CNodePtr"
- title="getPauseMode(self: NodePtr): PauseMode"><wbr />get<wbr />Pause<wbr />Mode<span class="attachedType">NodePtr</span></a></li>
- <li><a class="reference" href="#isParentOf.e%2CNodePtr%2CNodePtr"
- title="isParentOf(self, other: NodePtr): bool"><wbr />is<wbr />Parent<wbr />Of<span class="attachedType">NodePtr</span></a></li>
- <li><a class="reference" href="#handle.e%2CNodePtr%2CInputEvent%2CNodePtr"
- title="handle(self: NodePtr; event: InputEvent; mouse_on: var NodePtr)"><wbr />handle<span class="attachedType">NodePtr</span></a></li>
- <li><a class="reference" href="#hasNode.e%2CNodePtr%2Cstring"
- title="hasNode(self: NodePtr; name: string): bool"><wbr />has<wbr />Node<span class="attachedType">NodePtr</span></a></li>
- <li><a class="reference" href="#hasNode.e%2CNodePtr%2CNodePtr"
- title="hasNode(self: NodePtr; other: NodePtr): bool"><wbr />has<wbr />Node<span class="attachedType">NodePtr</span></a></li>
- <li><a class="reference" href="#hasParent.e%2CNodePtr"
- title="hasParent(self: NodePtr): bool"><wbr />has<wbr />Parent<span class="attachedType">NodePtr</span></a></li>
- <li><a class="reference" href="#hide.e%2CNodePtr"
- title="hide(self: NodePtr)"><wbr />hide<span class="attachedType">NodePtr</span></a></li>
- <li><a class="reference" href="#move.e%2CNodePtr%2Cfloat%2Cfloat"
- title="move(self: NodePtr; x, y: float)"><wbr />move<span class="attachedType">NodePtr</span></a></li>
- <li><a class="reference" href="#move.e%2CNodePtr%2CVector2Ref"
- title="move(self: NodePtr; vec2: Vector2Ref)"><wbr />move<span class="attachedType">NodePtr</span></a></li>
- <li><a class="reference" href="#removeChild.e%2CNodePtr%2Cint"
- title="removeChild(self: NodePtr; index: int)"><wbr />remove<wbr />Child<span class="attachedType">NodePtr</span></a></li>
- <li><a class="reference" href="#removeChild.e%2CNodePtr%2CNodePtr"
- title="removeChild(self: NodePtr; other: NodePtr)"><wbr />remove<wbr />Child<span class="attachedType">NodePtr</span></a></li>
- <li><a class="reference" href="#setAnchor.e%2CNodePtr%2CAnchorRef"
- title="setAnchor(self: NodePtr; anchor: AnchorRef)"><wbr />set<wbr />Anchor<span class="attachedType">NodePtr</span></a></li>
- <li><a class="reference" href="#setAnchor.e%2CNodePtr%2Cfloat%2Cfloat%2Cfloat%2Cfloat"
- title="setAnchor(self: NodePtr; x1, y1, x2, y2: float)"><wbr />set<wbr />Anchor<span class="attachedType">NodePtr</span></a></li>
- <li><a class="reference" href="#setSizeAnchor.e%2CNodePtr%2CVector2Ref"
- title="setSizeAnchor(self: NodePtr; anchor: Vector2Ref)"><wbr />set<wbr />Size<wbr />Anchor<span class="attachedType">NodePtr</span></a></li>
- <li><a class="reference" href="#setSizeAnchor.e%2CNodePtr%2Cfloat%2Cfloat"
- title="setSizeAnchor(self: NodePtr; x, y: float)"><wbr />set<wbr />Size<wbr />Anchor<span class="attachedType">NodePtr</span></a></li>
- <li><a class="reference" href="#show.e%2CNodePtr"
- title="show(self: NodePtr)"><wbr />show<span class="attachedType">NodePtr</span></a></li>
- <li><a class="reference" href="#delete.e%2CNodePtr"
- title="delete(self: NodePtr)"><wbr />delete<span class="attachedType">NodePtr</span></a></li>
- </ul>
- </li>
- <li>
- <a class="reference reference-toplevel" href="#18" id="68">Templates</a>
- <ul class="simple simple-toc-section">
- <li><a class="reference" href="#nodepattern.t%2Cuntyped"
- title="nodepattern(nodetype: untyped): untyped"><wbr />nodepattern<span class="attachedType"></span></a></li>
- </ul>
- </li>
- </ul>
- </div>
- <div class="nine columns" id="content">
- <div id="tocRoot"></div>
-
- <p class="module-desc"></p>
- <div class="section" id="6">
- <h1><a class="toc-backref" href="#6">Imports</a></h1>
- <dl class="item">
- <a class="reference external" href="opengl.html">opengl</a>, <a class="reference external" href="vector2.html">vector2</a>, <a class="reference external" href="enums.html">enums</a>, <a class="reference external" href="anchor.html">anchor</a>, <a class="reference external" href="input.html">input</a>
- </dl></div>
- <div class="section" id="7">
- <h1><a class="toc-backref" href="#7">Types</a></h1>
- <dl class="item">
- <a id="NodeObj"></a>
- <dt><pre><a href="node.html#NodeObj"><span class="Identifier">NodeObj</span></a> <span class="Other">=</span> <span class="Keyword">object</span> <span class="Keyword">of</span> <span class="Identifier">RootObj</span>
- <span class="Identifier">visible</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">bool</span>
- <span class="Identifier">is_ready</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">bool</span>
- <span class="Identifier">can_use_anchor</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">bool</span>
- <span class="Identifier">can_use_size_anchor</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">bool</span>
- <span class="Identifier">pausemode</span><span class="Operator">*</span><span class="Other">:</span> <a href="enums.html#PauseMode"><span class="Identifier">PauseMode</span></a> <span class="Comment">## Pause mode, by default is INHERIT.</span>
- <span class="Identifier">name</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">string</span> <span class="Comment">## Node name.</span>
- <span class="Identifier">position</span><span class="Operator">*</span><span class="Other">:</span> <a href="vector2.html#Vector2Ref"><span class="Identifier">Vector2Ref</span></a> <span class="Comment">## Node position, by default is Vector2(0, 0).</span>
- <span class="Identifier">global_position</span><span class="Operator">*</span><span class="Other">:</span> <a href="vector2.html#Vector2Ref"><span class="Identifier">Vector2Ref</span></a> <span class="Comment">## Node global position.</span>
- <span class="Identifier">rect_size</span><span class="Operator">*</span><span class="Other">:</span> <a href="vector2.html#Vector2Ref"><span class="Identifier">Vector2Ref</span></a> <span class="Comment">## Node size.</span>
- <span class="Identifier">size_anchor</span><span class="Operator">*</span><span class="Other">:</span> <a href="vector2.html#Vector2Ref"><span class="Identifier">Vector2Ref</span></a> <span class="Comment">## Node size anchor.</span>
- <span class="Identifier">anchor</span><span class="Operator">*</span><span class="Other">:</span> <a href="anchor.html#AnchorRef"><span class="Identifier">AnchorRef</span></a> <span class="Comment">## Node anchor.</span>
- <span class="Identifier">parent</span><span class="Operator">*</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a> <span class="Comment">## Node parent.</span>
- <span class="Identifier">children</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">]</span> <span class="Comment">## Node children.</span>
- <span class="Identifier">enter</span><span class="Operator">*</span><span class="Other">:</span> <span class="Keyword">proc</span> <span class="Other">(</span><span class="Other">)</span> <span class="Comment">## This called when scene changed.</span>
- <span class="Identifier">exit</span><span class="Operator">*</span><span class="Other">:</span> <span class="Keyword">proc</span> <span class="Other">(</span><span class="Other">)</span> <span class="Comment">## This called when exit from the scene.</span>
- <span class="Identifier">input</span><span class="Operator">*</span><span class="Other">:</span> <span class="Keyword">proc</span> <span class="Other">(</span><span class="Identifier">event</span><span class="Other">:</span> <a href="input.html#InputEvent"><span class="Identifier">InputEvent</span></a><span class="Other">)</span> <span class="Comment">## This called on user input.</span>
- <span class="Identifier">ready</span><span class="Operator">*</span><span class="Other">:</span> <span class="Keyword">proc</span> <span class="Other">(</span><span class="Other">)</span> <span class="Comment">## This called when the scene changed and the `enter` was called.</span>
- <span class="Identifier">process</span><span class="Operator">*</span><span class="Other">:</span> <span class="Keyword">proc</span> <span class="Other">(</span><span class="Other">)</span> <span class="Comment">## This called every frame.</span>
- </pre></dt>
- <dd>
- </dd>
- <a id="NodePtr"></a>
- <dt><pre><a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a> <span class="Other">=</span> <span class="Keyword">ptr</span> <a href="node.html#NodeObj"><span class="Identifier">NodeObj</span></a></pre></dt>
- <dd>
- </dd>
- </dl></div>
- <div class="section" id="12">
- <h1><a class="toc-backref" href="#12">Procs</a></h1>
- <dl class="item">
- <a id="Node,string,NodeObj"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#Node%2Cstring%2CNodeObj"><span class="Identifier">Node</span></a><span class="Other">(</span><span class="Identifier">name</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">;</span> <span class="Identifier">variable</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="node.html#NodeObj"><span class="Identifier">NodeObj</span></a><span class="Other">)</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- Creates a new Node pointer.
- </dd>
- <a id="Node,NodeObj"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#Node%2CNodeObj"><span class="Identifier">Node</span></a><span class="Other">(</span><span class="Identifier">variable</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="node.html#NodeObj"><span class="Identifier">NodeObj</span></a><span class="Other">)</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- </dd>
- </dl></div>
- <div class="section" id="14">
- <h1><a class="toc-backref" href="#14">Methods</a></h1>
- <dl class="item">
- <a id="addChild.e,NodePtr,NodePtr"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#addChild.e%2CNodePtr%2CNodePtr"><span class="Identifier">addChild</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">;</span> <span class="Identifier">child</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">base</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- <p>Adds new child in current node.</p>
- <p>Arguments:</p>
- <ul class="simple"><li><tt class="docutils literal"><span class="pre">child</span></tt>: other node.</li>
- </ul>
- </dd>
- <a id="calcGlobalPosition.e,NodePtr"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#calcGlobalPosition.e%2CNodePtr"><span class="Identifier">calcGlobalPosition</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">base</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- Returns global node position.
- </dd>
- <a id="calcPositionAnchor.e,NodePtr"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#calcPositionAnchor.e%2CNodePtr"><span class="Identifier">calcPositionAnchor</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">base</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- Calculates node position with anchor. This used in the Window object.
- </dd>
- <a id="draw.e,NodePtr,GLfloat,GLfloat"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#draw.e%2CNodePtr%2CGLfloat%2CGLfloat"><span class="Identifier">draw</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">;</span> <span class="Identifier">w</span><span class="Other">,</span> <span class="Identifier">h</span><span class="Other">:</span> <a href="opengl.html#GLfloat"><span class="Identifier">GLfloat</span></a><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">base</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- Draws node. This used in the Window object.
- </dd>
- <a id="draw2stage.e,NodePtr,GLfloat,GLfloat"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#draw2stage.e%2CNodePtr%2CGLfloat%2CGLfloat"><span class="Identifier">draw2stage</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">;</span> <span class="Identifier">w</span><span class="Other">,</span> <span class="Identifier">h</span><span class="Other">:</span> <a href="opengl.html#GLfloat"><span class="Identifier">GLfloat</span></a><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">base</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- Draws node. This used in the Window object.
- </dd>
- <a id="duplicate.e,NodePtr,NodeObj"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#duplicate.e%2CNodePtr%2CNodeObj"><span class="Identifier">duplicate</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">;</span> <span class="Identifier">obj</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="node.html#NodeObj"><span class="Identifier">NodeObj</span></a><span class="Other">)</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">base</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- Duplicates Node object and create a new Node pointer.
- </dd>
- <a id="getChild.e,NodePtr,int"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#getChild.e%2CNodePtr%2Cint"><span class="Identifier">getChild</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">;</span> <span class="Identifier">index</span><span class="Other">:</span> <span class="Identifier">int</span><span class="Other">)</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">base</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- <p>Returns child at <tt class="docutils literal"><span class="pre">index</span></tt> position, if available.</p>
- <p>Arguments:</p>
- <ul class="simple"><li><tt class="docutils literal"><span class="pre">index</span></tt>: child index.</li>
- </ul>
- </dd>
- <a id="getChildCount.e,NodePtr"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#getChildCount.e%2CNodePtr"><span class="Identifier">getChildCount</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">base</span><span class="Other">,</span> <span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- Returns child count.
- </dd>
- <a id="getChildIndex.e,NodePtr,string"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#getChildIndex.e%2CNodePtr%2Cstring"><span class="Identifier">getChildIndex</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">;</span> <span class="Identifier">name</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">base</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- Returns <tt class="docutils literal"><span class="pre">child</span></tt> index or -1, if another node is not the child.
- </dd>
- <a id="getChildIndex.e,NodePtr,NodePtr"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#getChildIndex.e%2CNodePtr%2CNodePtr"><span class="Identifier">getChildIndex</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">;</span> <span class="Identifier">child</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">base</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- Returns <tt class="docutils literal"><span class="pre">child</span></tt> index or -1, if another node is not the child.
- </dd>
- <a id="getChildIter.e,NodePtr"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#getChildIter.e%2CNodePtr"><span class="Identifier">getChildIter</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">]</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">base</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">Exception</span><span class="Other">]</span><span class="Other">,</span>
- <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- Returns all children iter.
- </dd>
- <a id="getNode.e,NodePtr,string"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#getNode.e%2CNodePtr%2Cstring"><span class="Identifier">getNode</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">;</span> <span class="Identifier">path</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">)</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">base</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- Returns child by <tt class="docutils literal"><span class="pre">path</span></tt>
- </dd>
- <a id="getPath.e,NodePtr"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#getPath.e%2CNodePtr"><span class="Identifier">getPath</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">string</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">base</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- Returns node path.
- </dd>
- <a id="getParent.e,NodePtr"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#getParent.e%2CNodePtr"><span class="Identifier">getParent</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">)</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">base</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- Returns node parent.
- </dd>
- <a id="getPauseMode.e,NodePtr"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#getPauseMode.e%2CNodePtr"><span class="Identifier">getPauseMode</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">)</span><span class="Other">:</span> <a href="enums.html#PauseMode"><span class="Identifier">PauseMode</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">base</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- Calculates pause mode
- </dd>
- <a id="isParentOf.e,NodePtr,NodePtr"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#isParentOf.e%2CNodePtr%2CNodePtr"><span class="Identifier">isParentOf</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">,</span> <span class="Identifier">other</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">base</span><span class="Other">,</span> <span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- </dd>
- <a id="handle.e,NodePtr,InputEvent,NodePtr"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#handle.e%2CNodePtr%2CInputEvent%2CNodePtr"><span class="Identifier">handle</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">;</span> <span class="Identifier">event</span><span class="Other">:</span> <a href="input.html#InputEvent"><span class="Identifier">InputEvent</span></a><span class="Other">;</span> <span class="Identifier">mouse_on</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">base</span><span class="Other">,</span>
- <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- Handles user input. This used in the Window object.
- </dd>
- <a id="hasNode.e,NodePtr,string"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#hasNode.e%2CNodePtr%2Cstring"><span class="Identifier">hasNode</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">;</span> <span class="Identifier">name</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">base</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- <p>Returns true, if a node with name <tt class="docutils literal"><span class="pre">name</span></tt> in children.</p>
- <p>Arguments:</p>
- <ul class="simple"><li><tt class="docutils literal"><span class="pre">name</span></tt>: node name.</li>
- </ul>
- </dd>
- <a id="hasNode.e,NodePtr,NodePtr"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#hasNode.e%2CNodePtr%2CNodePtr"><span class="Identifier">hasNode</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">;</span> <span class="Identifier">other</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">base</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- <p>Returns true, if <tt class="docutils literal"><span class="pre">other</span></tt> in self children.</p>
- <p>Arguments:</p>
- <ul class="simple"><li><tt class="docutils literal"><span class="pre">other</span></tt>: other node.</li>
- </ul>
- </dd>
- <a id="hasParent.e,NodePtr"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#hasParent.e%2CNodePtr"><span class="Identifier">hasParent</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">base</span><span class="Other">,</span> <span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- Returns true, when node has parent.
- </dd>
- <a id="hide.e,NodePtr"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#hide.e%2CNodePtr"><span class="Identifier">hide</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">base</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- </dd>
- <a id="move.e,NodePtr,float,float"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#move.e%2CNodePtr%2Cfloat%2Cfloat"><span class="Identifier">move</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">;</span> <span class="Identifier">x</span><span class="Other">,</span> <span class="Identifier">y</span><span class="Other">:</span> <span class="Identifier">float</span><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">base</span><span class="Other">,</span> <span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- <p>Adds <tt class="docutils literal"><span class="pre">x</span></tt> and` y` to the node position.</p>
- <p>Arguments:</p>
- <ul class="simple"><li><tt class="docutils literal"><span class="pre">x</span></tt>: how much to add to the position on the X axis.</li>
- <li><tt class="docutils literal"><span class="pre">y</span></tt>: how much to add to the position on the Y axis.</li>
- </ul>
- </dd>
- <a id="move.e,NodePtr,Vector2Ref"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#move.e%2CNodePtr%2CVector2Ref"><span class="Identifier">move</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">;</span> <span class="Identifier">vec2</span><span class="Other">:</span> <a href="vector2.html#Vector2Ref"><span class="Identifier">Vector2Ref</span></a><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">base</span><span class="Other">,</span> <span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- <p>Adds <tt class="docutils literal"><span class="pre">vec2</span></tt> to the node position.</p>
- <p>Arguments:</p>
- <ul class="simple"><li><tt class="docutils literal"><span class="pre">vec2</span></tt>: how much to add to the position on the X,Y axes.</li>
- </ul>
- </dd>
- <a id="removeChild.e,NodePtr,int"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#removeChild.e%2CNodePtr%2Cint"><span class="Identifier">removeChild</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">;</span> <span class="Identifier">index</span><span class="Other">:</span> <span class="Identifier">int</span><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">base</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- <p>Removes node child at a specific position.</p>
- <p>Arguments:</p>
- <ul class="simple"><li><tt class="docutils literal"><span class="pre">index</span></tt>: child index.</li>
- </ul>
- </dd>
- <a id="removeChild.e,NodePtr,NodePtr"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#removeChild.e%2CNodePtr%2CNodePtr"><span class="Identifier">removeChild</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">;</span> <span class="Identifier">other</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">base</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- <p>Removes another node from <tt class="docutils literal"><span class="pre">self</span></tt>, if <tt class="docutils literal"><span class="pre">other</span></tt> in <tt class="docutils literal"><span class="pre">self</span></tt> children.</p>
- <p>Arguments:</p>
- <ul class="simple"><li><tt class="docutils literal"><span class="pre">other</span></tt>: other node.</li>
- </ul>
- </dd>
- <a id="setAnchor.e,NodePtr,AnchorRef"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#setAnchor.e%2CNodePtr%2CAnchorRef"><span class="Identifier">setAnchor</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">;</span> <span class="Identifier">anchor</span><span class="Other">:</span> <a href="anchor.html#AnchorRef"><span class="Identifier">AnchorRef</span></a><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">base</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- <p>Changes node anchor.</p>
- <p>Arguments:</p>
- <ul class="simple"><li><tt class="docutils literal"><span class="pre">anchor</span></tt> - AnchorRef object.</li>
- </ul>
- </dd>
- <a id="setAnchor.e,NodePtr,float,float,float,float"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#setAnchor.e%2CNodePtr%2Cfloat%2Cfloat%2Cfloat%2Cfloat"><span class="Identifier">setAnchor</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">;</span> <span class="Identifier">x1</span><span class="Other">,</span> <span class="Identifier">y1</span><span class="Other">,</span> <span class="Identifier">x2</span><span class="Other">,</span> <span class="Identifier">y2</span><span class="Other">:</span> <span class="Identifier">float</span><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">base</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- <p>Changes node anchor.</p>
- <p>Arguments:</p>
- <ul class="simple"><li><tt class="docutils literal"><span class="pre">x1</span></tt> and <tt class="docutils literal"><span class="pre">y1</span></tt> - anchor relative to the parent node.</li>
- <li><tt class="docutils literal"><span class="pre">x2</span></tt> and <tt class="docutils literal"><span class="pre">y2</span></tt> - anchor relative to this node.</li>
- </ul>
- </dd>
- <a id="setSizeAnchor.e,NodePtr,Vector2Ref"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#setSizeAnchor.e%2CNodePtr%2CVector2Ref"><span class="Identifier">setSizeAnchor</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">;</span> <span class="Identifier">anchor</span><span class="Other">:</span> <a href="vector2.html#Vector2Ref"><span class="Identifier">Vector2Ref</span></a><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">base</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- </dd>
- <a id="setSizeAnchor.e,NodePtr,float,float"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#setSizeAnchor.e%2CNodePtr%2Cfloat%2Cfloat"><span class="Identifier">setSizeAnchor</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">;</span> <span class="Identifier">x</span><span class="Other">,</span> <span class="Identifier">y</span><span class="Other">:</span> <span class="Identifier">float</span><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">base</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- </dd>
- <a id="show.e,NodePtr"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#show.e%2CNodePtr"><span class="Identifier">show</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">base</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- </dd>
- <a id="delete.e,NodePtr"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#delete.e%2CNodePtr"><span class="Identifier">delete</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="node.html#NodePtr"><span class="Identifier">NodePtr</span></a><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">base</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- Deletes current node.
- </dd>
- </dl></div>
- <div class="section" id="18">
- <h1><a class="toc-backref" href="#18">Templates</a></h1>
- <dl class="item">
- <a id="nodepattern.t,untyped"></a>
- <dt><pre><span class="Keyword">template</span> <a href="#nodepattern.t%2Cuntyped"><span class="Identifier">nodepattern</span></a><span class="Other">(</span><span class="Identifier">nodetype</span><span class="Other">:</span> <span class="Identifier">untyped</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">untyped</span></pre></dt>
- <dd>
- This used in childs of the NodeObj.
- </dd>
- </dl></div>
- </div>
- </div>
- <div class="row">
- <div class="twelve-columns footer">
- <span class="nim-sprite"></span>
- <br/>
- <small style="color: var(--hint);">Made with Nim. Generated: 2020-05-25 16:01:31 UTC</small>
- </div>
- </div>
- </div>
- </div>
- </body>
- </html>
|