Navigation
API > API/Runtime > API/Runtime/Slate
Editable text widget
| Name | SEditableText |
| Type | class |
| Header File | /Engine/Source/Runtime/Slate/Public/Widgets/Input/SEditableText.h |
| Include Path | #include "Widgets/Input/SEditableText.h" |
Syntax
class SEditableText :
public SWidget ,
public ISlateEditableTextWidget
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → SWidget → SEditableText
- FSlateControlledConstruction → SWidget → SEditableText
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
SEditableText() |
Constructor | Widgets/Input/SEditableText.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~SEditableText() |
Destructor | Widgets/Input/SEditableText.h |
Structs
| Name | Remarks |
|---|---|
| FArguments |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AdvanceSearch
(
const bool InReverse |
Advance the current search to the next match (does nothing if not currently searching) | Widgets/Input/SEditableText.h | |
bool AnyTextSelected() |
Query to see if any text is selected within the document | Widgets/Input/SEditableText.h | |
void BeginSearch
(
const FText& InSearchText, |
Begin a new text search (this is called automatically when the bound search text changes) | Widgets/Input/SEditableText.h | |
void ClearSelection() |
Clear the active text selection | Widgets/Input/SEditableText.h | |
void Construct
(
const FArguments& InArgs |
Construct this widget | Widgets/Input/SEditableText.h | |
void EnableTextInputMethodContext() |
Register and activate the IME context for this text layout | Widgets/Input/SEditableText.h | |
FSlateFontInfo GetFont() |
Gets the font used to draw the text. | Widgets/Input/SEditableText.h | |
FText GetHintText() |
Get the text that appears when there is no text in the text box | Widgets/Input/SEditableText.h | |
FText GetSearchText() |
Get the text that is currently being searched for (if any) | Widgets/Input/SEditableText.h | |
FText GetSelectedText() |
Get the currently selected text | Widgets/Input/SEditableText.h | |
FTextSelection GetSelection() |
Get the current selection | Widgets/Input/SEditableText.h | |
FText GetText() |
Returns the text string | Widgets/Input/SEditableText.h | |
void GoTo
(
const ETextLocation NewLocation |
Move the cursor specified location | Widgets/Input/SEditableText.h | |
void GoTo
(
const FTextLocation& NewLocation |
Move the cursor to the given location in the document (will also scroll to this point) | Widgets/Input/SEditableText.h | |
void ScrollTo
(
const FTextLocation& NewLocation |
Scroll to the given location in the document (without moving the cursor) | Widgets/Input/SEditableText.h | |
void ScrollTo
(
const ETextLocation NewLocation |
Scroll to the given location in the document (without moving the cursor) | Widgets/Input/SEditableText.h | |
void SelectAllText() |
Select all the text in the document | Widgets/Input/SEditableText.h | |
void SelectText
(
const FTextLocation& InSelectionStart, |
Select a block of text | Widgets/Input/SEditableText.h | |
void SetAllowContextMenu
(
const TAttribute< bool >& InAllowContextMenu |
See the AllowContextMenu attribute | Widgets/Input/SEditableText.h | |
void SetClearKeyboardFocusOnCommit
(
const TAttribute< bool >& InClearKeyboardFocusOnCommit |
Sets whether to clear keyboard focus when pressing enter to commit changes | Widgets/Input/SEditableText.h | |
void SetColorAndOpacity
(
TAttribute< FSlateColor > Color |
See the ColorAndOpacity attribute | Widgets/Input/SEditableText.h | |
bool SetEditableText
(
const FText& InNewText |
Sets the text currently being edited Note: Doesn't override the bound Text attribute, nor does it call OnTextChanged | Widgets/Input/SEditableText.h | |
void SetEnableIntegratedKeyboard
(
const TAttribute< bool >& InEnableIntegratedKeyboard |
See the EnableIntegratedKeyboard attribute | Widgets/Input/SEditableText.h | |
void SetFont
(
const TAttribute< FSlateFontInfo >& InNewFont |
Sets the font used to draw the text | Widgets/Input/SEditableText.h | |
void SetHintText
(
const TAttribute< FText >& InHintText |
See the HintText attribute | Widgets/Input/SEditableText.h | |
void SetIsCaretMovedWhenGainFocus
(
const TAttribute< bool >& InIsCaretMovedWhenGainFocus |
Workaround as we loose focus when the auto completion closes. | Widgets/Input/SEditableText.h | |
void SetIsPassword
(
TAttribute< bool > InIsPassword |
See the IsPassword attribute | Widgets/Input/SEditableText.h | |
void SetIsReadOnly
(
TAttribute< bool > InIsReadOnly |
See the IsReadOnly attribute | Widgets/Input/SEditableText.h | |
void SetJustification
(
const TAttribute< ETextJustify::Type >& InJustification |
See Justification attribute | Widgets/Input/SEditableText.h | |
void SetMinDesiredWidth
(
const TAttribute< float >& InMinDesiredWidth |
Sets the minimum width that a text block should be. | Widgets/Input/SEditableText.h | |
void SetOnKeyCharHandler
(
FOnKeyChar InOnKeyCharHandler |
Sets the OnKeyCharHandler to provide first chance handling of the OnKeyChar event | Widgets/Input/SEditableText.h | |
void SetOnKeyDownHandler
(
FOnKeyDown InOnKeyDownHandler |
Sets the OnKeyDownHandler to provide first chance handling of the OnKeyDown event | Widgets/Input/SEditableText.h | |
void SetOverflowPolicy
(
TOptional< ETextOverflowPolicy > InOverflowPolicy |
Sets the overflow policy for this text block | Widgets/Input/SEditableText.h | |
void SetRevertTextOnEscape
(
const TAttribute< bool >& InRevertTextOnEscape |
Sets whether to allow the user to back out of changes when they press the escape key | Widgets/Input/SEditableText.h | |
void SetSearchText
(
const TAttribute< FText >& InSearchText |
Set the text that is currently being searched for (if any) | Widgets/Input/SEditableText.h | |
void SetSelectAllTextOnCommit
(
const TAttribute< bool >& InSelectAllTextOnCommit |
Sets whether to select all text when pressing enter to commit changes | Widgets/Input/SEditableText.h | |
void SetSelectAllTextWhenFocused
(
const TAttribute< bool >& InSelectAllTextWhenFocused |
Sets whether to select all text when the user clicks to give focus on the widget | Widgets/Input/SEditableText.h | |
void SetSelectWordOnMouseDoubleClick
(
const TAttribute< bool >& InSelectWordOnMouseDoubleClick |
Sets whether to select word on the mouse double click | Widgets/Input/SEditableText.h | |
void SetText
(
const TAttribute< FText >& InNewText |
Sets the text currently being edited | Widgets/Input/SEditableText.h | |
void SetTextBlockStyle
(
const FTextBlockStyle* InTextStyle |
@See TextStyle Sets the text block style used to draw the text | Widgets/Input/SEditableText.h | |
void SetTextFlowDirection
(
const TOptional< ETextFlowDirection >& InTextFlowDirection |
See TextFlowDirection attribute | Widgets/Input/SEditableText.h | |
void SetTextShapingMethod
(
const TOptional< ETextShapingMethod >& InTextShapingMethod |
See TextShapingMethod attribute | Widgets/Input/SEditableText.h | |
void SetTextStyle
(
const FEditableTextStyle& InNewTextStyle |
Sets the text style used to draw the text | Widgets/Input/SEditableText.h | |
void SetVirtualKeyboardDismissAction
(
TAttribute< EVirtualKeyboardDismissAction > InVirtualKeyboardDismissAction |
Set the VirtualKeyboardDismissAction attribute | Widgets/Input/SEditableText.h | |
void ToggleVirtualKeyboard
(
bool bShow, |
Function to spawn virtual keyboard on demand | Widgets/Input/SEditableText.h |
Overridden from ISlateEditableTextWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool IsIntegratedKeyboardEnabled() |
Is the widget currently has IntegratedKeyboard enabled? | Widgets/Input/SEditableText.h | |
virtual bool IsMultiLineTextEdit() |
Is the text edit multi-line aware? | Widgets/Input/SEditableText.h | |
virtual bool IsTextPassword() |
Is the text displaying a password and should be obscured? | Widgets/Input/SEditableText.h | |
virtual bool IsTextReadOnly() |
Is the text currently read-only? | Widgets/Input/SEditableText.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void OnArrangeChildren
(
const FGeometry& AllottedGeometry, |
Widgets/Input/SEditableText.h | ||
virtual int32 OnPaint
(
const FPaintArgs& Args, |
Widgets/Input/SEditableText.h | ||
void SynchronizeTextStyle() |
Synchronize the text style currently set (including from overrides) and update the text layout if required | Widgets/Input/SEditableText.h |
Overridden from SWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void CacheDesiredSize
(
float LayoutScaleMultiplier |
Widgets/Input/SEditableText.h | ||
virtual FVector2D ComputeDesiredSize
(
float LayoutScaleMultiplier |
Widgets/Input/SEditableText.h | ||
virtual bool ComputeVolatility() |
Widgets/Input/SEditableText.h | ||
virtual TSharedRef< FSlateAccessibleWidget > CreateAccessibleWidget() |
Widgets/Input/SEditableText.h | ||
virtual FChildren * GetChildren() |
Widgets/Input/SEditableText.h | ||
virtual TOptional< FText > GetDefaultAccessibleText
(
EAccessibleType AccessibleType |
Widgets/Input/SEditableText.h | ||
virtual const FSlateBrush * GetFocusBrush() |
Widgets/Input/SEditableText.h | ||
virtual bool IsInteractable() |
Widgets/Input/SEditableText.h | ||
virtual FCursorReply OnCursorQuery
(
const FGeometry& MyGeometry, |
Widgets/Input/SEditableText.h | ||
virtual FReply OnDragOver
(
const FGeometry& MyGeometry, |
Widgets/Input/SEditableText.h | ||
virtual FReply OnDrop
(
const FGeometry& MyGeometry, |
Widgets/Input/SEditableText.h | ||
virtual void OnFocusLost
(
const FFocusEvent& InFocusEvent |
Widgets/Input/SEditableText.h | ||
virtual FReply OnFocusReceived
(
const FGeometry& MyGeometry, |
Widgets/Input/SEditableText.h | ||
virtual FReply OnKeyChar
(
const FGeometry& MyGeometry, |
Widgets/Input/SEditableText.h | ||
| Widgets/Input/SEditableText.h | |||
| Widgets/Input/SEditableText.h | |||
virtual FReply OnMouseButtonDoubleClick
(
const FGeometry& InMyGeometry, |
Widgets/Input/SEditableText.h | ||
virtual FReply OnMouseButtonDown
(
const FGeometry& InMyGeometry, |
Widgets/Input/SEditableText.h | ||
virtual FReply OnMouseButtonUp
(
const FGeometry& InMyGeometry, |
Widgets/Input/SEditableText.h | ||
virtual FReply OnMouseMove
(
const FGeometry& InMyGeometry, |
Widgets/Input/SEditableText.h | ||
virtual bool SupportsKeyboardFocus() |
Widgets/Input/SEditableText.h | ||
virtual void Tick
(
const FGeometry& AllottedGeometry, |
Widgets/Input/SEditableText.h |
Overridden from ISlateEditableTextWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TSharedPtr< SWidget > BuildContextMenuContent() |
Build the context menu content to use for this widget (if any) | Widgets/Input/SEditableText.h | |
virtual bool CanInsertCarriageReturn() |
Are we currently able to insert a carriage return? (some widgets have modifier keys that need to be pressed) | Widgets/Input/SEditableText.h | |
virtual bool CanTypeCharacter
(
const TCHAR InChar |
Are we able to insert the given character into our text? | Widgets/Input/SEditableText.h | |
virtual void EnsureActiveTick() |
Ensure that we will get a Tick() soon (either due to having active focus, or something having changed progmatically and requiring an update) Does nothing if the active tick timer is already enabled | Widgets/Input/SEditableText.h | |
virtual TSharedRef< SWidget > GetSlateWidget() |
Get the Slate widget this interface is representing (may not be called during destruction) | Widgets/Input/SEditableText.h | |
virtual TSharedPtr< SWidget > GetSlateWidgetPtr() |
Get the Slate widget this interface is representing (may be null during destruction) | Widgets/Input/SEditableText.h | |
virtual EVirtualKeyboardDismissAction GetVirtualKeyboardDismissAction() |
Get the message action to take when the virtual keyboard is dismissed by the user | Widgets/Input/SEditableText.h | |
virtual FVirtualKeyboardOptions GetVirtualKeyboardOptions() |
Get the options for the virtual keyboard used for this widget | Widgets/Input/SEditableText.h | |
virtual EVirtualKeyboardTrigger GetVirtualKeyboardTrigger() |
Get the type of event that will trigger the display of the virtual keyboard | Widgets/Input/SEditableText.h | |
virtual EKeyboardType GetVirtualKeyboardType() |
Get the type of virtual keyboard to use for this widget | Widgets/Input/SEditableText.h | |
virtual void OnBeginTextEdit
(
const FText& InText |
Called when the text starts to be edited | Widgets/Input/SEditableText.h | |
virtual void OnCursorMoved
(
const FTextLocation& InLocation |
Called when the cursor is moved within the text area | Widgets/Input/SEditableText.h | |
virtual void OnTextChanged
(
const FText& InText |
Called when the text has been changed by an edit operation | Widgets/Input/SEditableText.h | |
virtual void OnTextCommitted
(
const FText& InText, |
Called when the text control has committed its current edit changes | Widgets/Input/SEditableText.h | |
virtual bool ShouldClearKeyboardFocusOnCommit() |
Should we clear the keyboard focus when the user commits text to this widget? | Widgets/Input/SEditableText.h | |
virtual bool ShouldClearTextSelectionOnFocusLoss() |
Should the text clear its selection the widget loses focus? | Widgets/Input/SEditableText.h | |
virtual bool ShouldJumpCursorToEndWhenFocused() |
Should the cursor be jumped to the end of the document when the widget gains focus? | Widgets/Input/SEditableText.h | |
virtual bool ShouldRevertTextOnEscape() |
Should we revert the text back to its original state when the user presses escape? | Widgets/Input/SEditableText.h | |
virtual bool ShouldSelectAllTextOnCommit() |
Should we select all text when the user commits text to this widget? | Widgets/Input/SEditableText.h | |
virtual bool ShouldSelectAllTextWhenFocused() |
Should the text be selected when the widget gains focus? | Widgets/Input/SEditableText.h | |
virtual bool ShouldSelectWordOnMouseDoubleClick() |
Should we select word on mouse double click? | Widgets/Input/SEditableText.h | |
virtual float UpdateAndClampHorizontalScrollBar
(
const float InViewOffset, |
Called when the fraction and offset of the horizontal scroll area has been recalculated. | Widgets/Input/SEditableText.h | |
virtual float UpdateAndClampVerticalScrollBar
(
const float InViewOffset, |
Called when the fraction and offset of the vertical scroll area has been recalculated. | Widgets/Input/SEditableText.h |