Doc: Initiate transition to next generation documentation
[shapes.git] / doc / parts / bindings / misc.sxml
blobd666f6a7a13068cb8879ef795e6afc9fff2fed42
1 <!-- This file is part of Shapes.                                           -->
2 <!--                                                                        -->
3 <!-- Shapes is free software: you can redistribute it and/or modify         -->
4 <!-- it under the terms of the GNU General Public License as published by   -->
5 <!-- the Free Software Foundation, either version 3 of the License, or      -->
6 <!-- any later version.                                                     -->
7 <!--                                                                        -->
8 <!-- Shapes is distributed in the hope that it will be useful,              -->
9 <!-- but WITHOUT ANY WARRANTY; without even the implied warranty of         -->
10 <!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          -->
11 <!-- GNU General Public License for more details.                           -->
12 <!--                                                                        -->
13 <!-- You should have received a copy of the GNU General Public License      -->
14 <!-- along with Shapes.  If not, see <http://www.gnu.org/licenses/>.        -->
15 <!--                                                                        -->
16 <!-- Copyright 2008 Henrik Tidefelt                                         -->
18 <section id="bindings/misc">
19 <title>Miscellaneous</title>
20 <top>
21 <p>Standard stream objects, null objects, mathematical constants, and moreā€¦</p>
22 </top>
24 <system-binding identifier="bindings">
25         <function>
26                 <case constructor-of="DynamicBindings">
27                         <arguments>
28                                 <arg>
29                                         <type><named-type name="DynamicBindings" /></type>
30                                 </arg>
31                                 <arg>
32                                         <type><named-type name="DynamicBindings" /></type>
33                                 </arg>
34                                 <arg identifier="...">
35                                         <type><named-type name="DynamicBindings" /></type>
36                                 </arg>
37                         </arguments>
38                         <dynamic-references></dynamic-references>
39                         <description>
40                                 <p>Combines dynamic bindings.  Can be used instead of repeating the operator <operator name="&amp;" />.</p>
41                         </description>
42                 </case>
43         </function>
44 </system-binding>
46 <system-binding identifier="tag">
47         <function>
48                 <case>
49                         <arguments>
50                                 <arg identifier="key">
51                                         <type><named-type name="Symbol" /></type>
52                                 </arg>
53                                 <arg identifier="obj">
54                                 </arg>
55                                 <arg identifier="transform">
56                                         <type><named-type name="Boolean" /></type>
57                                         <default>true</default>
58                                 </arg>
59                                 <arg identifier="draw">
60                                         <type><named-type name="Boolean" /></type>
61                                         <default>true</default>
62                                 </arg>
63                         </arguments>
64                         <result>
65                                 <type><named-type name="Value" /></type>
66                         </result>
67                         <dynamic-references></dynamic-references>
68                         <description>
69                                 <p>Creates a tagged object by attaching key <arg name="key" /> to <arg name="obj" />.</p>
70                                 <p>The result is either a <named-type name="Drawable" /> or a <named-type name="Drawable3D" />, depending on the type of <arg name="obJ" /> and the values of <arg name="transform" /> and <arg name="draw" />.  Non-geometric values result in <named-type name="Drawable" />.</p>
71                                 <p><arg name="transform" /> means the tagged object shall try to preserve the geometric nature of <arg name="obj" />, while <arg name="draw" /> means that the drawable nature should be preserved.  Note that a drawable object is also geometric.</p>
72                                 <p>Tagged objects are useful for many purposes.  At the lowest level, they may be retrieved later by their key, and they can be referred to for removal from a group state.</p>
73                         </description>
74                         <see-also>
75                                 <value name="find" /> <value name="findall" /> <value name="remove" />
76                         </see-also>
77                 </case>
78         </function>
79 </system-binding>
81 <system-binding identifier="find">
82         <function>
83                 <case>
84                         <arguments>
85                                 <arg identifier="container">
86                                         <type><named-type name="Group" /></type>
87                                 </arg>
88                                 <arg identifier="key">
89                                         <type><named-type name="Symbol" /></type>
90                                 </arg>
91                         </arguments>
92                         <result>
93                                 <type><named-type name="Value" /></type>
94                         </result>
95                         <dynamic-references></dynamic-references>
96                         <description>
97                                 <p>Retrieves one value tagged with <arg name="key" />.  It is an error if the key is not present in <arg name="container" />.</p>
98                         </description>
99                         <see-also>
100                                 <value name="tag" /> <value name="findall" />
101                         </see-also>
102                 </case>
103                 <case>
104                         <arguments>
105                                 <arg identifier="container">
106                                         <type><named-type name="Group3D" /></type>
107                                 </arg>
108                                 <arg identifier="key">
109                                         <type><named-type name="Symbol" /></type>
110                                 </arg>
111                         </arguments>
112                         <result>
113                                 <type><named-type name="Value" /></type>
114                         </result>
115                         <dynamic-references></dynamic-references>
116                         <description>
117                                 <p>See the <str-2D /> case.</p>
118                         </description>
119                 </case>
120         </function>
121 </system-binding>
123 <system-binding identifier="findall">
124         <function>
125                 <case>
126                         <arguments>
127                                 <arg identifier="container">
128                                         <type><named-type name="Group" /></type>
129                                 </arg>
130                                 <arg identifier="key">
131                                         <type><named-type name="Symbol" /></type>
132                                 </arg>
133                         </arguments>
134                         <result>
135                                 <type><named-type name="Vector" /></type>
136                         </result>
137                         <dynamic-references></dynamic-references>
138                         <description>
139                                 <p>Retrieves all values tagged with <arg name="key" />.</p>
140                         </description>
141                         <see-also>
142                                 <value name="tag" /> <value name="find" />
143                         </see-also>
144                 </case>
145                 <case>
146                         <arguments>
147                                 <arg identifier="container">
148                                         <type><named-type name="Group3D" /></type>
149                                 </arg>
150                                 <arg identifier="key">
151                                         <type><named-type name="Symbol" /></type>
152                                 </arg>
153                         </arguments>
154                         <result>
155                                 <type><named-type name="Vector" /></type>
156                         </result>
157                         <dynamic-references></dynamic-references>
158                         <description>
159                                 <p>See the <str-2D /> case.</p>
160                         </description>
161                 </case>
162         </function>
163 </system-binding>
165 <system-binding identifier="locate">
166         <function>
167                 <case>
168                         <arguments>
169                                 <arg>
170                                         <type><named-type name="Value" /></type>
171                                 </arg>
172                         </arguments>
173                         <result>
174                                 <type><named-type name="Value" /></type>
175                         </result>
176                         <dynamic-references></dynamic-references>
177                         <description>
178                                 <p><em>Mutates</em> the value in order to associate it with the abstract syntax tree node of the argument passed to this function.</p>
179                         </description>
180                         <see-also>
181                                 <value name="sourceof" />
182                         </see-also>
183                 </case>
184         </function>
185 </system-binding>
187 <system-binding identifier="sourceof">
188         <function>
189                 <case constructor-of="String">
190                         <arguments>
191                                 <arg>
192                                         <type><named-type name="Value" /></type>
193                                 </arg>
194                         </arguments>
195                         <dynamic-references></dynamic-references>
196                         <description>
197                                 <p>Returns the source code string determined by the abstract syntax tree node associated with the argument.  The value needs to be properly prepared using <value name="locate" />.</p>
198                         </description>
199                 </case>
200         </function>
201 </system-binding>
203 </section>