| Class | Fox::FXText |
| In: |
rdoc-sources/FXText.rb
|
| Parent: | FXScrollArea |
Multiline text widget
The following messages are sent by FXText to its target:
| SEL_KEYPRESS: | sent when a key is pressed; the message data is an FXEvent instance. |
| SEL_KEYRELEASE: | sent when a key is released; the message data is an FXEvent instance. |
| SEL_LEFTBUTTONPRESS: | sent when the left mouse button goes down; the message data is an FXEvent instance. |
| SEL_LEFTBUTTONRELEASE: | sent when the left mouse button goes up; the message data is an FXEvent instance. |
| SEL_MIDDLEBUTTONPRESS: | sent when the middle mouse button goes down; the message data is an FXEvent instance. |
| SEL_MIDDLEBUTTONRELEASE: | sent when the middle mouse button goes up; the message data is an FXEvent instance. |
| SEL_RIGHTBUTTONPRESS: | sent when the right mouse button goes down; the message data is an FXEvent instance. |
| SEL_RIGHTBUTTONRELEASE: | sent when the right mouse button goes up; the message data is an FXEvent instance. |
| SEL_INSERTED: | sent after text is inserted into the text buffer; the message data is a two-element array indicating the position at which the text was inserted and the number of characters inserted. |
| SEL_DELETED: | sent before text is removed from the text buffer; the message data is a two-element array indicating the position at which text will be removed and the number of characters to be removed. |
| SEL_CHANGED: | sent when the contents of the text buffer change in any way; the message data is an integer indicating the cursor position. |
| SEL_SELECTED: | sent after text is selected; the message data is a two-element array indicating the starting position of the selected text and the number of characters selected. |
| SEL_DESELECTED: | sent before text is deselected; the message data is a two-element array indicating the starting position of the deselected text and the number of characters deselected. |
| TEXT_READONLY: | Text is not editable |
| TEXT_WORDWRAP: | Wrap at word breaks |
| TEXT_OVERSTRIKE: | Overstrike mode |
| TEXT_FIXEDWRAP: | Fixed wrap columns |
| TEXT_NO_TABS: | Insert spaces for tabs |
| TEXT_AUTOINDENT: | Autoindent |
| TEXT_SHOWACTIVE: | Show active line |
SELECT_CHARS SELECT_WORDS SELECT_LINES
| STYLE_UNDERLINE: | underline text |
| STYLE_STRIKEOUT: | strike out text |
| STYLE_BOLD_: | bold text |
ID_CURSOR_TOP:: ID_CURSOR_BOTTOM:: ID_CURSOR_HOME:: ID_CURSOR_END:: ID_CURSOR_RIGHT:: ID_CURSOR_LEFT:: ID_CURSOR_UP:: ID_CURSOR_DOWN:: ID_CURSOR_WORD_LEFT:: ID_CURSOR_WORD_RIGHT:: ID_CURSOR_PAGEDOWN:: ID_CURSOR_PAGEUP:: ID_CURSOR_SCRNTOP:: ID_CURSOR_SCRNBTM:: ID_CURSOR_SCRNCTR:: ID_CURSOR_PAR_HOME:: ID_CURSOR_PAR_END:: ID_SCROLL_UP:: ID_SCROLL_DOWN:: ID_MARK:: ID_EXTEND:: ID_OVERST_STRING:: ID_INSERT_STRING:: ID_INSERT_NEWLINE:: ID_INSERT_TAB:: ID_CUT_SEL:: ID_COPY_SEL:: ID_PASTE_SEL:: ID_DELETE_SEL:: ID_SELECT_CHAR:: ID_SELECT_WORD:: ID_SELECT_LINE:: ID_SELECT_ALL:: ID_SELECT_MATCHING:: ID_SELECT_BRACE:: ID_SELECT_BRACK:: ID_SELECT_PAREN:: ID_SELECT_ANG:: ID_DESELECT_ALL:: ID_BACKSPACE:: ID_BACKSPACE_WORD:: ID_BACKSPACE_BOL:: ID_DELETE:: ID_DELETE_WORD:: ID_DELETE_EOL:: ID_DELETE_LINE:: ID_TOGGLE_EDITABLE:: ID_TOGGLE_OVERSTRIKE:: ID_CURSOR_ROW:: ID_CURSOR_COLUMN:: ID_CLEAN_INDENT:: ID_SHIFT_LEFT:: ID_SHIFT_RIGHT:: ID_SHIFT_TABLEFT:: ID_SHIFT_TABRIGHT:: ID_UPPER_CASE:: ID_LOWER_CASE:: ID_GOTO_MATCHING:: ID_GOTO_SELECTED:: ID_GOTO_LINE:: ID_SEARCH_FORW_SEL:: ID_SEARCH_BACK_SEL:: ID_SEARCH:: ID_REPLACE:: ID_LEFT_BRACE:: ID_LEFT_BRACK:: ID_LEFT_PAREN:: ID_LEFT_ANG:: ID_RIGHT_BRACE:: ID_RIGHT_BRACK:: ID_RIGHT_PAREN:: ID_RIGHT_ANG:: ID_BLINK:: ID_FLASH::
| activeBackColor | [RW] | Active background color [FXColor] |
| anchorPos | [RW] | Anchor position [Integer] |
| barColor | [RW] | Bar color [FXColor] |
| barColumns | [RW] | Number of columns used for line numbers [Integer] |
| cursorCol | [RW] | Cursor column [Integer] |
| cursorColor | [RW] | Cursor color [FXColor] |
| cursorPos | [R] | Cursor position [Integer] |
| cursorRow | [RW] | Cursor row [Integer] |
| delimiters | [RW] | Word delimiters [String] |
| editable | [W] | Indicates whether text is editable [Boolean] |
| font | [RW] | Text font [FXFont] |
| helpText | [RW] | Status line help text [String] |
| hiliteBackColor | [RW] | Highlight text background color [FXColor] |
| hiliteMatchTime | [RW] | Brace and parenthesis match highlighting time, in milliseconds [Integer]. A hiliteMatchTime of 0 disables brace matching. |
| hiliteStyles | [RW] | Array of hilite styles [an Array of FXHiliteStyle instances] |
| hiliteTextColor | [RW] | Highlight text color [FXColor] |
| length | [R] | The length of the text buffer [Integer] |
| marginBottom | [RW] | Bottom margin [Integer] |
| marginLeft | [RW] | Left margin [Integer] |
| marginRight | [RW] | Right margin [Integer] |
| marginTop | [RW] | Top margin [Integer] |
| modified | [W] | Indicates whether text is modified [Boolean] |
| numberColor | [RW] | Line number color [FXColor] |
| selBackColor | [RW] | Selected text background color [FXColor] |
| selEndPos | [R] | Selection end position [Integer] |
| selStartPos | [R] | Selection start position [Integer] |
| selTextColor | [RW] | Selected text color [FXColor] |
| styled | [W] | Indicates whether text is styled [Boolean] |
| tabColumns | [RW] | Tab columns [Integer] |
| text | [RW] | The text buffer [String] |
| textColor | [RW] | Text color [FXColor] |
| textStyle | [RW] | Text widget style [Integer] |
| tipText | [RW] | Tool tip message [String] |
| visibleColumns | [RW] | Number of visible columns [Integer] |
| visibleRows | [RW] | Number of visible rows [Integer] |
| wrapColumns | [RW] | Wrap columns [Integer] |
Return an initialized FXText instance.
| p: | the parent window for this text widget [FXComposite] |
| tgt: | the message target, if any, for this text widget [FXObject] |
| sel: | the message identifier for this text widget [Integer] |
| opts: | tree list options [Integer] |
| x: | initial x-position [Integer] |
| y: | initial y-position [Integer] |
| w: | initial width [Integer] |
| h: | initial height [Integer] |
Append text to the end of the text buffer. If notify is true, SEL_INSERTED and SEL_CHANGED messages are sent to the text widget’s message target after the new text is added.
Append text to the end of the text buffer. If notify is true, SEL_INSERTED and SEL_CHANGED messages are sent to the text widget’s message target after the new text is added.
Change the style of n characters at position pos in the text buffer to style. Here, style is either an integer into the style table, indicating the new style for all the affected characters; or style is a String…
Extend selection to pos. If notify is true, a SEL_DESELECTED message is sent to the text widget’s message target before any previously selected text is deselected, then a SEL_SELECTED message is sent after the new text is selected.
Search for string in text buffer, returning the extent of the string in beg and end. The search starts from the given start position, scans forward (SEARCH_FORWARD) or backward (SEARCH_BACKWARD), and wraps around if SEARCH_WRAP has been specified. The search type is either a plain search (SEARCH_EXACT), case insensitive search (SEARCH_IGNORECASE), or regular expression search (SEARCH_REGEX). For regular expression searches, capturing parentheses are used if npar is greater than 1; in this case, the number of entries in the beg and end arrays must be npar also. If either beg or end or both are nil, internal arrays are used.
Insert text at position pos in the text buffer. If notify is true, SEL_INSERTED and SEL_CHANGED messages are sent to the text widget’s message target after the new text is inserted.
Insert text at position pos in the text buffer. If notify is true, SEL_INSERTED and SEL_CHANGED messages are sent to the text widget’s message target after the new text is inserted.
Kill the selection. If notify is true, a SEL_DESELECTED message is sent to the text widget’s message target before the text is deselected.
Remove n characters of text at position pos in the buffer If notify is true, a SEL_DELETED message is sent to the text widget’s message target before the text is removed and a SEL_CHANGED message is sent after the change occurs.
Replace the m characters at pos with text. If notify is true, a SEL_DELETED message is sent to the text widget’s message target before the old text is removed, and a SEL_INSERTED and SEL_CHANGED message is sent after the new text is inserted.
Replace the m characters at pos with text. If notify is true, a SEL_DELETED message is sent to the text widget’s message target before the old text is removed, and a SEL_INSERTED and SEL_CHANGED message is sent after the new text is inserted.
Select all text. If notify is true, a SEL_DESELECTED message is sent to the text widget’s message target before any previously selected text is deselected, then a SEL_SELECTED message is sent after the new text is selected.
Set cursor column. If notify is true, a SEL_CHANGED message is sent to the text widget’s message target after the change occurs.
Set cursor position. If notify is true, a SEL_CHANGED message is sent to the text widget’s message target after the change occurs.
Set cursor row. If notify is true, a SEL_CHANGED message is sent to the text widget’s message target after the change occurs.
Select len characters starting at position pos. If notify is true, a SEL_DESELECTED message is sent to the text widget’s message target before any previously selected text is deselected, then a SEL_SELECTED message is sent after the new text is selected.
Change the text in the buffer to new text If notify is true, SEL_INSERTED and SEL_CHANGED messages are sent to the text widget’s message target after the new text is set.
Change the text If notify is true, SEL_INSERTED and SEL_CHANGED messages are sent to the text widget’s message target after the new text is set.