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 );
12 editable_ { arg aBool;
14 this.setProperty( \readOnly, aBool.not );
17 usesTabToFocusNextView_ { arg aBool;
18 this.setProperty( \tabChangesFocus, aBool );
22 this.setProperty( \document, aString );
26 ^this.getProperty( \plainText );
29 string_ { arg aString;
30 this.setProperty( \plainText, aString );
35 this.setProperty( \textFont, aFont );
38 stringColor_ { arg aColor;
40 this.setProperty( \textColor, aColor );
43 background { ^this.palette.base }
45 background_ { arg color; this.palette = this.palette.base_(color); }
47 selectedString { ^this.getProperty( \selectedString ); }
49 selectedString_ { arg string; this.setProperty( \selectedString, string ); }
52 ^this.getProperty( \selectionStart );
56 ^this.getProperty( \selectionSize );
59 select { arg start, size;
60 this.invokeMethod( \select, [start, size] );
63 setStringColor { arg aColor, intStart, intSize;
64 this.setProperty( \rangeColor, [aColor,intStart,intSize] );
67 setFont { arg aFont, intStart, intSize;
68 this.setProperty( \rangeFont, [aFont,intStart,intSize] );
71 setString { arg aString, intStart, intSize;
72 this.setProperty( \rangeText, [aString,intStart,intSize] );
75 tabWidth { ^this.getProperty( \tabStopWidth ); }
77 tabWidth_ { arg pixels; this.setProperty( \tabStopWidth, pixels ); }
80 this.nonimpl( "syntaxColorize" );
84 var text = this.selectedString;
85 if( text.size < 1 ) { ^nil };
86 if( text.size > 150 ) {
87 this.dragLabel = text.copyRange(0,149) ++ "...";
89 this.dragLabel = text;