Include a header file required for build on mac 10.4
[supercollider.git] / Help / GUI / GUI-Tools / FlowLayout.html
blob99e32e53ed0da629079b426b7e6ddc01af1dc90d
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta http-equiv="Content-Style-Type" content="text/css">
6 <title></title>
7 <meta name="Generator" content="Cocoa HTML Writer">
8 <meta name="CocoaVersion" content="949.54">
9 <style type="text/css">
10 p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
11 p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
12 p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; min-height: 12.0px}
13 p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color: #0000bf}
14 p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Helvetica}
15 p.p6 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco; min-height: 12.0px}
16 p.p7 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica}
17 p.p8 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica; min-height: 14.0px}
18 p.p9 {margin: 0.0px 0.0px 0.0px 85.0px; text-indent: -85.0px; font: 12.0px Helvetica}
19 p.p10 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco}
20 p.p11 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco; color: #bf0000}
21 p.p12 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 14.0px Helvetica}
22 span.s1 {font: 18.0px Helvetica}
23 span.s2 {color: #0000bf}
24 span.s3 {color: #0000bf}
25 span.s4 {color: #0000bf}
26 span.s5 {color: #000000}
27 span.s6 {text-decoration: underline}
28 span.s7 {color: #0000bf}
29 span.s8 {color: #0000bf}
30 span.s9 {color: #bf0000}
31 span.s10 {color: #0000bf}
32 span.s11 {color: #0000bf}
33 span.s12 {color: #0000bf}
34 span.s13 {font: 14.0px Helvetica}
35 span.s14 {color: #4d4d4d}
36 span.Apple-tab-span {white-space:pre}
37 </style>
38 </head>
39 <body>
40 <p class="p1"><span class="s1"><b>FlowLayout<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b></span><b>a view decorator which autowraps the view contents</b><span class="s1"><b><span class="Apple-tab-span"> </span></b></span></p>
41 <p class="p2"><br></p>
42 <p class="p1"><b>Inherits from: </b><a href="../../Core/Object.html"><span class="s2"><b>Object</b></span></a></p>
43 <p class="p3"><br></p>
44 <p class="p1">FlowLayout is a decorator which automatically arranges views inside a container view in a row, and starts a new row if there is not enough space left for the next view. <a href="../Cocoa-GUI/SCWindow.html"><span class="s3">SCWindow</span></a> and <a href="../Cocoa-GUI/SCCompositeView.html"><span class="s4">SCCompositeView</span></a> both have addFlowLayout methods which assign FlowLayout to their view decorators and return the decorator.</p>
45 <p class="p2"><br></p>
46 <p class="p4"><span class="s5"><b>See also: </b><a href="../Cocoa-GUI/SCContainerView.html"><span class="s6">SCContainerView</span></a>, <a href="../Cocoa-GUI/SCCompositeView.html"><span class="s6">CompositeView</span></a>, <a href="../Cocoa-GUI/SCTopView.html"><span class="s6">SCTopView</span></a></span></p>
47 <p class="p2"><br></p>
48 <p class="p5"><b>Creation / Class Methods</b></p>
49 <p class="p6"><br></p>
50 <p class="p7"><b><span class="Apple-tab-span"> </span>*new (bounds, margin, gap)</b></p>
51 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
52 <p class="p7"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>bounds </b>- An instance of Rect. Normally set to the parent.bounds.</p>
53 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>margin </b>- An instance of <a href="../../Geometry/Point.html"><span class="s7">Point</span></a>. The horizontal and vertical inner margins, within which the parent's subviews are placed.</p>
54 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>gap </b>- An instance of <a href="../../Geometry/Point.html"><span class="s7">Point</span></a>. The horizontal and vertical layout gap between the subviews.</p>
55 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
56 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>(</p>
57 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w = <span class="s8">Window</span>.new.front;</p>
58 <p class="p11"><span class="s5"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>//change the gaps and margins to see how they work</p>
59 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w.view.decorator = <span class="s8">FlowLayout</span>( w.view.bounds, 10@10, 20@5 );</p>
60 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>16.do{ <span class="s8">Slider2D</span>( w.view,80@80 ).background_( <span class="s8">Color</span>.rand ) };</p>
61 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>)</p>
62 <p class="p6"><br></p>
63 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>You can also write:</p>
64 <p class="p6"><br></p>
65 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>(</p>
66 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w = <span class="s8">Window</span>.new.front;</p>
67 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w.addFlowLayout( 10@10, 20@5 ); <span class="s9">// a shortcut method, see <a href="../Cocoa-GUI/SCContainerView.html"><span class="s10">SCContainerView</span></a></span></p>
68 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>16.do{ <span class="s8">Slider2D</span>( w.view,80@80 ).background_( <span class="s8">Color</span>.rand ) };</p>
69 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>)</p>
70 <p class="p6"><br></p>
71 <p class="p6"><br></p>
72 <p class="p12"><b>Accessing Instance and Class Variables</b></p>
73 <p class="p8"><span class="Apple-tab-span"> </span></p>
74 <p class="p7"><b><span class="Apple-tab-span"> </span>nextLine</b></p>
75 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
76 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>Forces the decorator to start a new line:</p>
77 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
78 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>(</p>
79 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w = <span class="s8">Window</span>.new;</p>
80 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>q = w.addFlowLayout( 10@10, 20@5 );</p>
81 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s8">Slider2D</span>( w.view,140@140 ).background_( <span class="s8">Color</span>.rand );</p>
82 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>q.nextLine;</p>
83 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s8">Slider2D</span>( w.view,140@140 ).background_( <span class="s8">Color</span>.rand );</p>
84 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w.front;</p>
85 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>)</p>
86 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
87 <p class="p7"><b><span class="Apple-tab-span"> </span>indentedRemaining</b></p>
88 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
89 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>Returns and instance of <a href="../../Geometry/Rect.html"><span class="s11">Rect</span></a>. This is a very useful method which tells you how much space is left in a row, before the next row starts. The height of <b>indentedRemaining,</b> is the full height remaining in the FlowLayout.</p>
90 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
91 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>(</p>
92 <p class="p11"><span class="s5"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>//normally you will only use the width of indentedRemaining</p>
93 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w = <span class="s8">Window</span>.new;</p>
94 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w.view.decorator = d = <span class="s8">FlowLayout</span>.new( w.view.bounds, 10@10, 20@5 );</p>
95 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s8">Slider2D</span>( w.view,150@150 ).background_( <span class="s8">Color</span>.rand );</p>
96 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s8">Slider2D</span>( w.view,150@150 ).background_( <span class="s8">Color</span>.rand );</p>
97 <p class="p11"><span class="s5"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span><span class="s8">Slider</span><span class="s5">( w.view, d.indentedRemaining.width@150) </span>//fits this view perfeclty to the right innerBounds</p>
98 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>.background_( <span class="s8">Color</span>.rand );</p>
99 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w.front;</p>
100 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>)</p>
101 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
102 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>Compare this with:</p>
103 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
104 <p class="p11"><span class="s5"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>( </span>//here the third view is fit to both the right and bottom innerBounds</p>
105 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w = <span class="s8">Window</span>.new;</p>
106 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w.view.decorator = d = <span class="s8">FlowLayout</span>.new( w.view.bounds, 10@10, 20@5 );</p>
107 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s8">Slider2D</span>( w.view,140@140 ).background_( <span class="s8">Color</span>.rand );</p>
108 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s8">Slider2D</span>( w.view,140@140 ).background_( <span class="s8">Color</span>.rand );</p>
109 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>d.nextLine;</p>
110 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s8">Slider2D</span>( w.view, d.indentedRemaining ).background_( <span class="s8">Color</span>.rand );</p>
111 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w.front;</p>
112 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>)</p>
113 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
114 <p class="p7"><b><span class="Apple-tab-span"> </span>bounds</b></p>
115 <p class="p7"><b><span class="Apple-tab-span"> </span>bounds_ (b)</b></p>
116 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
117 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>The outer bounds in which the decorator places the subviews in the parent view</p>
118 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>b</b> - An instance of <a href="../../Geometry/Rect.html"><span class="s12">Rect</span></a> .</p>
119 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b><span class="Apple-tab-span"> </span></b></p>
120 <p class="p7"><b><span class="Apple-tab-span"> </span>innerBounds</b></p>
121 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
122 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>Returns the <b>bounds</b> inset by <b>margin</b></p>
123 <p class="p8"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b></p>
124 <p class="p7"><b><span class="Apple-tab-span"> </span>gap_(arg1)</b></p>
125 <p class="p7"><b><span class="Apple-tab-span"> </span>gap</b></p>
126 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>The horizontal and vertical layout gap between the subviews.</p>
127 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>arg1 </b>-<b> </b>An instance of <a href="../../Geometry/Point.html"><span class="s7">Point</span></a>.</p>
128 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
129 <p class="p7"><b><span class="Apple-tab-span"> </span>margin_(arg1)</b></p>
130 <p class="p7"><b><span class="Apple-tab-span"> </span>margin</b></p>
131 <p class="p8"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b></p>
132 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>The horizontal and vertical inner margins, within which the parent's subviews are placed.</p>
133 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>arg1 </b>- An instance of <a href="../../Geometry/Point.html"><span class="s7">Point</span></a>.</p>
134 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
135 <p class="p12"><b>Subclassing and Internal Methods</b></p>
136 <p class="p7"><span class="s13"><span class="Apple-tab-span"> </span></span>The following methods are usually not used directly or are called by a primitive. Programmers can still call or override these as needed.</p>
137 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b><span class="Apple-tab-span"> </span></b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
138 <p class="p7"><b><span class="Apple-tab-span"> </span>left_(arg1)</b></p>
139 <p class="p7"><b><span class="Apple-tab-span"> </span>left</b></p>
140 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>Get the current left indentation or manually set it.</p>
141 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>arg1 </b>- A number;</p>
142 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
143 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>(</p>
144 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w = <span class="s8">Window</span>.new;</p>
145 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w.view.decorator = d = <span class="s8">FlowLayout</span>.new( w.view.bounds, 10@10, 20@5 );</p>
146 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s8">Slider2D</span>( w.view,150@150 ).background_( <span class="s8">Color</span>.rand );</p>
147 <p class="p11"><span class="s5"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>d.left_(220); </span>//manually set the new indentation</p>
148 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s8">Slider2D</span>( w.view,150@150 ).background_( <span class="s8">Color</span>.rand );</p>
149 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w.front;</p>
150 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>)</p>
151 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
152 <p class="p7"><b><span class="Apple-tab-span"> </span>top_(arg1)</b></p>
153 <p class="p7"><b><span class="Apple-tab-span"> </span>top</b></p>
154 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>Get the current top indentation or manually set it.</p>
155 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>arg1 </b>- A number;</p>
156 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
157 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>(</p>
158 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w = <span class="s8">Window</span>.new;</p>
159 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w.view.decorator = d = <span class="s8">FlowLayout</span>.new( w.view.bounds, 10@10, 20@5 );</p>
160 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s8">Slider2D</span>( w.view,150@150 ).background_( <span class="s8">Color</span>.rand );</p>
161 <p class="p11"><span class="s5"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>d.top_(50); </span>//manually set the new indentation</p>
162 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s8">Slider2D</span>( w.view,150@150 ).background_( <span class="s8">Color</span>.rand );</p>
163 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s8">Slider2D</span>( w.view,150@150 ).background_( <span class="s8">Color</span>.rand );</p>
164 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w.front;</p>
165 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>)</p>
166 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
167 <p class="p7"><b><span class="Apple-tab-span"> </span>shift (x, y)</b></p>
168 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
169 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>Set the current <b>left</b> and <b>top</b> indentation (see above).</p>
170 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
171 <p class="p7"><b><span class="Apple-tab-span"> </span>maxHeight_(arg1)</b></p>
172 <p class="p7"><b><span class="Apple-tab-span"> </span>maxHeight</b></p>
173 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
174 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>Get/set maximium height of the subviews in the current position.</p>
175 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>arg1 </b>- A number;</p>
176 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
177 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>(</p>
178 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w = <span class="s8">Window</span>.new;</p>
179 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w.view.decorator = d = <span class="s8">FlowLayout</span>.new( w.view.bounds, 10@10, 20@5 );</p>
180 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s8">Slider2D</span>( w.view,100@160 ).background_( <span class="s8">Color</span>.rand );</p>
181 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s8">Slider2D</span>( w.view,150@150 ).background_( <span class="s8">Color</span>.rand );</p>
182 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s14">"first row maxHeight: "</span> ++ d.maxHeight.postln;</p>
183 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s8">Slider2D</span>( w.view,150@150 ).background_( <span class="s8">Color</span>.rand );</p>
184 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s14">"second row maxHeight: "</span> ++ d.maxHeight.postln;</p>
185 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w.front;</p>
186 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>)</p>
187 <p class="p8"><br></p>
188 <p class="p7"><b><span class="Apple-tab-span"> </span>maxRight_(arg1)</b></p>
189 <p class="p7"><b><span class="Apple-tab-span"> </span>maxRight</b></p>
190 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
191 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>Get/set maximium right of the subviews in the current position.</p>
192 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>arg1 </b>- A number;</p>
193 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
194 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>(</p>
195 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w = <span class="s8">Window</span>.new;</p>
196 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w.view.decorator = d = <span class="s8">FlowLayout</span>.new( w.view.bounds, 10@10, 20@5 );</p>
197 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s8">Slider2D</span>( w.view,100@160 ).background_( <span class="s8">Color</span>.rand );</p>
198 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s14">"first row maxRight: "</span> ++ d.maxRight.postln;</p>
199 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s8">Slider2D</span>( w.view,150@150 ).background_( <span class="s8">Color</span>.rand );</p>
200 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s8">Slider2D</span>( w.view,150@150 ).background_( <span class="s8">Color</span>.rand );</p>
201 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s14">"second row maxRight: "</span> ++ d.maxRight.postln;</p>
202 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w.front;</p>
203 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>)</p>
204 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
205 <p class="p7"><b><span class="Apple-tab-span"> </span>currentBounds</b></p>
206 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
207 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>Gets a Rect with <b>bounds</b>.width and height = <b>top</b> + <b>maxHeight</b>.</p>
208 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
209 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>(</p>
210 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w = <span class="s8">Window</span>.new;</p>
211 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w.view.decorator = d = <span class="s8">FlowLayout</span>.new( w.view.bounds, 10@10, 10@5 );</p>
212 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s8">Slider2D</span>( w.view,100@160 ).background_( <span class="s8">Color</span>.rand );</p>
213 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>d.currentBounds.postln;</p>
214 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s8">Slider2D</span>( w.view,150@150 ).background_( <span class="s8">Color</span>.rand );</p>
215 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>d.currentBounds.postln;</p>
216 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s8">Slider2D</span>( w.view,150@150 ).background_( <span class="s8">Color</span>.rand );</p>
217 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>d.currentBounds.postln;</p>
218 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w.front;</p>
219 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>)</p>
220 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
221 <p class="p7"><b><span class="Apple-tab-span"> </span>used</b></p>
222 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
223 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>Gets a Rect with the space actually used.</p>
224 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
225 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>(</p>
226 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w = <span class="s8">Window</span>.new;</p>
227 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w.view.decorator = d = <span class="s8">FlowLayout</span>.new( w.view.bounds, 10@10, 20@5 );</p>
228 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s8">Slider2D</span>( w.view,100@160 ).background_( <span class="s8">Color</span>.rand );</p>
229 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>d.used.postln;</p>
230 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s8">Slider2D</span>( w.view,150@150 ).background_( <span class="s8">Color</span>.rand );</p>
231 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>d.used.postln;</p>
232 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s8">Slider2D</span>( w.view,150@150 ).background_( <span class="s8">Color</span>.rand );</p>
233 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>d.used.postln;</p>
234 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w.front;</p>
235 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>)</p>
236 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
237 <p class="p7"><b><span class="Apple-tab-span"> </span>reset</b></p>
238 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
239 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>Resets the layout mechanism to 0,0.</p>
240 <p class="p8"><br></p>
241 <p class="p7"><b><span class="Apple-tab-span"> </span>init<span class="Apple-tab-span"> </span></b></p>
242 <p class="p6"><br></p>
243 <p class="p7"><b><span class="Apple-tab-span"> </span>place (view)</b></p>
244 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
245 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
246 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
247 <p class="p6"><br></p>
248 <p class="p3"><br></p>
249 </body>
250 </html>