root/trunk/luigi/doc/base.html

Revision 36, 18.2 kB (checked in by baxissimo, 2 years ago)

First cut at docs using Candydoc.

Line 
1 <html><head>
2 <meta http-equiv="content-type" content="text/html; charset=utf-8">
3 <meta content="text/javascript" http-equiv="content-script-type">
4 <title>luigi.base</title>
5 <link rel="stylesheet" type="text/css" href="candydoc/style.css">
6 <!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="candydoc/ie56hack.css"><![endif]-->
7 <script language="JavaScript" src="candydoc/util.js" type="text/javascript"></script>
8 <script language="JavaScript" src="candydoc/tree.js" type="text/javascript"></script>
9 <script language="JavaScript" src="candydoc/explorer.js" type="text/javascript"></script>
10 </head><body>
11 <div id="tabarea"></div><div id="explorerclient"></div>
12 <div id="content"><script>explorer.initialize("luigi.base");</script>
13     <table class="content">
14         <tr><td id="docbody"><h1>luigi.base</h1><!-- Generated by Ddoc from base.d -->
15 <br><br>
16
17 <script>explorer.outline.incSymbolLevel();</script>
18 <dl>
19 <script>explorer.outline.writeEnabled = true;</script>
20 <dt><span class="decl">struct
21 <span class="currsymbol">Rect</span>
22 <script>explorer.outline.addDecl('Rect');</script>
23
24 ;
25 </span></dt>
26 <script>explorer.outline.writeEnabled = false;</script>
27
28
29 <dd>Rectangle class.  Size and position are stored in floating point.
30  
31 <br><br>
32
33
34 <script>explorer.outline.incSymbolLevel();</script>
35 <dl>
36 <script>explorer.outline.writeEnabled = true;</script>
37 <dt><span class="decl">static Rect 
38 <span class="currsymbol">opCall</span>
39 <script>explorer.outline.addDecl('opCall');</script>
40
41 (float <span class="funcparam">rx</span> = cast(float)0, float <span class="funcparam">ry</span> = cast(float)0, float <span class="funcparam">rwidth</span> = cast(float)0, float <span class="funcparam">rheight</span> = cast(float)0);
42 </span></dt>
43 <script>explorer.outline.writeEnabled = false;</script>
44
45
46 <dd>Rect constructor
47 <br><br>
48
49 </dd>
50
51 <script>explorer.outline.writeEnabled = true;</script>
52 <dt><span class="decl">void
53 <span class="currsymbol">set</span>
54 <script>explorer.outline.addDecl('set');</script>
55
56 (float <span class="funcparam">xpos</span>, float <span class="funcparam">ypos</span>, float <span class="funcparam">rwidth</span>, float <span class="funcparam">rheight</span>);
57 </span></dt>
58 <script>explorer.outline.writeEnabled = false;</script>
59
60
61 <dd>Set value using left,top,width,height convention
62 <br><br>
63
64 </dd>
65
66 <script>explorer.outline.writeEnabled = true;</script>
67 <dt><span class="decl">void
68 <span class="currsymbol">setLTRB</span>
69 <script>explorer.outline.addDecl('setLTRB');</script>
70
71 (float <span class="funcparam">leftx</span>, float <span class="funcparam">topy</span>, float <span class="funcparam">rightx</span>, float <span class="funcparam">bottomy</span>);
72 </span></dt>
73 <script>explorer.outline.writeEnabled = false;</script>
74
75
76 <dd>Set value using left,top,right,bottom convention
77 <br><br>
78
79 </dd>
80
81 <script>explorer.outline.writeEnabled = true;</script>
82 <dt><span class="decl">bool
83 <span class="currsymbol">contains</span>
84 <script>explorer.outline.addDecl('contains');</script>
85
86 (float <span class="funcparam">px</span>, float <span class="funcparam">py</span>);
87 </span></dt>
88 <script>explorer.outline.writeEnabled = false;</script>
89
90
91 <dd>Point-inside-rect test
92 <br><br>
93
94 </dd>
95
96 <script>explorer.outline.writeEnabled = true;</script>
97 <dt><span class="decl">void
98 <span class="currsymbol">enclose</span>
99 <script>explorer.outline.addDecl('enclose');</script>
100
101 (Rect <span class="funcparam">o</span>);
102 </span></dt>
103 <script>explorer.outline.writeEnabled = false;</script>
104
105
106 <dd>Intersection of two rects.
107 <br><br>
108 Grow rect to
109 <span class="currsymbol">enclose</span>
110 <script>explorer.outline.addDecl('enclose');</script>
111
112  other rect (union of rects.)
113 <br><br>
114
115 </dd>
116
117 <script>explorer.outline.writeEnabled = true;</script>
118 <dt><span class="decl">void
119 <span class="currsymbol">enclose</span>
120 <script>explorer.outline.addDecl('enclose');</script>
121
122 (Size <span class="funcparam">p</span>);
123 </span></dt>
124 <script>explorer.outline.writeEnabled = false;</script>
125
126
127 <dd>Grow rect to
128 <span class="currsymbol">enclose</span>
129 <script>explorer.outline.addDecl('enclose');</script>
130
131  point <span class="funcparam">p</span>.
132 <br><br>
133
134 </dd>
135 </dl>
136 <script>explorer.outline.decSymbolLevel();</script>
137
138
139 </dd>
140
141 <script>explorer.outline.writeEnabled = true;</script>
142 <dt><span class="decl">struct
143 <span class="currsymbol">Size</span>
144 <script>explorer.outline.addDecl('Size');</script>
145
146 ;
147 </span></dt>
148 <script>explorer.outline.writeEnabled = false;</script>
149
150
151 <dd>
152 <span class="currsymbol">Size</span>
153 <script>explorer.outline.addDecl('Size');</script>
154
155  is used to describe the width and height of a box.
156     Width is given by size.width, and height by size.height
157     Several synonyms are provided for the .w and .h properties.
158     .width is equivalent to .w or .x.
159     .height is equivalent to .h or .y.
160  
161 <br><br>
162
163
164 <script>explorer.outline.incSymbolLevel();</script>
165 <dl>
166 <script>explorer.outline.writeEnabled = true;</script>
167 <dt><span class="decl">static Size 
168 <span class="currsymbol">opCall</span>
169 <script>explorer.outline.addDecl('opCall');</script>
170
171 (float <span class="funcparam">_w</span>, float <span class="funcparam">_h</span>);
172 </span></dt>
173 <script>explorer.outline.writeEnabled = false;</script>
174
175
176 <dd>Constructor
177 <br><br>
178
179 </dd>
180
181 <script>explorer.outline.writeEnabled = true;</script>
182 <dt><span class="decl">void
183 <span class="currsymbol">opAddAssign</span>
184 <script>explorer.outline.addDecl('opAddAssign');</script>
185
186 (Size <span class="funcparam">o</span>);
187 </span></dt>
188 <script>explorer.outline.writeEnabled = false;</script>
189
190
191 <dd>Allows Sizes to be added to using s1 += s2.
192 <br><br>
193
194 </dd>
195
196 <script>explorer.outline.writeEnabled = true;</script>
197 <dt><span class="decl">void
198 <span class="currsymbol">opSubAssign</span>
199 <script>explorer.outline.addDecl('opSubAssign');</script>
200
201 (Size <span class="funcparam">o</span>);
202 </span></dt>
203 <script>explorer.outline.writeEnabled = false;</script>
204
205
206 <dd>Allows Sizes to be subtracted from using s1 += s2.
207 <br><br>
208
209 </dd>
210
211 <script>explorer.outline.writeEnabled = true;</script>
212 <dt><span class="decl">void
213 <span class="currsymbol">opMulAssign</span>
214 <script>explorer.outline.addDecl('opMulAssign');</script>
215
216 (float <span class="funcparam">d</span>);
217 </span></dt>
218 <script>explorer.outline.writeEnabled = false;</script>
219
220
221 <dd>Allows Sizes to be multiplied by a scalar
222 <br><br>
223
224 </dd>
225
226 <script>explorer.outline.writeEnabled = true;</script>
227 <dt><span class="decl">char[]
228 <span class="currsymbol">toString</span>
229 <script>explorer.outline.addDecl('toString');</script>
230
231 ();
232 </span></dt>
233 <script>explorer.outline.writeEnabled = false;</script>
234
235
236 <dd>Return a printable representation of the Size
237 <br><br>
238
239 </dd>
240 </dl>
241 <script>explorer.outline.decSymbolLevel();</script>
242
243
244 </dd>
245
246 <script>explorer.outline.writeEnabled = true;</script>
247 <dt><span class="decl">alias
248 <span class="currsymbol">Point</span>
249 <script>explorer.outline.addDecl('Point');</script>
250
251 ;
252 </span></dt>
253 <script>explorer.outline.writeEnabled = false;</script>
254
255
256 <dd>
257 <span class="currsymbol">Point</span>
258 <script>explorer.outline.addDecl('Point');</script>
259
260  can be used as an alias for Size.
261     This is not a typedef so there is no compiler enforcement of the distinction,
262     but you can use
263 <span class="currsymbol">Point</span>
264 <script>explorer.outline.addDecl('Point');</script>
265
266  vs Size as the situation dictates to indicate the
267     intent of the variable, be it a location or a displacement.
268  
269 <br><br>
270
271 </dd>
272
273 <script>explorer.outline.writeEnabled = true;</script>
274 <dt><span class="decl">struct
275 <span class="currsymbol">Color</span>
276 <script>explorer.outline.addDecl('Color');</script>
277
278 ;
279 </span></dt>
280 <script>explorer.outline.writeEnabled = false;</script>
281
282
283 <dd>
284 <span class="currsymbol">Color</span>
285 <script>explorer.outline.addDecl('Color');</script>
286
287  represents a standard 4-byte RGBA color value.
288     It is the type used to represent colors througout Luigi.
289    
290 <span class="currsymbol">Color</span>
291 <script>explorer.outline.addDecl('Color');</script>
292
293  components can be accessed via .r, .g, .b, and .a properties.
294     Alternatively, one can use numerical indexing, e.g. c[0],c[1],c[2],c[3].
295  
296 <br><br>
297
298
299 <script>explorer.outline.incSymbolLevel();</script>
300 <dl>
301 <script>explorer.outline.writeEnabled = true;</script>
302 <dt><span class="decl">static Color 
303 <span class="currsymbol">opCall</span>
304 <script>explorer.outline.addDecl('opCall');</script>
305
306 (int <span class="funcparam">r_</span>, int <span class="funcparam">g_</span>, int <span class="funcparam">b_</span>, int <span class="funcparam">a_</span> = 255);
307 </span></dt>
308 <script>explorer.outline.writeEnabled = false;</script>
309
310
311 <dd>Constructor using integral values in the range 0--255
312 <br><br>
313
314 </dd>
315
316 <script>explorer.outline.writeEnabled = true;</script>
317 <dt><span class="decl">static Color 
318 <span class="currsymbol">opCall</span>
319 <script>explorer.outline.addDecl('opCall');</script>
320
321 (float <span class="funcparam">r_</span>, float <span class="funcparam">g_</span>, float <span class="funcparam">b_</span>, float <span class="funcparam">a_</span> = 1F);
322 </span></dt>
323 <script>explorer.outline.writeEnabled = false;</script>
324
325
326 <dd>Constructor using floating point  values in the range 0.0--1.0
327 <br><br>
328
329 </dd>
330
331 <script>explorer.outline.writeEnabled = true;</script>
332 <dt><span class="decl">void
333 <span class="currsymbol">set</span>
334 <script>explorer.outline.addDecl('set');</script>
335
336 (int <span class="funcparam">r_</span>, int <span class="funcparam">g_</span>, int <span class="funcparam">b_</span>, int <span class="funcparam">a_</span> = 255);
337 </span></dt>
338 <script>explorer.outline.writeEnabled = false;</script>
339
340
341 <dd>Setter using integral values in the range 0--255
342 <br><br>
343
344 </dd>
345
346 <script>explorer.outline.writeEnabled = true;</script>
347 <dt><span class="decl">void
348 <span class="currsymbol">set</span>
349 <script>explorer.outline.addDecl('set');</script>
350
351 (float <span class="funcparam">r_</span>, float <span class="funcparam">g_</span>, float <span class="funcparam">b_</span>, float <span class="funcparam">a_</span> = 1F);
352 </span></dt>
353 <script>explorer.outline.writeEnabled = false;</script>
354
355
356 <dd>Setter using floating point  values in the range 0.0--1.0
357 <br><br>
358
359 </dd>
360
361 <script>explorer.outline.writeEnabled = true;</script>
362 <dt><span class="decl">static Color 
363 <span class="currsymbol">lerp</span>
364 <script>explorer.outline.addDecl('lerp');</script>
365
366 (Color <span class="funcparam">c1</span>, Color <span class="funcparam">c2</span>, float <span class="funcparam">t</span>);
367 </span></dt>
368 <script>explorer.outline.writeEnabled = false;</script>
369
370
371 <dd>Linearly interpolate between the two colors.
372 <br><br>
373 <b>Params:</b><br>
374 <table><tr>
375 <td nowrap valign="top" style="padding-right: 8px">Color <span class="funcparam">c1</span></td>
376
377                
378 <td>the first color</td></tr>
379 <tr>
380 <td nowrap valign="top" style="padding-right: 8px">Color <span class="funcparam">c2</span></td>
381
382                
383 <td>the second color</td></tr>
384 <tr>
385 <td nowrap valign="top" style="padding-right: 8px">float <span class="funcparam">t</span></td>
386
387                
388 <td>the interpolation parameter between 0 and 1</td></tr>
389 </table><br>
390 <b>Returns:</b><br>
391 the blended color
392                  If <span class="funcparam">t</span>==0 then the result is <span class="funcparam">c1</span>
393                  If <span class="funcparam">t</span>==1 then the result is <span class="funcparam">c2</span>
394    
395 <br><br>
396
397 </dd>
398
399 <script>explorer.outline.writeEnabled = true;</script>
400 <dt><span class="decl">ubyte
401 <span class="currsymbol">opIndex</span>
402 <script>explorer.outline.addDecl('opIndex');</script>
403
404 (int <span class="funcparam">i</span>);
405 </span></dt>
406 <script>explorer.outline.writeEnabled = false;</script>
407
408
409 <dd>Allows a color to be indexed with brackets [].
410         R,G,B,A components correspond to indexes 0,1,2,3.
411      
412 <br><br>
413
414 </dd>
415
416 <script>explorer.outline.writeEnabled = true;</script>
417 <dt><span class="decl">ubyte*
418 <span class="currsymbol">ptr</span>
419 <script>explorer.outline.addDecl('ptr');</script>
420
421 ();
422 </span></dt>
423 <script>explorer.outline.writeEnabled = false;</script>
424
425
426 <dd>Return a pointer to the beginning of the 4 bytes that
427   make up this color.  Bytes are ordered R,G,B,A.
428      
429 <br><br>
430
431 </dd>
432 </dl>
433 <script>explorer.outline.decSymbolLevel();</script>
434
435
436 </dd>
437
438 <script>explorer.outline.writeEnabled = true;</script>
439 <dt><span class="decl">template
440 <span class="currsymbol">largestOrConvertible</span>
441 <script>explorer.outline.addDecl('largestOrConvertible');</script>
442
443 (T,U)</span></dt>
444 <script>explorer.outline.writeEnabled = false;</script>
445
446
447 <dd>Returns the largest of the two supplied types, or the first type if
448  the sizes are identical.  If either type is an object then both must
449  be objects of either the same type or where one is a base class of
450  the other.  Interfaces are not supported.  Used by min() and max() templates.
451  
452 <br><br>
453
454
455 <script>explorer.outline.incSymbolLevel();</script>
456 <dl></dl>
457 <script>explorer.outline.decSymbolLevel();</script>
458
459
460 </dd>
461
462 <script>explorer.outline.writeEnabled = true;</script>
463 <dt><span class="decl">largestOrConvertible!(T,U).largestOf
464 <span class="currsymbol">max</span>
465 <script>explorer.outline.addDecl('max');</script>
466
467 (T,U)(T <span class="funcparam">t</span>, U <span class="funcparam">u</span>);
468 </span></dt>
469 <script>explorer.outline.writeEnabled = false;</script>
470
471
472 <dd>Returns the maximum of two values
473 <br><br>
474
475 </dd>
476
477 <script>explorer.outline.writeEnabled = true;</script>
478 <dt><span class="decl">largestOrConvertible!(T,U).largestOf
479 <span class="currsymbol">min</span>
480 <script>explorer.outline.addDecl('min');</script>
481
482 (T,U)(T <span class="funcparam">t</span>, U <span class="funcparam">u</span>);
483 </span></dt>
484 <script>explorer.outline.writeEnabled = false;</script>
485
486
487 <dd>Returns the minimum of two values
488 <br><br>
489
490 </dd>
491
492 <script>explorer.outline.writeEnabled = true;</script>
493 <dt><span class="decl">T
494 <span class="currsymbol">drop</span>
495 <script>explorer.outline.addDecl('drop');</script>
496
497 (T)(inout T[] <span class="funcparam">haystack</span>, size_t <span class="funcparam">index</span>);
498 </span></dt>
499 <script>explorer.outline.writeEnabled = false;</script>
500
501
502 <dd>Remove an item from an array by index, and return it.
503  
504 <br><br>
505
506 </dd>
507
508 <script>explorer.outline.writeEnabled = true;</script>
509 <dt><span class="decl">T
510 <span class="currsymbol">drop_item</span>
511 <script>explorer.outline.addDecl('drop_item');</script>
512
513 (T)(inout T[] <span class="funcparam">haystack</span>, T <span class="funcparam">item</span>);
514 </span></dt>
515 <script>explorer.outline.writeEnabled = false;</script>
516
517
518 <dd>Remove an item from an array by value, and return it.
519   (modified from Cashew.utils)
520  
521 <br><br>
522
523 </dd>
524
525 <script>explorer.outline.writeEnabled = true;</script>
526 <dt><span class="decl">T[]
527 <span class="currsymbol">drop_range</span>
528 <script>explorer.outline.addDecl('drop_range');</script>
529
530 (T)(inout T[] <span class="funcparam">arr</span>, int <span class="funcparam">start</span>, int <span class="funcparam">end</span>);
531 </span></dt>
532 <script>explorer.outline.writeEnabled = false;</script>
533
534
535 <dd>Remove a range of elements from an array in place.
536  It is not an error for the range to be empty or for start to be greater than end.
537  If so, the array is not modified.
538  Out of bounds checks performed only in debug mode.
539 <br><br>
540 <b>Returns:</b><br>
541 the array, which (is modified in-place).
542 <br><br>
543 <b>Note:</b><br>
544 This is an O(n) operation.
545  
546 <br><br>
547
548 </dd>
549
550 <script>explorer.outline.writeEnabled = true;</script>
551 <dt><span class="decl">size_t
552 <span class="currsymbol">find</span>
553 <script>explorer.outline.addDecl('find');</script>
554
555 (T)(T[] <span class="funcparam">haystack</span>, bool delegate(T) <span class="funcparam">dg</span>);
556 </span></dt>
557 <script>explorer.outline.writeEnabled = false;</script>
558
559
560 <dd>Lookup the index of the first element of an array that satisfies a delegate.
561 <br><br>
562 <b>Returns:</b><br>
563 the index of the value or NOT_FOUND if not found.
564  
565 <br><br>
566
567 </dd>
568
569 <script>explorer.outline.writeEnabled = true;</script>
570 <dt><span class="decl">size_t
571 <span class="currsymbol">find_item</span>
572 <script>explorer.outline.addDecl('find_item');</script>
573
574 (T)(T[] <span class="funcparam">haystack</span>, T <span class="funcparam">cmp</span>);
575 </span></dt>
576 <script>explorer.outline.writeEnabled = false;</script>
577
578
579 <dd>Lookup the index of the first element of an array that equals a given value
580 <br><br>
581 <b>Returns:</b><br>
582 the index of the value or NOT_FOUND if not found.
583  
584 <br><br>
585
586 </dd>
587
588 <script>explorer.outline.writeEnabled = true;</script>
589 <dt><span class="decl">bool
590 <span class="currsymbol">contains</span>
591 <script>explorer.outline.addDecl('contains');</script>
592
593 (T)(T[] <span class="funcparam">haystack</span>, T <span class="funcparam">cmp</span>);
594 </span></dt>
595 <script>explorer.outline.writeEnabled = false;</script>
596
597
598 <dd>Return whether a particular item is in an array
599  
600 <br><br>
601
602 </dd>
603 </dl>
604 <script>explorer.outline.decSymbolLevel();</script>
605
606
607 </td></tr>
608         <tr><td id="docfooter">
609             Page was generated with
610             <img src="candydoc/img/candydoc.gif" style="vertical-align:middle; position:relative; top:-1px">
611             on Wed Dec  6 09:51:44 2006
612
613         </td></tr>
614     </table>
615 </div>
616 <script>
617     explorer.packageExplorer.addModule("luigi.base");
618     explorer.packageExplorer.addModule("luigi.arranger");
619     explorer.packageExplorer.addModule("luigi.adapter");
620     explorer.packageExplorer.addModule("luigi.adapters.gld");
621     explorer.packageExplorer.addModule("luigi.adapters.glfw");
622     explorer.packageExplorer.addModule("luigi.event");
623     explorer.packageExplorer.addModule("luigi.font");
624     explorer.packageExplorer.addModule("luigi.gldraw");
625     explorer.packageExplorer.addModule("luigi.gui");
626     explorer.packageExplorer.addModule("luigi.theme");
627     explorer.packageExplorer.addModule("luigi.themes.std");
628     explorer.packageExplorer.addModule("luigi.themes.dxut");
629     explorer.packageExplorer.addModule("luigi.opengl");
630     explorer.packageExplorer.addModule("luigi.signalobj");
631     explorer.packageExplorer.addModule("wrapres");</script>
632 </body></html>
Note: See TracBrowser for help on using the browser.