Previous topic

19. Overview Drawing Objects

Next topic

21. Overview Excel Files

This Page

20. Overview EditorsΒΆ

The editor is a text editor for editing UniScript source code, text and data files in text format (UTX files).

The EdCreate functions creates a new editor window. The function returns a handle (a number greater than 0) to the editor. To destroy the editor window call EdDestroy..

The EdSetText function can be used to insert text via UniScript into the editor. EdGetText returns the complete text of an editor.

Example

hedit = EdCreate();
EdSetText(hedit, "First text liner\nSecond text line");
EdPrint(hedit);
EdDestroy(hedit);

Some features:

  • Syntax-Highlighting for UniScript- and XML-files.
  • Multistep Undo/Redo.
  • Handles big data files (> 100 MB).
  • Rectangular selection (hold Alt key and select using the mouse).
  • Read and write UNICODE files.
  Create and Destroy
EdCreate EdCreate creates a new editor.
SynEdCreate SynEdCreate creates a new editor to edit UniScript files.
EdDestroy EdDestroy destroys the given editor and frees any memory that the editor occupies.
  Set
EdClear EdClear deletes the current selection in the editor.
EdCopy EdCopy copies the current editor selection into the Clipboard.
EdCut EdCut deletes the current editor selection and copies the deleted text to the clipboard.
EdEmptyUndoBuffer EdEmptyUndoBuffer clears the editor undo flag.
EdGotoPos EdGotoPos sets the cursor to the given position
EdLimitText EdLimitText limits the length of the text the user may enter into an editor.
EdLineScroll EdLineScroll scrolls the text in an editor.
EdPaste EdPaste inserts the data from the clipboard into the editor at the current cursor position.
EdPrint The EdPrint function prints a document to the printer.
EdReplaceSel EdReplaceSel replaces the current selection with the specified text.
EdSave EdSave saves the editor text to disk.
EdSaveModified EdSaveModified saves the text of the editor if the modification flag is set.
EdSetModify EdSetModify sets or clears the modification flag of the editor.
EdSetPathName EdSetPathName sets the file name.
EdSetReadOnly EdSetReadOnly sets the read-only flag.
EdSetTabStops EdSetTabStops sets the tab stops in the editor.
EdSetText EdSetText replaces the text of the editor.
EdShow EdShow shows or hides a editor window.
EdUndo EdUndo reverses the last editor operation.
SynEdFind SynEdFind
SynEdFindText SynEdFindText
SynEdFoldAll SynEdFoldAll
SynEdSetMarginType SynEdSetMarginType
SynEdToggleFolding SynEdToggleFolding
  Get
EdCanPaste EdCanPaste checks if the objects in the clipboard have a format that is supported by UniPlot editor.
EdCanUndo EdCanUndo checks if the last editor operation can be undone.
EdGetCurrentPos EdGetCurrentPos returns the cursor position in characters from the beginning of the file.
EdGetCursorPos EdGetCursorPos returns the cursor position in column/row coordinates.
EdGetLine EdGetLine retrieves a line of text from an editor.
EdGetLineCount EdGetLineCount returns the number of lines in an editor.
EdGetLineFromPos EdGetLineFromPos returns the line number for the given position.
EdGetLineLen EdGetLineLen retrieves the length of a line in an editor.
EdGetModify EdGetModify determines if the contents of a editor window has been modified.
EdGetPathName EdGetPathName returns the editor file name.
EdGetPosFromLine EdGetPosFromLine returns the position of the given line. The position is the number of characters from the beginning of the file.
EdGetSel EdGetSel returns the start and end position of the selection.
EdGetSelectedText EdGetSelectedText retrieves the selected text of an editor.
EdGetText EdGetText copies the text from the given editor into a string variable.
EdGetWnd EdGetWnd returns the window handle
EdIsReadOnly EdIsReadOnly checks if the read-only flag is set.
SynEdGetMarginType SynEdGetMarginType

id-2064106