DAZ Script |
---|
DzTextEdit ( DzWidget parent ) |
DAZ Script | |
---|---|
String | anchorAt ( Point pos ) |
void | append ( String text ) |
void | backspace () |
void | backspaceWord () |
void | clear () |
void | copy () |
void | cursorBackward ( Boolean mark=false, Number steps=1 ) |
void | cursorForward ( Boolean mark=false, Number steps=1 ) |
void | cursorWordBackward ( Boolean mark=false, Number steps=1 ) |
void | cursorWordForward ( Boolean mark=false, Number steps=1 ) |
void | cut () |
void | del () |
void | deleteWord () |
void | down ( Boolean mark=false, Number steps=1 ) |
void | end ( Boolean mark=false ) |
void | ensureCursorVisible () |
Boolean | find ( String expression, Boolean caseSensitive=false, Boolean wholeWord=false, Boolean backward=false ) |
Boolean | hasSelectedText () |
void | home ( Boolean mark=false ) |
void | insertBlock () |
void | insertHtml ( String text ) |
void | insertPlainText ( String text ) |
void | lineEnd ( Boolean mark=false ) |
void | lineStart ( Boolean mark=false ) |
void | pageDown ( Boolean mark=false ) |
void | pageUp ( Boolean mark=false ) |
void | paste () |
void | redo () |
void | scrollToAnchor ( String name ) |
void | selectAll () |
String | selectedText () |
Number | selectionEnd () |
Number | selectionStart () |
String | text ( Number blockIdx ) |
void | undo () |
void | up ( Boolean mark=false, Number steps=1 ) |
void | zoomIn ( Number range=1 ) |
void | zoomOut ( Number range=1 ) |
void | copyAvailable ( Boolean yesNo ) |
void | cursorPositionChanged () |
void | redoAvailable ( Boolean yesNo ) |
void | selectionChanged () |
void | textChanged () |
void | undoAvailable ( Boolean yesNo ) |
Provides a powerful single-page rich text editor widget.
Enumerated values for auto formatting.
Since:
—–
Enumerated values for how lines should wrap.
Since:
—–
Enumerated values for how characters in a word should wrap.
Since:
Holds whether the text edit accepts rich text insertions by the user.
Since:
AutoFormattingFlag : autoFormatting
Holds the enabled set of auto formatting features.
Since:
Holds the number of text blocks (e.g., paragraphs) in the document. (Read Only)
Holds whether the font of the current format is bold.
Holds the number of characters in the text. (Read Only)
Since:
Holds the width of the cursor in pixels.
Since:
Holds the title of the document.
Holds the font family of the current format.
Since:
Holds the font of the current format.
Since:
Holds the editor's contents as HTML.
Since:
Holds whether the font of the current format is italic.
Holds the number of lines in the text. (Read Only)
Since:
Number : lineWrapColumnOrWidth
Holds the position (in pixels or columns depending on the lineWrapMode) where text will be wrapped.
Since:
Holds the mode the editor will use when wrapping text within words.
Since:
Holds whether the text in the editor has been modified.
Since:
Holds whether text entered by the user will overwrite existing text.
Since:
Holds the editor's contents as plain text.
Since:
Holds the point size of the font of the current format.
Holds whether the text in the editor can be edited by the user.
Since:
Holds whether a redo operation is available. (Read Only)
Since:
Holds the selected text (if any) of the editor.
Since:
Holds whether pressing the Tab key changes focus or is accepted as input.
Since:
Holds the tab stop width in pixels; default is 80.
Since:
Holds the text of the editor.
Holds the text background color of the current format.
Since:
Holds the text color of the current format.
Since:
DzWidget::TextInteractionFlags : textInteractionFlags
Holds the value that is used to determine how the label reacts to user input.
Since:
Holds whether the font of the current format is underlined.
Holds whether an undo operation is available. (Read Only)
Since:
Holds whether undo and redo are enabled.
Since:
Holds the font weight of the current format. 25 = Light, 50 = Normal, 63 = DemiBold, 75 = Bold, 87 = Black.
Since:
Holds the mode the editor will use when wrapping text by words.
Since:
DzTextEdit( DzWidget parent )
Creates a text edit widget as a child of the given parent widget.
Parameter(s):
String : anchorAt( Point pos )
Parameter(s):
Return Value:
pos
, or an empty string if no anchor exists at that point.Since:
Adds text
as a new paragraph to the end of the editor.
Parameter(s):
Since:
void : backspace()
If text is currently selected, it will be deleted and the cursor moved to the beginning of the selection. If no text is selected, the cursor will be moved one character to the left and the character will be deleted.
Since:
void : backspaceWord()
If a word is currently selected, it will be deleted and the cursor moved to the beginning of the selection. If no word is selected, the cursor will be moved one word to the left and the word will be deleted.
Since:
void : clear()
Removes all text from the editor.
Since:
void : copy()
Copies the selected text into the clipboard.
Since:
void : cursorBackward( Boolean mark=false, Number steps=1 )
Moves the cursor backward the given number of characters.
Parameter(s):
true
, each character that is stepped over will be added to the current selection.Since:
void : cursorForward( Boolean mark=false, Number steps=1 )
Moves the cursor forward the given number of characters.
Parameter(s):
true
, each character that is stepped over will be added to the current selection.Since:
void : cursorWordBackward( Boolean mark=false, Number steps=1 )
Moves the cursor backward one word.
Parameter(s):
true
, the word will be added to the current selection.Since:
void : cursorWordForward( Boolean mark=false, Number steps=1 )
Moves the cursor forward one word.
Parameter(s):
true
, the word will be added to the current selection.Since:
void : cut()
Copies the selected text into the clipboard, and removes it from the editor.
Since:
void : del()
If text is currently selected, it will be deleted and the cursor moved to the beginning of the selection. If no text is selected, the character to the right of the cursor will be deleted.
Since:
void : deleteWord()
If a word is currently selected, it will be deleted and the cursor moved to the beginning of the selection. If no word is selected, the word to the right of the cursor will be deleted.
Since:
void : down( Boolean mark=false, Number steps=1 )
Moves the cursor to the line below the current line.
Parameter(s):
true
, the text from the position of the cursor in the line below the current line to the cursor's previous position will be added to the current selection.Since:
void : end( Boolean mark=false )
Moves the cursor to the end of the document.
Parameter(s):
true
, the text from the cursor's previous position to the end of the document will be added to the current selection.Since:
void : ensureCursorVisible()
Ensures that the cursor is visible by scrolling the editor if necessary.
Since:
Boolean : find( String expression, Boolean caseSensitive=false, Boolean wholeWord=false, Boolean backward=false )
Finds the next occurrence of expression
using the given options and changes the cursor to select the match.
Parameter(s):
true
, the search is case sensitive.true
, the search looks for whole words.true
, the search is performed in the reverse direction.Return Value:
true
if expression
was found, otherwise false
.Since:
Return Value:
true
if text is selected, otherwise false
.void : home( Boolean mark=false )
Moves the cursor to the beginning of the document.
Parameter(s):
true
, the text from the beginning of the document to the cursor's previous position will be added to the current selection.Since:
void : insertBlock()
Splits the block (paragraph) at the cursor position.
Since:
void : insertHtml( String text )
Inserts text
, which is assumed to be HTML formatted, at the current cursor position.
Parameter(s):
Since:
void : insertPlainText( String text )
Inserts text
at the current cursor position.
Parameter(s):
Since:
void : lineEnd( Boolean mark=false )
Moves the cursor to the end of the line.
Parameter(s):
true
, the text from the cursor's previous position to the end of the line will be added to the current selection.Since:
void : lineStart( Boolean mark=false )
Moves the cursor to the beginning of the line.
Parameter(s):
true
, the text from the beginning of the line to the cursor's previous position will be added to the current selection.Since:
void : pageDown( Boolean mark=false )
Moves the cursor a page down in the document.
Parameter(s):
true
, the text from the cursor's previous position to a page down in the document will be added to the current selection.Since:
void : pageUp( Boolean mark=false )
Moves the cursor a page up in the document.
Parameter(s):
true
, the text from a page up in the document to the cursor's previous position will be added to the current selection.Since:
void : paste()
Inserts any text on the clipboard into the line at the cursor's current position.
Since:
void : redo()
If redoAvailable is true
, redoes the next operation in the editor.
Since:
void : scrollToAnchor( String name )
Scrolls the editor to make the text at the anchor name
visible, if it can be found in the document. If the anchor isn't found no scrolling will occur. An anchor is defined using the HTML anchor tag, e.g., <a name=“target”>.
Parameter(s):
Since:
void : selectAll()
Selects all the text in the editor.
Since:
String : selectedText()
Return Value:
Number : selectionEnd()
Return Value:
Number : selectionStart()
Return Value:
String : text( Number blockIdx )
Parameter(s):
Return Value:
blockIdx
is in range, the text of the block at blockIdx
, otherwise an empty string.void : undo()
If undoAvailable is true
, undoes the last operation in the editor.
Since:
void : up( Boolean mark=false, Number steps=1 )
Moves the cursor to the line above the current line.
Parameter(s):
true
, the text from the position of the cursor in the line above the current line to the cursor's previous position will be added to the current selection.Since:
void : zoomIn( Number range=1 )
Zooms in on the text by making the base font size range
points larger and recalculating all font sizes to be the new size.
Parameter(s):
Since:
void : zoomOut( Number range=1 )
Zooms out on the text by making the base font size range
points smaller and recalculating all font sizes to be the new size.
Parameter(s):
Since:
void : copyAvailable( Boolean yesNo )
Signature:“copyAvailable(bool)”
Emitted when text is selected or de-selected in the editor.
void : cursorPositionChanged()
Signature:“cursorPositionChanged()”
Emitted when the position of the cursor has changed.
void : redoAvailable( Boolean yesNo )
Signature:“redoAvailable(bool)”
Emitted when the availability of redo changes. If yesNo
is true
, redo() will work until redoAvailable(false) is next emitted.
void : selectionChanged()
Signature:“selectionChanged()”
Emitted when the selection changes.
void : textChanged()
Signature:“textChanged()”
Emitted when the text in the editor changes.
void : undoAvailable( Boolean yesNo )
Signature:“undoAvailable(bool)”
Emitted when the availability of undo changes. If yesNo
is true
, undo() will work until undoAvailable(false) is next emitted.