TextEditingTool$Typings extension
Properties
- currentTextEditor ↔ HTMLInfo?
-
Available on TextEditingTool, provided by the TextEditingTool$Typings extension
Gets or sets the HTMLInfo that is editing the text.getter/setter pair - defaultTextEditor ↔ HTMLInfo
-
Available on TextEditingTool, provided by the TextEditingTool$Typings extension
Gets or sets the default HTMLInfo that edits the text.getter/setter pair - selectsTextOnActivate ↔ bool
-
Available on TextEditingTool, provided by the TextEditingTool$Typings extension
Gets or sets whether to select (highlight) the editable text when the TextEditingTool is activated. The default is true.getter/setter pair - starting ↔ EnumValue
-
Available on TextEditingTool, provided by the TextEditingTool$Typings extension
Gets or sets how user gestures can start in-place editing of text.getter/setter pair - state ↔ EnumValue
-
Available on TextEditingTool, provided by the TextEditingTool$Typings extension
Gets or sets the state of the TextEditingTool. The only accepted values are listed as constant properties of TextEditingTool, including:getter/setter pair - textBlock ↔ TextBlock?
-
Available on TextEditingTool, provided by the TextEditingTool$Typings extension
Gets or sets the TextBlock that is being edited. This property is initially null and is set in TextEditingTool#doActivate as the TextBlock at the mouse click point. However, if you set this property beforehand, TextEditingTool#doActivate will not set it, and this tool will edit the given TextBlock.getter/setter pair - textValidation ↔ bool Function(TextBlock, String, String)?
-
Available on TextEditingTool, provided by the TextEditingTool$Typings extension
Gets or sets the predicate that determines whether or not a string of text is valid. If this is non-null, this predicate is called in addition to any TextBlock#textValidation predicate. See #isValidText for more details. The default predicate is null, which is equivalent to simply returning true.getter/setter pair
Methods
-
acceptText(
EnumValue reason) → void -
Available on TextEditingTool, provided by the TextEditingTool$Typings extension
Finish editing by trying to accept the new text. -
canStart(
) → bool -
Available on TextEditingTool, provided by the TextEditingTool$Typings extension
This may run when there is a mouse-click on a TextBlock for which the TextBlock#editable property is true in a Part that Part#isSelected. -
doActivate(
) → void -
Available on TextEditingTool, provided by the TextEditingTool$Typings extension
Start editing the text for a #textBlock. -
doCancel(
) → void -
Available on TextEditingTool, provided by the TextEditingTool$Typings extension
Abort any text editing operation. -
doDeactivate(
) → void -
Available on TextEditingTool, provided by the TextEditingTool$Typings extension
Release the mouse. -
doError(
String oldstring, String newstring) → void -
Available on TextEditingTool, provided by the TextEditingTool$Typings extension
Call the #textBlock's TextBlock#errorFunction, if there is one, and then show the text editor again. This is called only when the #isValidText method returned false. The value of #state will be StateInvalid. This method may be overridden. You may wish to override this method in order to not continue showing the editor. @expose @param oldstring @param newstring @since 2.1 -
doMouseDown(
) → void -
Available on TextEditingTool, provided by the TextEditingTool$Typings extension
This calls #acceptText with the reason TextEditingTool.MouseDown, if this tool Tool#isActive. -
doMouseUp(
) → void -
Available on TextEditingTool, provided by the TextEditingTool$Typings extension
A click (mouse up) calls TextEditingTool#doActivate if this tool is not already active and if TextEditingTool#canStart returns true. -
doStart(
) → void -
Available on TextEditingTool, provided by the TextEditingTool$Typings extension
This calls TextEditingTool#doActivate if there is a #textBlock set. #doActivate attempts to set #textBlock if it is null. -
doSuccess(
String oldstring, String newstring) → void -
Available on TextEditingTool, provided by the TextEditingTool$Typings extension
Call the #textBlock's TextBlock#textEdited event handler, if there is one. This is called just after the TextBlock#text has been set to the new string value. When this method returns, this tool raises the "TextEdited" DiagramEvent and commits the transaction. This method may be overridden. @expose @param oldstring @param newstring @since 2.1 -
isValidText(
TextBlock textblock, String oldstr, String newstr) → bool -
Available on TextEditingTool, provided by the TextEditingTool$Typings extension
This predicate checks any TextBlock#textValidation predicate and this tool's #textValidation predicate to make sure the TextBlock#text property may be set to the new string. -
measureTemporaryTextBlock(
String text) → TextBlock -
Available on TextEditingTool, provided by the TextEditingTool$Typings extension
This method returns a temporary TextBlock used for measuring text during editing. The TextBlock.text is set to the parameter's value, and the TextBlock is measured with the last available width of the #textBlock.