The Text Editor is part of the Ventuz User Interface and is used to edit text, expressions, XML or other textual information. In all of these cases, having to enter or manipulate large amounts of text directly in the Property Editor would be difficult due to its limited screen size, which led to the introduction of this dedicated editor window. The Text Editor is at all times either associated with none or exactly one string property. The value box of this property in the Property Editor will be shaded in a light red color. If a node contains more than one string properties, the selection can be changed by clicking into the respective value field in the Property Editor.
The most common use of the Text Editor is to edit formatted text as for example used by the Block Text node. In this case, the editor looks something like below: The main area is of course reserved to the text input. In the top toolbar are various options that should be familiar to any user that has ever worked with a word processor like the alignment of the text. The majority of these buttons is directly related to properties of the Text Layout node that is selected and any change in the Text Editor is just a quick way of changing the respective property in the Property Editor.
The bottom toolbar also contains shortcuts to properties usually found in the Property Editor. Depending on the Text Layout node, it can be used to influence the size of the area the layouted text will use, what spacing should be used between lines and so on.
Unlike a word processor application, Ventuz separates the text content from its rendering like a Desktop Publishing application. The Text Editor can be used to specify the plain text as well as layouting information but it cannot be a WYSIWYG editor as it is independent of the actual rendering in 3D.
Editor Options | ||
Large Font | Toggles the size of the text in the text editor between a larger and a smaller font size | |
Word Wrap | Wraps the text to fit the editor | |
Font Options | ||
Font/Typeface | This selects the Font used for the text. When editing Enriched Block Text, this changes the DefaultFont property | |
Horizontal Aligment | ||
Left | Sets the horizontal alignment to Left (Near). In right-to-left reading Far is selected | |
Center | Sets the horizontal alignment to Center | |
Right | Sets the horizontal alignment to Right (Far). In right-to-left reading Near is selected | |
Justify | Sets the horizontal alignment to Justify | |
Character | Sets the horizontal alignment to Character. Lines are aligned to the character specified in the AlignCharacter property | |
Vertical Aligment | ||
First Line | The first line of the text lies on Y = 0 | |
Top | The top boundary of the text lies on Y = 0 | |
Center | The center of the complete text lies on Y = 0 | |
Bottom | The bottom boundary of the text lies on Y = 0 | |
Last Line | The last line of the text lies on Y = 0 | |
Other Layout Options | ||
Kerning | Enables character pair kerning | |
Right To Left | Enables Right-To-Left reading | |
Character Wrapping | Enabled line breaks on characters |
The font used to edit text or string values in the Text Editor can be changed in the Designer Options
Width | Edit the width of the selected Text. In Block Text and Enriched Block Text this modifies the Width property. For Scroll Text the Size property is modified. |
Height | Edit the Height property Block Text and Enriched Block Text |
Char | Edit the CharSpacing property Block Text and Enriched Block Text |
Line | Edit the LineSpacing property Block Text and Enriched Block Text |
When editing string values (as for example for the inputs of String Operation nodes, the interface is reduced by all properties that do not exist compared to Text Layout nodes. As a result, the text editor looks rather sparse and functions as a way to enter plain text.
When editing XML data (see [NodeDataXML XML Text node]), the editor features syntax highlighting capabilities. In addition, it checks the content for being well-formed (e.g. a closing tag exists for each open tag, a tag is only closed when all its child tags are closed, ...). It however does not perform any validation against a DTD file which may or may not be specified in the content.
Expressions are small pieces of C# code and the Text Editor features the appropriate syntax highlighting for them. Otherwise it behaves much like a plain text editor. For more information on expressions, see Expression Nodes.