test various gui examples
authorEugene Petkevich <nasedil.genio.code@gmail.com>
Tue, 16 Jan 2024 03:16:15 +0000 (04:16 +0100)
committerEugene Petkevich <nasedil.genio.code@gmail.com>
Tue, 16 Jan 2024 03:16:15 +0000 (04:16 +0100)
temp.scd

index 92b6f47..d442c4f 100644 (file)
--- a/temp.scd
+++ b/temp.scd
@@ -321,13 +321,27 @@ History.play;
 
 // gui stuff
 
+g = PdefGui();            // make a PdefGui
+g.object = Pdef(\a);        // show when a Pdef is put in
+Pdef(\a, Pbind(\note, 12));     // show whether it has a source
+Pdef(\a).play;             // show whether playing, stopped, or ended, and pausable
+Pdef(\a).set(\dur, 0.25);     // show whether the Pdef has an envir
+g.close;
+
 (
 Window.closeAll;
-w = Window.new("Server Levels");
+w = Window.new("Server Levels", Window.availableBounds);
+w.view.decorator = FlowLayout(w.view.bounds);
 ~l = ServerMeterView.new(s, w, 0@0, 17, 20);
-w.width = ~l.width;
-(0..13).do{|i|
-  ~l.view.children[0].children[i].visible = false;
+w.view.bounds.width = ~l.view.bounds.width;
+~f = FreqScopeView(w);
+~f.inBus_(20+16);
+~c = Stethoscope.new(s, view:w.view, index: 20+16);
+w.onClose_({ ~f.kill; ~c.free });
+w.front;
+~f.active_(true);
+fork {
+  0.5.wait;
+
 };
-w.front; // show the window
 )
\ No newline at end of file