- _editorSettingsChanged
void _editorSettingsChanged()
- _guiInput
void _guiInput(InputEvent arg0)
- _textChanged
void _textChanged()
- _toggleDrawCaret
void _toggleDrawCaret()
- appendAtCursor
void appendAtCursor(String text)
Adds text after the cursor. If the resulting value is longer than maxLength, nothing happens.
- clear
void clear()
- cursorGetBlinkEnabled
bool cursorGetBlinkEnabled()
- cursorGetBlinkSpeed
double cursorGetBlinkSpeed()
- cursorSetBlinkEnabled
void cursorSetBlinkEnabled(bool enabled)
- cursorSetBlinkSpeed
void cursorSetBlinkSpeed(double blink_speed)
- deleteCharAtCursor
void deleteCharAtCursor()
Deletes one character at the cursor's current position (equivalent to pressing the Delete key).
- deleteText
void deleteText(long from_column, long to_column)
Deletes a section of the text going from position from_column to to_column. Both parameters should be within the text's length.
- deselect
void deselect()
Clears the current selection.
- getAlign
LineEdit.Align getAlign()
- getCursorPosition
long getCursorPosition()
- getExpandToTextLength
bool getExpandToTextLength()
- getMaxLength
long getMaxLength()
- getMenu
PopupMenu getMenu()
- getPlaceholder
String getPlaceholder()
- getPlaceholderAlpha
double getPlaceholderAlpha()
- getRightIcon
Ref!Texture getRightIcon()
- getScrollOffset
long getScrollOffset()
Returns the scroll offset due to caretPosition, as a number of characters.
- getSecretCharacter
String getSecretCharacter()
- getText
String getText()
- isClearButtonEnabled
bool isClearButtonEnabled()
- isContextMenuEnabled
bool isContextMenuEnabled()
- isEditable
bool isEditable()
- isSecret
bool isSecret()
- isSelectingEnabled
bool isSelectingEnabled()
- isShortcutKeysEnabled
bool isShortcutKeysEnabled()
- isVirtualKeyboardEnabled
bool isVirtualKeyboardEnabled()
- menuOption
void menuOption(long option)
Executes a given action as defined in the menuitems enum.
- opAssign
typeof(null) opAssign(typeof(null) n)
- opEquals
bool opEquals(LineEdit other)
- opEquals
bool opEquals(typeof(null) n)
- select
void select(long from, long to)
Selects characters inside LineEdit between from and to. By default, from is at the beginning and to at the end.
- selectAll
void selectAll()
Selects the whole String.
- setAlign
void setAlign(long _align)
- setClearButtonEnabled
void setClearButtonEnabled(bool enable)
- setContextMenuEnabled
void setContextMenuEnabled(bool enable)
- setCursorPosition
void setCursorPosition(long position)
- setEditable
void setEditable(bool enabled)
- setExpandToTextLength
void setExpandToTextLength(bool enabled)
- setMaxLength
void setMaxLength(long chars)
- setPlaceholder
void setPlaceholder(String text)
- setPlaceholderAlpha
void setPlaceholderAlpha(double alpha)
- setRightIcon
void setRightIcon(Texture icon)
- setSecret
void setSecret(bool enabled)
- setSecretCharacter
void setSecretCharacter(String character)
- setSelectingEnabled
void setSelectingEnabled(bool enable)
- setShortcutKeysEnabled
void setShortcutKeysEnabled(bool enable)
- setText
void setText(String text)
- setVirtualKeyboardEnabled
void setVirtualKeyboardEnabled(bool enable)
- toHash
size_t toHash()
- _align
LineEdit.Align _align [@property getter]
long _align [@property setter]
Text alignment as defined in the _align enum.
- caretBlink
bool caretBlink [@property getter]
bool caretBlink [@property setter]
If true, the caret (visual cursor) blinks.
- caretBlinkSpeed
double caretBlinkSpeed [@property getter]
double caretBlinkSpeed [@property setter]
Duration (in seconds) of a caret's blinking cycle.
- caretPosition
long caretPosition [@property getter]
long caretPosition [@property setter]
The cursor's position inside the LineEdit. When set, the text may scroll to accommodate it.
- clearButtonEnabled
bool clearButtonEnabled [@property getter]
bool clearButtonEnabled [@property setter]
If true, the LineEdit will show a clear button if text is not empty, which can be used to clear the text quickly.
- contextMenuEnabled
bool contextMenuEnabled [@property getter]
bool contextMenuEnabled [@property setter]
If true, the context menu will appear when right-clicked.
- editable
bool editable [@property getter]
bool editable [@property setter]
If false, existing text cannot be modified and new text cannot be added.
- expandToTextLength
bool expandToTextLength [@property getter]
bool expandToTextLength [@property setter]
If true, the LineEdit width will increase to stay longer than the text. It will not compress if the text is shortened.
- maxLength
long maxLength [@property getter]
long maxLength [@property setter]
Maximum amount of characters that can be entered inside the LineEdit. If 0, there is no limit.
- placeholderAlpha
double placeholderAlpha [@property getter]
double placeholderAlpha [@property setter]
- placeholderText
String placeholderText [@property getter]
String placeholderText [@property setter]
- rightIcon
Texture rightIcon [@property getter]
Texture rightIcon [@property setter]
- secret
bool secret [@property getter]
bool secret [@property setter]
If true, every character is replaced with the secret character (see secretCharacter).
- secretCharacter
String secretCharacter [@property getter]
String secretCharacter [@property setter]
The character to use to mask secret input (defaults to "*"). Only a single character can be used as the secret character.
- selectingEnabled
bool selectingEnabled [@property getter]
bool selectingEnabled [@property setter]
If false, it's impossible to select the text using mouse nor keyboard.
- shortcutKeysEnabled
bool shortcutKeysEnabled [@property getter]
bool shortcutKeysEnabled [@property setter]
If false, using shortcuts will be disabled.
- text
String text [@property getter]
String text [@property setter]
String value of the LineEdit.
Note: Changing text using this property won't emit the textChanged signal.
- virtualKeyboardEnabled
bool virtualKeyboardEnabled [@property getter]
bool virtualKeyboardEnabled [@property setter]
If true, the native virtual keyboard is shown when focused on platforms that support it.
Control that provides single-line string editing.
LineEdit provides a single-line string editor, used for text fields. It features many built-in shortcuts which will always be available (Ctrl here maps to Command on macOS): - Ctrl + C: Copy - Ctrl + X: Cut - Ctrl + V or Ctrl + Y: Paste/"yank" - Ctrl + Z: Undo - Ctrl + Shift + Z: Redo - Ctrl + U: Delete text from the cursor position to the beginning of the line - Ctrl + K: Delete text from the cursor position to the end of the line - Ctrl + A: Select all text - Up/Down arrow: Move the cursor to the beginning/end of the line On macOS, some extra keyboard shortcuts are available: - Ctrl + F: Like the right arrow key, move the cursor one character right - Ctrl + B: Like the left arrow key, move the cursor one character left - Ctrl + P: Like the up arrow key, move the cursor to the previous line - Ctrl + N: Like the down arrow key, move the cursor to the next line - Ctrl + D: Like the Delete key, delete the character on the right side of cursor - Ctrl + H: Like the Backspace key, delete the character on the left side of the cursor - Command + Left arrow: Like the Home key, move the cursor to the beginning of the line - Command + Right arrow: Like the End key, move the cursor to the end of the line