multilineedit class

multilineedit class An editor for inputting larger portions of text
Inherits
object widget
Description
This is class an editor for inputting larger portions of text. Besides that, it has unfinished docs.
Functions
`<string> $textLine(<line:integer>)`
Returns the string at line <line>. Note that it can be an empty string.
`<integer> $numLines()`
Returns number of lines in the widget.
`<array> $cursorPosition()`
Returns current cursor position in "<line:uinteger>, <col:uinteger>" format. Both numbers start counting from zero.
`$setReadOnly(<bReadOnly:boolean>)`
Sets the editor to be read-only if bReadOnly is 1 or removes the read-only status if bReadOnly is 0
`<boolean> $atBeginning()`
Returns 1 (true) if the cursor is placed at the beginning of the text; otherwise returns 0 (false).
`<boolean> $atEnd()`
Returns 1 (true) if the cursor is placed at the end of the text; otherwise returns 0 (false).
`$setWordWrap(<wrap_mode:string>)`
Sets the word wrap mode to mode. Valid Values are:
- NoWrap - Do not wrap the text. - WidgetWidth - Wrap the text at the current width of the widget. - FixedPixelWidth - Wrap the text at a fixed number of pixels from the widget's left side. - FixedColumnWidth - Wrap the text at a fixed number of character columns from the widget's left side.
`<string> $wordWrap()`
Returns the word wrap mode. NoWrap, WidgetWidth, FixedPixelWidth, FixedColumnWidth.
`$setWordWrapWidth(<width:integer>)`
When $wordWrap is set to FixedPixelWidth or FixedColumnWidth, sets the width at which text will be wrapped in columns or pixels.
`<integer> $wordWrapWidth()`
When $wordWrap is set to FixedPixelWidth or FixedColumnWidth, returns the width at which text is wrapped in columns or pixels.
`<string> $text()`
Returns the multiline edits text.
`<string> $html()`
Returns the content of the widget as a HTML document.
`<integer> $length()`
Returns the number of characters in the text This function ignores newlines.
`$setMaxLines(<max_lines:integer>)`
Sets the max number of the lines to <max_lines>
`<integer> $maxLines()`
Returns the max number of the lines in the multiline edit.
`$insert(<text:string>)`
Inserts text at the current cursor position.
`$append(<text:string>)`
Appends a new paragraph with text to the end of the multiline edit.
`$copy()`
Copies any selected text from selection to the clipboard.
`$cut()`
Copies the selected text from selection to the clipboard and deletes it from the multiline edit.
`$paste()`
Pastes the text from the clipboard into the multiline edit at the current cursor position.
`$setFamily(<font_family:string>)`
Sets the font family of the current format to fontFamily.
`$setItalic(<bItalic:boolean>)`
If the bool value is 1 sets the current format to italic; otherwise, if it's 0 sets the current format to no-italic.
`$setBold(<bBold:boolean>)`
If the bool value is 1 sets the current format to bold; otherwise, if it's 0 sets the current format to no-bold.
`$setUnderline(<bUnderline:boolean>)`
If the bool value is 1 sets the current format to underline; otherwise, if it's 0 sets the current format to no-underline.
`<boolean> $italic()`
Returns 1 (true) if the current format is italic; otherwise returns 0 (false).
`<boolean> $bold()`
Returns 1 (true) if the current format is bold; otherwise returns 0 (false).
`<boolean> $underline()`
Returns 1 (true) if the current format is underline; otherwise returns 0 (false).
`$zoomIn(<zoom_range:integer>)`
Zooms in on the text by making the base font size range points larger.
`$zoomOut(<zoom_range:integer>)`
Zooms out on the text by making the base font size range points smaller.
`$undo()`
Undoes the last operation.
`$redo()`
Redoes the last operation.
`$clear()`
Deletes all the text in the multiline edit.
`$setUndoRedoEnabled(<bUndoRedo:boolean>)`
Sets whether undo/redo is enabled to the bool value.
`<boolean> $isUndoRedoEnabled()`
Returns 1 (true) if undo/redo is enabled; otherwise returns 0 (false).
`<integer> $undoDepth()`
Returns the depth of the undo history.
`$setText(<txt:string>)`
Sets the text edit's text to txt.
`$setColor(<rgb_value>)`
Sets the foreground color of this widget to <rgb_value> Valid values are:
- hex string: must be a string with 6 hexadecimal digits (like the ones used to specify colors in HTML pages). The first two digits specify the red component, the third and fourth digit specify the green component and the last two specify the blue component. - array(red:integer, green:integer, blue:integer) - red:integer, green:integer, blue:integer.
`$setPointSize(<point_size:integer))`
Sets the point size of the font.
`$setLinkUnderline(<bLinkUnderline:boolean>)`
Sets to 1 if you want that hypertext links will be underlined; otherwise sets to 0.
`$setTextFormat(<textformat:string>)`
Sets the text format. Correct values are RichText, PlainText.
`<string> $textFormat()`
Returns the text format: RichText or PlainText.
`$loadFile(<path:string>[,<format:string>])`
Load the file specified in the <path>. Valid values for <format> are:
- text - interprets the file as a plain text document. - html - interprets the file as a HTML document.
If <format> is omitted, the widget will try to guess whether or not the text is a HTML document.
`$saveFile(<path:string>[,<format:string>])`
Writes the content of the widget to the file specified by <path>. Valid values for <format> are:
- text - writes the file as a plain text document (default). - html - writes the file as a HTML document.
The file is saved in UTF-8.
`<boolean> $isUndoAvailable ()`
Returns 1 (true) if undo is available; otherwise returns 0 (false).
`<boolean> $isRedoAvailable ()`
Returns 1 (true) if redo is available; otherwise returns 0 (false).
`<integer> $lines()`
Returns the number of lines in the multilineedit.
`<integer> $lineOfChar(<paragraph:integer>,<index:integer>)`
Returns the line number of the line in paragraph par in which the character at position index appears. If there is no such paragraph or no such character at the index position -1 is returned.
`$setModified(<bModified:boolean>)`
Sets whether the document has been modified by the user. Valid Values are 1 (true) or 0 (false).
`$setAlignment(<alignment:string>)`
Sets the alignment of the current paragraph to <alignment>. Valid values are:
- Auto - Aligns according to the language. - Left - Aligns with the left edge. - Right - Aligns with the right edge. - Center - Centers in both dimensions. - Justify - Justify the text.

Index, Object Classes