9. 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.

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.

EdFind

EdFind finds a string in an editor.

EdFindReplace

EdFindReplace replaces a string in an editor.

EdFoldAll

EdFoldAll

EdGotoPos

EdGotoPos sets the cursor to the given position

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.

EdSetActivePane

EdSetActivePane sets the active pane of a splitter window.

EdSetEncoding

EdSetEncoding sets the output coding of an editor.

EdSetLexer

EdSetLexer sets the file type for the syntax highlighting.

EdSetMarginType

EdSetMarginType

EdSetModify

EdSetModify sets or clears the modification flag of the editor.

EdSetPathName

EdSetPathName sets the file name.

EdSetReadOnly

EdSetReadOnly sets the read-only flag.

EdSetSplit

EdSetSplit splits the editor window horizontal, vertical or removes the split.

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.

EdToggleFolding

EdToggleFolding

EdUndo

EdUndo reverses the last editor operation.

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.

EdGetActivePane

EdGetActivePane returns the active pane in a splitter window.

EdGetCurrentPos

EdGetCurrentPos returns the cursor position in characters from the beginning of the file.

EdGetCursorPos

EdGetCursorPos returns the cursor position in column/row coordinates.

EdGetEncoding

EdGetEncoding gets the output encoding of an editor.

EdGetLexer

EdGetLexer gets the type of the syntax highlighting.

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.

EdGetMarginType

EdGetMarginType

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.

EdGetSplit

EdGetSplit checks if the editor is displayed as a splitter window.

EdGetTabStops

EdGetTabStops returns the tab stop size in number of characters.

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.

id-2064106