/usr/share/SuperCollider/SCClassLibrary/QtCollider/viewExtensionsQt.sc is in supercollider-common 1:3.6.3~repack-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | + QWindow {
asFlowView { arg bounds;
^FlowView(this,bounds)
}
flow { arg func,bounds;
var f;
f = FlowView(this,bounds ?? { this.bounds.moveTo(0,0) });
func.value(f);
if(bounds.isNil,{ f.resizeToFit });
^f
}
comp { arg func,bounds;
var f;
f = QView(this,bounds ?? { this.bounds.moveTo(0,0) });
func.value(f);
^f
}
}
+ QView {
asFlowView { arg bounds;
^FlowView(this,bounds ?? {this.bounds})
}
deepDo { arg function;
// includes self
function.value(this);
this.children.do({arg child;
child.deepDo(function);
});
}
allChildren {
// includes self
var all;
all = Array.new;
this.deepDo({ arg child; all = all.add(child) });
^all
}
flow { arg func,bounds;
var f,comp;
f = FlowView(this,bounds); // flow view intellegently calc defaults bounds
func.value(f);
if(bounds.isNil,{ f.resizeToFit });
^f
}
horz { arg func,bounds;
var comp;
comp = QHLayoutView(this,bounds ?? { this.bounds });
func.value(comp);
^comp
}
vert { arg func,bounds;
var comp;
comp = QVLayoutView(this,bounds ?? { this.bounds });
func.value(comp);
^comp
}
comp { arg func,bounds;
var comp;
comp = QView(this,bounds ?? { this.bounds });
func.value(comp);
^comp
}
scroll { arg func,bounds,autohidesScrollers=true,autoScrolls=true,
hasHorizontalScroller=true,hasVerticalScroller=true;
var comp;
comp = QScrollView(this,bounds ?? { this.bounds });
comp.autohidesScrollers = autohidesScrollers;
comp.hasHorizontalScroller = hasHorizontalScroller;
comp.hasVerticalScroller = hasVerticalScroller;
func.value(comp);
^comp
}
}
|