supernova: c++11 compile fix
[supercollider.git] / Help / GUI / Cocoa-GUI / SCScrollTopView.html
blob0a4a6100eca9ead32dc48fb9d6fe59db487767d3
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.43">
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: #384cb9}
14 p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color: #384cb9; min-height: 14.0px}
15 p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Helvetica}
16 p.p7 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 14.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 57.0px; text-indent: -57.0px; font: 12.0px Helvetica}
19 p.p10 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco}
20 p.p11 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #a41c14}
21 span.s1 {font: 18.0px Helvetica}
22 span.s2 {color: #384cb9}
23 span.s3 {color: #0020f6}
24 span.s4 {color: #000000}
25 span.s5 {text-decoration: underline ; color: #3346ac}
26 span.s6 {color: #3b4eb5}
27 span.s7 {color: #344abf}
28 span.s8 {color: #2c46cb}
29 span.s9 {color: #2040df}
30 span.s10 {color: #0018b8}
31 span.Apple-tab-span {white-space:pre}
32 </style>
33 </head>
34 <body>
35 <p class="p1"><span class="s1"><b>SCScrollTopView<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b></span><b>an SCTopView with scrollers</b><span class="s1"><b><span class="Apple-tab-span"> </span></b></span></p>
36 <p class="p2"><br></p>
37 <p class="p1"><b>Inherits from: </b><a href="../../Core/Object.html"><span class="s2"><b>Object</b></span></a><b> : </b><a href="SCView.html"><span class="s2"><b>SCView</b></span></a><b> : </b><a href="SCContainerView.html"><span class="s3"><b>SCContainerView</b></span></a><b> : </b><a href="SCCompositeView.html"><span class="s2"><b>SCCompositeView</b></span></a><b> : </b><a href="SCTopView.html"><span class="s3"><b>SCTopView</b></span></a></p>
38 <p class="p3"><br></p>
39 <p class="p1">A top level container view which allows the user to scroll across content which exceeds a window's visible bounds. A SCScrollTopView is created for you automatically if you pass true for the scroll argument in SCWindow:new. You do not need to create instances of this class directly.</p>
40 <p class="p2"><br></p>
41 <p class="p4"><span class="s4"><b>See also:</b> <a href="SCWindow.html"><span class="s5">SCWindow</span></a> <a href="../GUI-Tools/GUI.html"><span class="s5">GUI</span></a></span><span class="s6"> <a href="SCScrollView.html"><span class="s2">SCScrollView</span></a></span></p>
42 <p class="p5"><br></p>
43 <p class="p6"><b>Setting the Internal Bounds</b></p>
44 <p class="p2"><br></p>
45 <p class="p1">The size of the contained 'canvas' is determined by the bounds of the views which it encloses. Resize settings are thus ignored for contained views. To set it to a particular size, you can add a <a href="SCCompositeView.html"><span class="s7">SCCompositeView</span></a> or other container view, but there is no direct setter. One should not use a decorator such as FlowLayout directly on a NSScrollTopView, only on a container view within it.</p>
46 <p class="p2"><br></p>
47 <p class="p6"><b>Action Functions with Scrolling SCViews</b></p>
48 <p class="p2"><br></p>
49 <p class="p1">A SCScrollTopView or SCScrollView's action function is evaluated when a user scrolls the view or sets the visibleOrigin. See the example in the <a href="SCScrollView.html"><span class="s8">SCScrollView</span></a> help file.</p>
50 <p class="p2"><br></p>
51 <p class="p7"><b>Instance Methods</b></p>
52 <p class="p8"><br></p>
53 <p class="p1">A window's SCScrollTopView can be accessed using the SCWindow:view method. See the examples below.</p>
54 <p class="p2"><span class="Apple-tab-span"> </span></p>
55 <p class="p9"><b><span class="Apple-tab-span"> </span>autohidesScrollers_(bool)</b></p>
56 <p class="p9"><b><span class="Apple-tab-span"> </span>autohidesScrollers</b></p>
57 <p class="p8"><b><span class="Apple-tab-span"> </span></b><span class="Apple-tab-span"> </span></p>
58 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Set or return a <a href="../../Core/Boolean.html"><span class="s2">Boolean</span></a> value indicating whether this view only shows its scrollers when the bounds of the enclosed content exceed the the bounds of this view. Autohiding is done independently for each axis. The default is true.</p>
59 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
60 <p class="p9"><span class="Apple-tab-span"> </span><b>autoScrolls_(bool)</b></p>
61 <p class="p9"><b><span class="Apple-tab-span"> </span>autoScrolls</b></p>
62 <p class="p8"><b><span class="Apple-tab-span"> </span></b><span class="Apple-tab-span"> </span></p>
63 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Set or return a <a href="../../Core/Boolean.html"><span class="s2">Boolean</span></a> value indicating whether this view scrolls automatically when you drag on a contained control view past the edge of visible bounds. The default is true.<span class="Apple-tab-span"> </span></p>
64 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
65 <p class="p9"><b><span class="Apple-tab-span"> </span>hasHorizontalScroller_(bool)</b></p>
66 <p class="p9"><b><span class="Apple-tab-span"> </span>hasHorizontalScroller</b></p>
67 <p class="p8"><b><span class="Apple-tab-span"> </span></b><span class="Apple-tab-span"> </span></p>
68 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Set or return a <a href="../../Core/Boolean.html"><span class="s2">Boolean</span></a> value indicating whether this view has a horizontal scroller. The default is true.</p>
69 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
70 <p class="p9"><b><span class="Apple-tab-span"> </span>hasVerticalScroller_(bool)</b></p>
71 <p class="p9"><b><span class="Apple-tab-span"> </span>hasVerticalScroller</b></p>
72 <p class="p8"><b><span class="Apple-tab-span"> </span></b><span class="Apple-tab-span"> </span></p>
73 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Set or return a <a href="../../Core/Boolean.html"><span class="s2">Boolean</span></a> value indicating whether this view has a vertical scroller. The default is true.</p>
74 <p class="p8"><span class="Apple-tab-span"> </span></p>
75 <p class="p9"><span class="Apple-tab-span"> </span><b>innerBounds</b></p>
76 <p class="p8"><b><span class="Apple-tab-span"> </span></b><span class="Apple-tab-span"> </span></p>
77 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Returns a <a href="../../Geometry/Rect.html"><span class="s9">Rect</span></a> corresponding to the size of the enclosed canvas. Note that you cannot set this directly. The size of the innerBounds will be either the visible bounds or the smallest Rect which contains all enclosed subviews, whichever is larger. See discussion above.</p>
78 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
79 <p class="p9"><b><span class="Apple-tab-span"> </span>visibleOrigin_(point)</b></p>
80 <p class="p9"><b><span class="Apple-tab-span"> </span>visibleOrigin</b></p>
81 <p class="p8"><b><span class="Apple-tab-span"> </span></b><span class="Apple-tab-span"> </span></p>
82 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Set or return the coordinates of the current visible origin (the upper lefthand corner) of the enclosed 'canvas'. <b>point</b> is an instance of <a href="../../Geometry/Point.html"><span class="s2">Point</span></a>.</p>
83 <p class="p8"><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>
84 <p class="p2"><br></p>
85 <p class="p7"><b>Examples</b></p>
86 <p class="p3"><br></p>
87 <p class="p10">(</p>
88 <p class="p11"><span class="s4">w = </span><span class="s10">Window</span><span class="s4">(scroll: </span><span class="s10">true</span><span class="s4">); </span>// you must set this when the window is created</p>
89 <p class="p10">c = <span class="s10">Slider</span>(w, <span class="s10">Rect</span>(0,0,100,30));</p>
90 <p class="p10">w.front;</p>
91 <p class="p10">)</p>
92 <p class="p3"><br></p>
93 <p class="p11"><span class="s4">c.resize = 2; </span>// resize settings are ignored if scrolling is enabled.</p>
94 <p class="p3"><br></p>
95 <p class="p11"><span class="s4">d = </span><span class="s10">Slider</span><span class="s4">(w, </span><span class="s10">Rect</span><span class="s4">(1500, 40, 100, 30)); </span>// a horizontal scroller appears</p>
96 <p class="p3"><br></p>
97 <p class="p11"><span class="s4">w.view.autohidesScrollers_(</span><span class="s10">false</span><span class="s4">); </span>// autohide is enabled by default, but we can turn it off</p>
98 <p class="p3"><br></p>
99 <p class="p3"><br></p>
100 <p class="p11"><span class="s4">w.view.visibleOrigin = 1500@0; </span>// but we can still scroll using the visibleOrigin method</p>
101 <p class="p3"><br></p>
102 </body>
103 </html>