Dept. of incomplete documentation: what if BufDelay* needs to be multichannel?
[supercollider.git] / SCClassLibrary / QtCollider / QTextView.sc
blob3007bdaecd60981648353138d146e58dfe4c96a2
1 QTextView : QAbstractScroll {
2   var <stringColor, <font, <editable=true;
4   *qtClass { ^"QcTextEdit" }
6   enterInterpretsSelection { ^this.getProperty( \enterInterpretsSelection ); }
8   enterInterpretsSelection_ { arg bool;
9     this.setProperty( \enterInterpretsSelection, bool );
10   }
12   editable_ { arg aBool;
13     editable = aBool;
14     this.setProperty( \readOnly, aBool.not );
15   }
17   usesTabToFocusNextView_ { arg aBool;
18     this.setProperty( \tabChangesFocus, aBool );
19   }
21   open { arg aString;
22     this.setProperty( \document, aString );
23   }
25   string {
26     ^this.getProperty( \plainText );
27   }
29   string_ { arg aString;
30     this.setProperty( \plainText, aString );
31   }
33   font_ { arg aFont;
34     font = aFont;
35     this.setProperty( \textFont, aFont );
36   }
38   stringColor_ { arg aColor;
39     stringColor = aColor;
40     this.setProperty( \textColor, aColor );
41   }
43   selectedString { ^this.getProperty( \selectedString ); }
45   selectedString_ { arg string; this.setProperty( \selectedString, string ); }
47   selectionStart {
48     ^this.getProperty( \selectionStart );
49   }
51   selectionSize {
52     ^this.getProperty( \selectionSize );
53   }
55   select { arg start, size;
56     this.invokeMethod( \select, [start, size] );
57   }
59   setStringColor { arg aColor, intStart, intSize;
60     this.setProperty( \rangeColor, [aColor,intStart,intSize] );
61   }
63   setFont { arg aFont, intStart, intSize;
64     this.setProperty( \rangeFont, [aFont,intStart,intSize] );
65   }
67   setString { arg aString, intStart, intSize;
68     this.setProperty( \rangeText, [aString,intStart,intSize] );
69   }
71   tabWidth { ^this.getProperty( \tabStopWidth ); }
73   tabWidth_ { arg pixels; this.setProperty( \tabStopWidth, pixels ); }
75   syntaxColorize {
76     this.nonimpl( "syntaxColorize" );
77   }
79   defaultGetDrag {
80     var text = this.selectedString;
81     if( text.size < 1 ) { ^nil };
82     if( text.size > 150 ) {
83       this.dragLabel = text.copyRange(0,149) ++ "...";
84     }{
85       this.dragLabel = text;
86     }
87     ^text;
88   }