Note
Only one of the styles MULTI and SINGLE may be specified, and only one of the styles LEFT, CENTER, and RIGHT may be specified.
Note
The styles ICON_CANCEL and ICON_SEARCH are hints used in combination with SEARCH. When the platform supports the hint, the text control shows these icons. When an icon is selected, a default selection event is sent with the detail field set to one of ICON_CANCEL or ICON_SEARCH. Normally, application code does not need to check the detail. In the case of ICON_CANCEL, the text is cleared before the default selection event is sent causing the application to search for an empty string.
Note
Some text actions such as Undo are not natively supported on all platforms.
Important Note
This class is not intended to be subclassed.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv GdkRGBA | |
| pack-priv long | |
| pack-priv double | |
| pack-priv double | |
| public static final String | DELIMITER
The delimiter used by multi-line text widgets. |
| pack-priv boolean | |
| pack-priv int | |
| pack-priv int | |
| pack-priv GdkRGBA | |
| pack-priv long | |
| pack-priv long | |
| pack-priv long | |
| pack-priv static final int | |
| pack-priv int | |
| public static final int | LIMIT
The maximum number of characters that can be entered into a text widget. |
| pack-priv static final char | |
| pack-priv String | |
| pack-priv static final char | |
| pack-priv int[] | |
| pack-priv static final int | |
| pack-priv int | |
| pack-priv long | textHandle
GTK4 only field, holds the address to the underlying GtkText widget. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addModifyListener(ModifyListener
the listener which should be notified listener)Adds the listener to the collection of listeners who will
be notified when the receiver's text is modified, by sending
it one of the messages defined in the |
| public void | addSegmentListener(SegmentListener
the listener which should be notified listener)Adds a segment listener. |
| public void | addSelectionListener(SelectionListener
the listener which should be notified when the control is selected by the user listener)Adds the listener to the collection of listeners who will
be notified when the control is selected by the user, by sending
it one of the messages defined in the |
| public void | addVerifyListener(VerifyListener
the listener which should be notified listener)Adds the listener to the collection of listeners who will
be notified when the receiver's text is verified, by sending
it one of the messages defined in the |
| public void | |
| pack-priv void | |
| pack-priv int | |
| pack-priv static int | |
| pack-priv void | |
| public void | |
| pack-priv Point | computeSizeInPixels(int wHint, int hHint, boolean changed)
Overrides org. |
| pack-priv Rectangle | computeTrimInPixels(int x, int y, int width, int height)
Overrides org. |
| public void | |
| pack-priv void | |
| pack-priv void | |
| public void | |
| pack-priv GdkRGBA | |
| pack-priv char[] | |
| pack-priv void | |
| pack-priv boolean | dragDetect(int x, int y, boolean filter, boolean dragOnTimeout, boolean[] consume)
Overrides org. |
| pack-priv long | |
| pack-priv boolean | |
| pack-priv void | |
| pack-priv int | |
| public int | |
| public Point | Returns: a point, the location of the caretReturns a point describing the location of the caret relative to the receiver. |
| pack-priv Point | |
| public int | |
| public int | |
| pack-priv GdkRGBA | |
| pack-priv GdkRGBA | |
| public boolean | Returns: whether or not double click is enabledReturns the double click enabled flag. |
| public char | |
| public boolean | |
| public int | |
| public String | |
| public int | |
| public String | |
| public int | Returns: the orientation styleOverrides org. SWT.LEFT_TO_RIGHT or SWT.RIGHT_TO_LEFT.
|
| pack-priv int | |
| public Point | Returns: a point representing the selection start and endReturns a |
| public int | Returns: the number of selected characters.Returns the number of selected characters. |
| public String | Returns: the selected textGets the selected text, or an empty string if there is no current selection. |
| public int | |
| pack-priv int | |
| public String | |
| public String | Returns: the range of textthe start of the range start, int the end of the range end)Returns a range of text. |
| public char[] | Returns: a character array that contains the widget's textReturns the widget's text as a character array. |
| public int | Returns: the text limitReturns the maximum number of characters that the receiver is capable of holding. |
| public int | Returns: the index of the top lineReturns the zero-relative index of the line which is currently at the top of the receiver. |
| public int | Returns: the SWT logical point position of the top lineReturns the top SWT logical point. |
| pack-priv int | |
| pack-priv long | |
| pack-priv long | gtk_button_press_event(long widget, long event)
Overrides org. |
| pack-priv long | |
| pack-priv long | |
| pack-priv long | gtk_delete_range(long widget, long iter1, long iter2)
|
| pack-priv long | gtk_delete_text(long widget, long start_pos, long end_pos)
|
| pack-priv long | |
| pack-priv long | gtk_event_after(long widget, long gdkEvent)
|
| pack-priv long | gtk_focus_out_event(long widget, long event)
Overrides org. |
| pack-priv long | |
| pack-priv long | gtk_icon_release(long widget, long icon_pos, long event)
|
| pack-priv long | gtk_insert_text(long widget, long new_text, long new_text_length, long position)
|
| pack-priv long | gtk_key_press_event(long widget, long event)
Overrides org. |
| pack-priv long | gtk_populate_popup(long widget, long menu)
Overrides org. |
| pack-priv long | gtk_text_buffer_insert_text(long widget, long iter, long text, long length)
Overrides org. |
| pack-priv void | |
| public void | |
| pack-priv boolean | mustBeVisibleOnInitBounds()
Overrides org. true if the widget must be visible during call to
setInitialBounds().
|
| pack-priv long | |
| public void | |
| pack-priv void | |
| pack-priv void | |
| public void | removeModifyListener(ModifyListener
the listener which should no longer be notified listener)Removes the listener from the collection of listeners who will be notified when the receiver's text is modified. |
| public void | removeSegmentListener(SegmentListener
the listener which should no longer be notified listener)Removes the listener from the collection of listeners who will be notified when the receiver's text is modified. |
| public void | removeSelectionListener(SelectionListener
the listener which should no longer be notified listener)Removes the listener from the collection of listeners who will be notified when the control is selected by the user. |
| public void | removeVerifyListener(VerifyListener
the listener which should no longer be notified listener)Removes the listener from the collection of listeners who will be notified when the control is verified. |
| private void | scrollIfNotVisible(byte[]
the GtkTextIter representing the insertion/selection point iter, byte[] the GtkTextIter representing the point to be scrolled to (can be null) scrollTo, boolean true if insertion is being performed, false if selection insert)Methods that insert or select text should not modify the topIndex of the viewer. |
| public void | |
| pack-priv void | setBackgroundGdkRGBA(long context, long handle, GdkRGBA rgba)
Overrides org. |
| pack-priv void | |
| public void | setDoubleClickEnabled(boolean
the new double click flag doubleClick)Sets the double click enabled flag. |
| public void | |
| public void | |
| pack-priv void | |
| pack-priv void | |
| public void | |
| public void | setOrientation(int
new orientation style orientation)Overrides org. SWT.LEFT_TO_RIGHT or SWT.RIGHT_TO_LEFT.
|
| public void | |
| public void | setSelection(int
the start of the range start, int the end of the range end)Sets the selection to the range specified by the given start and end indices. |
| public void | setSelection(Point
the point selection)Sets the selection to the range specified by the given point, where the x coordinate represents the start index and the y coordinate represents the end index. |
| public void | |
| pack-priv void | |
| public void | |
| pack-priv void | |
| public void | setTextChars(char[]
a character array that contains the new text text)Sets the contents of the receiver to the characters in the array. |
| public void | setTextLimit(int
new text limit limit)Sets the maximum number of characters that the receiver is capable of holding to be the argument. |
| public void | setTopIndex(int
the index of the top item index)Sets the zero-relative index of the line which is currently at the top of the receiver. |
| public void | |
| pack-priv int | |
| pack-priv boolean | |
| pack-priv int | |
| pack-priv int | |
| pack-priv String | |
| pack-priv long | |
| pack-priv long | windowProc(long handle, long arg0, long user_data)
Overrides org. |
| pack-priv long | windowProc(long handle, long arg0, long arg1, long user_data)
Overrides org. |
| pack-priv long | windowProc(long handle, long arg0, long arg1, long arg2, long user_data)
Overrides org. |