deprecate SCViewHolder-layRight
[supercollider.git] / SCClassLibrary / Common / GUI / osx / scide_scapp / SCInterfaceBuilder / asSCIBCompileString.sc
blobb9037056a6b9a78e1a70c039626f5da1ec8b3b42
1 //todo use streams
2 + SCWindow{
4         asSCIBCompileString {
5                 var str = "";
6                 view.children.do({ |v| if(v.isKindOf(SCConstructionView).not){
7                          str = str ++ v.asSCIBCompileString ++";\n" }});
8                 ^format( "(\nvar window = SCWindow.new(\"\",%).front;\n%\n)",this.bounds,str )
9         }
12 + SCIBPanelWindow{
13         asSCIBCompileString {
14                 ^window.asSCIBCompileString
15         }
19 + SCView{
21         asSCIBCompileString {
22                 if(this.setActionForConstructionString){
23                         ^format("%.new(window,%)%\n\t.action_{|v| }",this.class,this.bounds, this.modifiersForConstructionString);
24                 }{
25                         ^format("%.new(window,%)",this.class,this.bounds);
26                 }
27         }
29         setActionForConstructionString{
30                 ^true
31         }
32         modifiersForConstructionString{
33                 ^""
34         }
38 +SCButton{
40         modifiersForConstructionString{
41                 ^"\n\t.states_(%)".format(this.states.asCompileString)
42         }
46 +SCStaticText{
48         modifiersForConstructionString{
49                 ^"\n\t.string_(%)".format(this.string.asCompileString)
50         }