Application Header file | <Xraw/Text.h> |
Class Header file | <Xraw/TextP.h> |
Class | textWidgetClass |
Class Name | Text |
Superclass | Simple --> Core |
The Text widget is the glue that binds all the other pieces together, it maintains the internal state of the displayed text, and acts as a mediator between the source and sink.
This section lists the resources that are actually part of the Text widget, and explains the functionality provided by each.
Name | Class | Type | Notes | Default Value |
---|---|---|---|---|
autoFill | AutoFill | Boolean | False | |
bottomMargin | Margin | Position | 2 | |
displayCaret | Output | Boolean | True | |
displayPosition | TextPosition | XawTextPosition | 0 | |
insertPosition | TextPosition | int | 0 | |
leftMargin | Margin | Position | 2 | |
resize | Resize | XawTextResizeMode | XawtextResizeNever | |
rightMargin | Margin | Position | 4 | |
scrollHorizontal | Scroll | ScrollMode | XawtextScrollNever | |
scrollVertical | Scroll | XawTextScrollMode | XawtextScrollNever | |
selectTypes | SelectTypes | XawTextSelectType* | See above | |
textSink | TextSink | Widget | NULL | |
textSource | TextSource | Widget | NULL | |
topMargin | Margin | Position | 2 | |
unrealizeCallback | Callback | XtCallbackList | NULL | |
wrap | Wrap | WrapMode | XawtextWrapNever |
autoFill | If this resource is True the text widget will automatically break a line when the user attempts to type into the right margin. The attribute has no effect on files or text inserted into the text widget. It only checks to see if the action should be taken when a user enters a new character via the insert-character action. |
---|---|
bottomMargin leftMargin rightMargin topMargin |
The amount of space, in pixels, between the edge of the window and the corresponding edge of the text within the window. If there is a scrollbar active on this edge, then this is the space between the text and the scrollbar. |
displayCaret | Whether or not to display the text insert point. |
displayPosition | The position in the text buffer of the character that is currently displayed in the upper left hand corner of the text display. |
insertPosition | This is the location of the insert point. It is expressed in characters from the beginning of the file. The cursor will always be forced to be on the screen. This resource may therefore be used to scroll the text display to a certain character position. |
resize | Controls whether or not the Text widget attempts to resize itself when it is no longer able to display the full text buffer in the associated window. Any attempt by the Text widget to resize itself is always subject to the constraints imposed by its parent. The values XawtextResizeNever, XawtextResizeWidth, XawtextResizeHeight, and XawtextResizeBoth |
scrollHorizontal scrollVertical |
These resources control the placement of scrollbars on the left and bot tom edge of the text widget. These resources accept the values XawtextScrollAlways, XawtextScrollWhenNeeded, and XawtextScrollNever. A converter is registered for this resource that will convert the following strings: always, never, and whenNeeded. If XawtextScrollWhenNeeded is specified, the appropriate scrollbar will only appear when there is text in the buffer that is not able to fit within the bounds of the current window. The scrollbar will disappear when the text once again fits within the window. |
selectTypes | Specifies the selection type array that is used when multi-click is activated (see Text Selections for Application Programmers for details). This resource is used in place, and must not be freed until the widget is destroyed. There is no type converter registered for this resource, so it may not be set from the resource manager. |
textSink textSource |
These are the TextSink or TextSource objects used by this widget. When using the Text widget these MUST be set by the application programmer. |
wrap | When the text in any one line is wider than the window there are several possible actions. This resource allows the user to decide what will hap pen. The accepted values for this resource are XawtextWrapNever, XawtextWrapLine, and XawtextWrapWord. With XawtextWrap Line all text that is beyond the right edge of the window will be displayed on the next line. With XawtextWrapWord the same action occurs but the text is broken at a word boundary if possible. If no wrap ping is enabled then the text will extend off the edge of the window, and a small rectangle will be painted in the right margin to alert the user that this line is too long. A converter is registered for this resource that will convert the following strings: never, word, and line. |
unrealizeCallback | A list of callback functions which will be executed when the Text widget is unrealized. |