Index Parent

TextEditor class


TextEditor class is used to create fully featured text editor objects.

TextEditor class is a subclass of TextEditor.mcc, so you must have TextEditor.mcc in MUI:Libs/MUI to use it. TextEditor.mcc is copyright of Allan Odgaard.

 

Attributes
Name Type Class Note
AreaMarked B GN  
AutoClip B ISGN  
Columns N ISG  
Contents S ISG This is the content of the object. Note that when you get it, you always get a <65536 chars string, despite the real length of it
CursorX N ISGN  
CursorY N ISGN  
Error N GN You may find here the last error, one of:
  • 1 ClipboardIsEmpty: clipboard is empty
  • 2 ClipboardIsNotFTXT: clipboard doesn't contain text
  • 3 MacroBufferIsFull: not used
  • 4 MemoryAllocationFailed: not used
  • 5 NoAreaMarked: Block: operation invoked, but no area marked
  • 6 NoMacroDefined: not used
  • 7 NothingToRedo: there is nothing to redo
  • 8 NothingToUndo: there is nothing to undo
  • 9 NotEnoughUndoMem: a block was erased but there is not enogh mem to save it for undo operation
  • 10 StringNotFound: not used
  • 11 NoBookmarkInstalled
  • 12 BookmarkHasBeenLost
Export S IS One of:
  • Plain
  • EMail
ExportWrap N ISGN  
FixedFont B IGN  
Flow M SGN A number or one of:
  • Left
  • Right
  • Center
  • Justified (not implemented yet)
HasChanged B ISGN  
Import S IS One of:
  • Plain
  • EMail
  • Mime
  • MimeQuoted
ImportWrap N ISGN  
InsertMode B ISGN  
InVirtualGroup B I Set it to 1 if your TextEditor is (supposed to be) in a Virtgroup
Pen N SGN  
Quiet B ISGN  
ReadOnly B ISGN  
RedoAvailable B GN  
Rows N I  
Separator S SG  
Slider S I The name of a slider, prop, Scrollbar object to be linked to the TextEditor. Example:
mgroup.0="teg"
 teg.class="group"
 teg.horiz=1
 teg.spacing=0
  teg.0="te"
   te.class="texteditor"
   te.slider="tescr"
    tescr.class="Scrollbar"
  teg.1="tescr"
StyleBold B SGN  
StyleItalic B SGN  
StyleUnderline B SGN  
TypeAndSpell N SGN  
UndoAvailable B GN  
WrapBorder N ISGN  

 

Methods
Name Parameters Note
ARexxCmd <cmd>,[result/S] Execute the ARexx command cmd
if result is supplied, it is used to store the result of the command, if any.
BlockInfo <stem/V> The fields of stem set are:
  • StartX
  • StartY
  • StopX
  • StopY
ClearText    
FreeResources   When you get the contents of the object, a large amount of mem (depending of contents size) is allocated (and freed only at object disposing). To free this mem, you may use this method.
Insert <file>,[DontMove/B] DontMove is a boolen: if 1, the object doesn't move to the end of the inserted text.
InsertText <text>,[where] where is one of:
  • Cursor (default)
  • Top
  • Bottom
Note that RC will contain the IoErr().
MarkText <StartX>,<StartY>,<StopX>,<StopY>  
Open <file> Note that RC will contain the IoErr().
Replace <string>  
Save <file>  
Search <string>,[flags] flags is one or more of:
  • Top
  • Case