1 ViewRedirect { // Abstract class
3 classvar <>redirectQueries = false;
6 ^GUI.scheme.perform(this.key)
8 *key { ^\viewRedirect }
9 *new { arg parent, bounds;
11 if((impl = this.implClass).notNil) {
12 ^impl.new(parent, bounds)
14 MethodError("ViewRedirect is an abstract class and should not be instantiated directly. *new method not valid.", this).throw;
17 *browse { ^ClassBrowser(this.implClass ?? { ViewRedirect }) }
18 *doesNotUnderstand{|selector ... args|
20 if((impl = this.implClass).notNil) {
21 ^this.implClass.perform(selector, *args)
23 DoesNotUnderstandError(this, selector, args).throw;
26 *classRedirect { ^redirectQueries.if({this.implClass ? this}, this)}
29 Window : ViewRedirect {
31 *new { arg name = "panel", bounds, resizable = true, border = true, server, scroll = false;
32 ^this.implClass.new(name, bounds, resizable, border, server, scroll)
36 CompositeView : ViewRedirect { *key { ^\compositeView }}
37 ScrollView : ViewRedirect { *key { ^\scrollView }}
38 HLayoutView : ViewRedirect { *key { ^\hLayoutView }}
39 VLayoutView : ViewRedirect { *key { ^\vLayoutView }}
41 Slider : ViewRedirect { *key { ^\slider }}
46 //Font : ViewRedirect { *key { ^\font }}
47 Pen : ViewRedirect { *key { ^\pen }}
49 Stethoscope : ViewRedirect {
50 *new { arg server, numChannels = 2, index, bufsize = 4096, zoom, rate, view, bufnum;
51 index = index.asControlInput;
52 ^this.implClass.new(server, numChannels, index, bufsize, zoom, rate, view, bufnum)
54 *key { ^\stethoscope }
57 ScopeView : ViewRedirect { *key { ^\scopeView }}
58 FreqScopeView : ViewRedirect { *key { ^\freqScopeView }} // redirects to SCFreqScope
60 FreqScope : ViewRedirect { // redirects to SCFreqScopeWindow
61 *new { arg width=512, height=300, busNum=0, scopeColor, bgColor;
62 busNum = busNum.asControlInput;
63 ^this.implClass.new(width, height, busNum, scopeColor)
68 Dialog : ViewRedirect { *key { ^\dialog }}
69 View : ViewRedirect { *key { ^\view }}
71 RangeSlider : ViewRedirect { *key { ^\rangeSlider }}
72 Slider2D : ViewRedirect { *key { ^\slider2D }}
73 TabletSlider2D : ViewRedirect { *key { ^\tabletSlider2D }}
74 Button : ViewRedirect { *key { ^\button }}
76 PopUpMenu : ViewRedirect { *key { ^\popUpMenu }}
77 StaticText : ViewRedirect { *key { ^\staticText }}
78 NumberBox : ViewRedirect { *key { ^\numberBox }}
79 ListView : ViewRedirect { *key { ^\listView }}
81 DragSource : ViewRedirect { *key { ^\dragSource }}
82 DragSink : ViewRedirect { *key { ^\dragSink }}
83 DragBoth : ViewRedirect { *key { ^\dragBoth }}
85 UserView : ViewRedirect { *key { ^\userView }}
86 MultiSliderView : ViewRedirect { *key { ^\multiSliderView }}
87 EnvelopeView : ViewRedirect { *key { ^\envelopeView }}
89 TextField : ViewRedirect { *key { ^\textField }}
92 TabletView : ViewRedirect { *key { ^\tabletView }}
93 SoundFileView : ViewRedirect { *key { ^\soundFileView }}
94 MovieView : ViewRedirect { *key { ^\movieView }}
95 TextView : ViewRedirect { *key { ^\textView }}
99 *findFirstAvailable { |fontNames, action|
101 fontNames.do { |name|
102 if(this.availableFonts.any(_.contains(name))) {
112 Knob : ViewRedirect { *key { ^\knob }}
114 LevelIndicator : ViewRedirect { *key { ^\levelIndicator }}
116 Image : ViewRedirect { *key { ^\image }}