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 selectedString { ^this.getProperty( \selectedString ); }
45 selectedString_ { arg string; this.setProperty( \selectedString, string ); }
48 ^this.getProperty( \selectionStart );
52 ^this.getProperty( \selectionSize );
55 select { arg start, size;
56 this.invokeMethod( \select, [start, size] );
59 setStringColor { arg aColor, intStart, intSize;
60 this.setProperty( \rangeColor, [aColor,intStart,intSize] );
63 setFont { arg aFont, intStart, intSize;
64 this.setProperty( \rangeFont, [aFont,intStart,intSize] );
67 setString { arg aString, intStart, intSize;
68 this.setProperty( \rangeText, [aString,intStart,intSize] );
71 tabWidth { ^this.getProperty( \tabStopWidth ); }
73 tabWidth_ { arg pixels; this.setProperty( \tabStopWidth, pixels ); }
76 this.nonimpl( "syntaxColorize" );
80 var text = this.selectedString;
81 if( text.size < 1 ) { ^nil };
82 if( text.size > 150 ) {
83 this.dragLabel = text.copyRange(0,149) ++ "...";
85 this.dragLabel = text;