The Text Part is the base text-handling part delivered with OpenDoc for the OS/2 platform. This part exists primarily for the authoring and rendering of text-type data. As such, its primary content type is ASCII text. Figure 125 shows the text in the Text Part which is a Root Part. The text was pasted via the clipboard in this example. This Text Part supports the following four ways to fill text in its frame:
° Type in a text when its activated.
° Cut, copy, paste via the clipboard.
° Drag and drop a text file object.
° Import a text file.
Figure 125. Text PartThe Import function as you see in the Option submenu in Figure 125 gives you a window that allows you to select a file to import. Figure 125 also shows you other functions supported in this part, such as the Export function to export the text to a file in ASCII or RTF format and text formatting functions. The text formatting falls into two areas, font details and layout details. Regarding font handling, the Text Part supports the following:
° Default fonts for the entire part
° Default foreground and background colors
° Default font attributes (such as italic, bold, underline, strikeout and outline)
To do text layout, the Text Part supports the following:
° Margin and indent specifications
° Line and paragraph spacing
° Text alignment (such as left, right and centered)
Figure 126. Drag and Drop between Two Different OpenDoc DocumentsFigure 126 shows the marked area of text that was copied from one document (bottom window) to another document (top window) by the drag and drop operation. Both windows are different documents and each has the Text Part as a Root Part. You can also get the same result by using the copy and paste operation:
1. Select a range of text by marking it using the mouse.
2. Select Copy from the Edit submenu of the source window to copy the marked text to the clipboard.
3. Select Paste from the Edit menu of the target window.
If you click with the second mouse button inside a Text Part you will get a pop-up menu with the following functions:
° Export text
° Change font
° Change style
° Change color
° Cut
° Copy
° Paste
° Delete
The Cut, Copy and Delete options will only be available when an area of text has been marked.