UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SEditableText Class Reference

#include <SEditableText.h>

+ Inheritance diagram for SEditableText:

Public Member Functions

 SLATE_BEGIN_ARGS (SEditableText)
 
SLATE_API SEditableText ()
 
SLATE_API ~SEditableText ()
 
SLATE_API void Construct (const FArguments &InArgs)
 
SLATE_API void SetText (const TAttribute< FText > &InNewText)
 
SLATE_API FText GetText () const
 
SLATE_API bool SetEditableText (const FText &InNewText)
 
SLATE_API void SetHintText (const TAttribute< FText > &InHintText)
 
SLATE_API FText GetHintText () const
 
SLATE_API void SetSearchText (const TAttribute< FText > &InSearchText)
 
SLATE_API FText GetSearchText () const
 
SLATE_API void SetIsReadOnly (TAttribute< bool > InIsReadOnly)
 
SLATE_API void SetIsPassword (TAttribute< bool > InIsPassword)
 
SLATE_API void SetColorAndOpacity (TAttribute< FSlateColor > Color)
 
SLATE_API void SetAllowContextMenu (const TAttribute< bool > &InAllowContextMenu)
 
SLATE_API void SetEnableIntegratedKeyboard (const TAttribute< bool > &InEnableIntegratedKeyboard)
 
SLATE_API void SetVirtualKeyboardDismissAction (TAttribute< EVirtualKeyboardDismissAction > InVirtualKeyboardDismissAction)
 
SLATE_API void SetFont (const TAttribute< FSlateFontInfo > &InNewFont)
 
SLATE_API FSlateFontInfo GetFont () const
 
SLATE_API void SetTextStyle (const FEditableTextStyle &InNewTextStyle)
 
SLATE_API void SetTextBlockStyle (const FTextBlockStyle *InTextStyle)
 
SLATE_API void SetMinDesiredWidth (const TAttribute< float > &InMinDesiredWidth)
 
SLATE_API void SetIsCaretMovedWhenGainFocus (const TAttribute< bool > &InIsCaretMovedWhenGainFocus)
 
SLATE_API void SetSelectAllTextWhenFocused (const TAttribute< bool > &InSelectAllTextWhenFocused)
 
SLATE_API void SetRevertTextOnEscape (const TAttribute< bool > &InRevertTextOnEscape)
 
SLATE_API void SetClearKeyboardFocusOnCommit (const TAttribute< bool > &InClearKeyboardFocusOnCommit)
 
SLATE_API void SetSelectAllTextOnCommit (const TAttribute< bool > &InSelectAllTextOnCommit)
 
SLATE_API void SetSelectWordOnMouseDoubleClick (const TAttribute< bool > &InSelectWordOnMouseDoubleClick)
 
SLATE_API void SetJustification (const TAttribute< ETextJustify::Type > &InJustification)
 
void SetOnKeyCharHandler (FOnKeyChar InOnKeyCharHandler)
 
void SetOnKeyDownHandler (FOnKeyDown InOnKeyDownHandler)
 
SLATE_API void SetTextShapingMethod (const TOptional< ETextShapingMethod > &InTextShapingMethod)
 
SLATE_API void SetTextFlowDirection (const TOptional< ETextFlowDirection > &InTextFlowDirection)
 
SLATE_API void SetOverflowPolicy (TOptional< ETextOverflowPolicy > InOverflowPolicy)
 
SLATE_API bool AnyTextSelected () const
 
SLATE_API void SelectAllText ()
 
SLATE_API void ClearSelection ()
 
SLATE_API FText GetSelectedText () const
 
SLATE_API void GoTo (const FTextLocation &NewLocation)
 
SLATE_API void GoTo (const ETextLocation NewLocation)
 
SLATE_API void ScrollTo (const FTextLocation &NewLocation)
 
SLATE_API void ScrollTo (const ETextLocation NewLocation)
 
SLATE_API void BeginSearch (const FText &InSearchText, const ESearchCase::Type InSearchCase=ESearchCase::IgnoreCase, const bool InReverse=false)
 
SLATE_API void AdvanceSearch (const bool InReverse=false)
 
SLATE_API void EnableTextInputMethodContext ()
 
SLATE_API FTextSelection GetSelection () const
 
SLATE_API void SelectText (const FTextLocation &InSelectionStart, const FTextLocation &InCursorLocation)
 
SLATE_API void ToggleVirtualKeyboard (bool bShow, const int32 UserIndex)
 
virtual SLATE_API bool IsTextReadOnly () const override
 
virtual SLATE_API bool IsTextPassword () const override
 
virtual SLATE_API bool IsMultiLineTextEdit () const override
 
virtual SLATE_API bool IsIntegratedKeyboardEnabled () const override
 
- Public Member Functions inherited from SWidget
SLATECORE_API int32 Paint (const FPaintArgs &Args, const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle, bool bParentEnabled) const
 
virtual SLATECORE_API void OnFocusChanging (const FWeakWidgetPath &PreviousFocusPath, const FWidgetPath &NewWidgetPath, const FFocusEvent &InFocusEvent)
 
virtual SLATECORE_API FReply OnPreviewKeyDown (const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent)
 
virtual SLATECORE_API FReply OnAnalogValueChanged (const FGeometry &MyGeometry, const FAnalogInputEvent &InAnalogInputEvent)
 
virtual SLATECORE_API FReply OnPreviewMouseButtonDown (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 
virtual SLATECORE_API void OnMouseEnter (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 
virtual SLATECORE_API void OnMouseLeave (const FPointerEvent &MouseEvent)
 
virtual SLATECORE_API FReply OnMouseWheel (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 
virtual SLATECORE_API TOptional< TSharedRef< SWidget > > OnMapCursor (const FCursorReply &CursorReply) const
 
virtual SLATECORE_API bool OnVisualizeTooltip (const TSharedPtr< SWidget > &TooltipContent)
 
virtual SLATECORE_API TSharedPtr< FPopupLayerOnVisualizePopup (const TSharedRef< SWidget > &PopupContent)
 
virtual SLATECORE_API FReply OnDragDetected (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 
virtual SLATECORE_API void OnDragEnter (const FGeometry &MyGeometry, const FDragDropEvent &DragDropEvent)
 
virtual SLATECORE_API void OnDragLeave (const FDragDropEvent &DragDropEvent)
 
virtual SLATECORE_API FReply OnTouchGesture (const FGeometry &MyGeometry, const FPointerEvent &GestureEvent)
 
virtual SLATECORE_API FReply OnTouchStarted (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
 
virtual SLATECORE_API FReply OnTouchMoved (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
 
virtual SLATECORE_API FReply OnTouchEnded (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
 
virtual SLATECORE_API FReply OnTouchForceChanged (const FGeometry &MyGeometry, const FPointerEvent &TouchEvent)
 
virtual SLATECORE_API FReply OnTouchFirstMove (const FGeometry &MyGeometry, const FPointerEvent &TouchEvent)
 
virtual SLATECORE_API FReply OnMotionDetected (const FGeometry &MyGeometry, const FMotionEvent &InMotionEvent)
 
virtual SLATECORE_API TOptional< boolOnQueryShowFocus (const EFocusCause InFocusCause) const
 
virtual SLATECORE_API FPopupMethodReply OnQueryPopupMethod () const
 
virtual SLATECORE_API TOptional< FVirtualPointerPositionTranslateMouseCoordinateForCustomHitTestChild (const SWidget &ChildWidget, const FGeometry &MyGeometry, const FVector2D ScreenSpaceMouseCoordinate, const FVector2D LastScreenSpaceMouseCoordinate) const
 
virtual SLATECORE_API void OnFinishedPointerInput ()
 
virtual SLATECORE_API void OnFinishedKeyInput ()
 
virtual SLATECORE_API FNavigationReply OnNavigation (const FGeometry &MyGeometry, const FNavigationEvent &InNavigationEvent)
 
virtual SLATECORE_API EWindowZone::Type GetWindowZoneOverride () const
 
bool NeedsPrepass () const
 
SLATECORE_API void SlatePrepass ()
 
SLATECORE_API void SlatePrepass (float InLayoutScaleMultiplier)
 
void SetCanTick (bool bInCanTick)
 
bool GetCanTick () const
 
bool HasRegisteredSlateAttribute () const
 
bool IsAttributesUpdatesEnabled () const
 
const FSlateWidgetPersistentStateGetPersistentState () const
 
const FWidgetProxyHandle GetProxyHandle () const
 
SLATECORE_API UE::Slate::FDeprecateVector2DResult GetDesiredSize () const
 
SLATECORE_API void AssignParentWidget (TSharedPtr< SWidget > InParent)
 
SLATECORE_API bool ConditionallyDetatchParentWidget (SWidget *InExpectedParent)
 
virtual bool ValidatePathToChild (SWidget *InChild)
 
bool IsParentValid () const
 
TSharedPtr< SWidgetGetParentWidget () const
 
TSharedPtr< SWidgetAdvanced_GetPaintParentWidget () const
 
SLATECORE_API FSlateRect CalculateCullingAndClippingRules (const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, bool &bClipToBounds, bool &bAlwaysClip, bool &bIntersectClipBounds) const
 
bool HasAnyUpdateFlags (EWidgetUpdateFlags FlagsToCheck) const
 
TStatId GetStatID (bool bForDeferredUse=false) const
 
virtual SLATECORE_API float GetRelativeLayoutScale (const int32 ChildIndex, float LayoutScaleMultiplier) const
 
SLATECORE_API void ArrangeChildren (const FGeometry &AllottedGeometry, FArrangedChildren &ArrangedChildren, bool bUpdateAttributes=false) const
 
virtual FChildrenGetAllChildren ()
 
virtual SLATECORE_API bool HasKeyboardFocus () const
 
SLATECORE_API TOptional< EFocusCauseHasUserFocus (int32 UserIndex) const
 
SLATECORE_API TOptional< EFocusCauseHasAnyUserFocus () const
 
SLATECORE_API bool HasUserFocusedDescendants (int32 UserIndex) const
 
SLATECORE_API bool HasFocusedDescendants () const
 
SLATECORE_API bool HasAnyUserFocusOrFocusedDescendants () const
 
SLATECORE_API bool HasMouseCapture () const
 
SLATECORE_API bool HasMouseCaptureByUser (int32 UserIndex, TOptional< int32 > PointerIndex=TOptional< int32 >()) const
 
virtual SLATECORE_API void OnMouseCaptureLost (const FCaptureLostEvent &CaptureLostEvent)
 
void SetEnabled (TAttribute< bool > InEnabledState)
 
bool IsEnabled () const
 
virtual SLATECORE_API TSharedPtr< IToolTipGetToolTip ()
 
virtual SLATECORE_API void OnToolTipClosing ()
 
SLATECORE_API void EnableToolTipForceField (const bool bEnableForceField)
 
bool HasToolTipForceField () const
 
bool IsHovered () const
 
SLATECORE_API bool IsDirectlyHovered () const
 
EVisibility GetVisibility () const
 
virtual SLATECORE_API void SetVisibility (TAttribute< EVisibility > InVisibility)
 
bool IsVolatile () const
 
bool IsVolatileIndirectly () const
 
void ForceVolatile (bool bForce)
 
bool ShouldInvalidatePrepassDueToVolatility ()
 
SLATECORE_API void Invalidate (EInvalidateWidgetReason InvalidateReason)
 
void CacheVolatility ()
 
void MarkPrepassAsDirty ()
 
float GetRenderOpacity () const
 
void SetRenderOpacity (float InRenderOpacity)
 
void SetTag (FName InTag)
 
const TOptional< FSlateRenderTransform > & GetRenderTransform () const
 
TOptional< FSlateRenderTransformGetRenderTransformWithRespectToFlowDirection () const
 
UE::Slate::FDeprecateVector2DResult GetRenderTransformPivotWithRespectToFlowDirection () const
 
void SetRenderTransform (TAttribute< TOptional< FSlateRenderTransform > > InTransform)
 
UE::Slate::FDeprecateVector2DResult GetRenderTransformPivot () const
 
void SetRenderTransformPivot (TAttribute< FVector2D > InTransformPivot)
 
SLATECORE_API void SetClipping (EWidgetClipping InClipping)
 
EWidgetClipping GetClipping () const
 
SLATECORE_API void SetPixelSnapping (EWidgetPixelSnapping InPixelSnappingMethod)
 
EWidgetPixelSnapping GetPixelSnapping () const
 
void SetCullingBoundsExtension (const FMargin &InCullingBoundsExtension)
 
FMargin GetCullingBoundsExtension () const
 
void SetFlowDirectionPreference (EFlowDirectionPreference InFlowDirectionPreference)
 
EFlowDirectionPreference GetFlowDirectionPreference () const
 
SLATECORE_API void SetToolTipText (const TAttribute< FText > &ToolTipText)
 
SLATECORE_API void SetToolTipText (const FText &InToolTipText)
 
SLATECORE_API void SetToolTip (const TAttribute< TSharedPtr< IToolTip > > &InToolTip)
 
SLATECORE_API void SetCursor (const TAttribute< TOptional< EMouseCursor::Type > > &InCursor)
 
template<typename MetaDataType >
TSharedPtr< MetaDataType > GetMetaData () const
 
template<typename MetaDataType >
TArray< TSharedRef< MetaDataType > > GetAllMetaData () const
 
template<typename MetaDataType >
void AddMetadata (const TSharedRef< MetaDataType > &AddMe)
 
template<typename MetaDataType >
int32 RemoveMetaData (const TSharedRef< MetaDataType > &RemoveMe)
 
SLATECORE_API void SetOnMouseButtonDown (FPointerEventHandler EventHandler)
 
SLATECORE_API void SetOnMouseButtonUp (FPointerEventHandler EventHandler)
 
SLATECORE_API void SetOnMouseMove (FPointerEventHandler EventHandler)
 
SLATECORE_API void SetOnMouseDoubleClick (FPointerEventHandler EventHandler)
 
SLATECORE_API void SetOnMouseEnter (FNoReplyPointerEventHandler EventHandler)
 
SLATECORE_API void SetOnMouseLeave (FSimpleNoReplyPointerEventHandler EventHandler)
 
virtual SLATECORE_API FString ToString () const
 
SLATECORE_API FString GetTypeAsString () const
 
SLATECORE_API FName GetType () const
 
virtual SLATECORE_API FString GetReadableLocation () const
 
SLATECORE_API FName GetCreatedInLocation () const
 
virtual SLATECORE_API FName GetTag () const
 
virtual SLATECORE_API FSlateColor GetForegroundColor () const
 
virtual SLATECORE_API FSlateColor GetDisabledForegroundColor () const
 
SLATECORE_API const FGeometryGetCachedGeometry () const
 
SLATECORE_API const FGeometryGetTickSpaceGeometry () const
 
SLATECORE_API const FGeometryGetPaintSpaceGeometry () const
 
const TOptional< FSlateClippingState > & GetCurrentClippingState () const
 
virtual bool Advanced_IsWindow () const
 
virtual bool Advanced_IsInvalidationRoot () const
 
virtual const FSlateInvalidationRootAdvanced_AsInvalidationRoot () const
 
SLATECORE_API TSharedRef< FActiveTimerHandleRegisterActiveTimer (float TickPeriod, FWidgetActiveTimerDelegate TickFunction)
 
SLATECORE_API void UnRegisterActiveTimer (const TSharedRef< FActiveTimerHandle > &ActiveTimerHandle)
 
bool HasActiveTimers () const
 
- Public Member Functions inherited from FSlateControlledConstruction
 FSlateControlledConstruction ()=default
 
virtual ~FSlateControlledConstruction ()=default
 
virtual const FSlateWidgetClassDataGetWidgetClass () const =0
 
void operator delete (void *mem)
 
- Public Member Functions inherited from TSharedFromThis< SWidget >
TSharedRef< SWidget, Mode > AsShared ()
 
TSharedRef< SWidget const, Mode > AsShared () const
 
TSharedRef< SubobjectType, Mode > AsSharedSubobject (SubobjectType *SubobjectPtr) const
 
TWeakPtr< SWidget, Mode > AsWeak ()
 
TWeakPtr< SWidget const, Mode > AsWeak () const
 
TWeakPtr< SubobjectType, Mode > AsWeakSubobject (SubobjectType *SubobjectPtr) const
 
void UpdateWeakReferenceInternal (TSharedPtr< SharedPtrType, SharedPtrMode > const *InSharedPtr, OtherType *InObject) const
 
void UpdateWeakReferenceInternal (TSharedRef< SharedRefType, SharedPtrMode > const *InSharedRef, OtherType *InObject) const
 
UE_FORCEINLINE_HINT bool DoesSharedInstanceExist () const
 

Protected Member Functions

virtual SLATE_API void Tick (const FGeometry &AllottedGeometry, const double InCurrentTime, const float InDeltaTime) override
 
virtual SLATE_API int32 OnPaint (const FPaintArgs &Args, const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle, bool bParentEnabled) const override
 
virtual SLATE_API void CacheDesiredSize (float LayoutScaleMultiplier) override
 
virtual SLATE_API FVector2D ComputeDesiredSize (float LayoutScaleMultiplier) const override
 
virtual SLATE_API FChildrenGetChildren () override
 
virtual SLATE_API void OnArrangeChildren (const FGeometry &AllottedGeometry, FArrangedChildren &ArrangedChildren) const override
 
virtual SLATE_API FReply OnDragOver (const FGeometry &MyGeometry, const FDragDropEvent &DragDropEvent) override
 
virtual SLATE_API FReply OnDrop (const FGeometry &MyGeometry, const FDragDropEvent &DragDropEvent) override
 
virtual SLATE_API bool SupportsKeyboardFocus () const override
 
virtual SLATE_API FReply OnFocusReceived (const FGeometry &MyGeometry, const FFocusEvent &InFocusEvent) override
 
virtual SLATE_API void OnFocusLost (const FFocusEvent &InFocusEvent) override
 
virtual SLATE_API FReply OnKeyChar (const FGeometry &MyGeometry, const FCharacterEvent &InCharacterEvent) override
 
virtual SLATE_API FReply OnKeyDown (const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent) override
 
virtual SLATE_API FReply OnKeyUp (const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent) override
 
virtual SLATE_API FReply OnMouseButtonDown (const FGeometry &InMyGeometry, const FPointerEvent &InMouseEvent) override
 
virtual SLATE_API FReply OnMouseButtonUp (const FGeometry &InMyGeometry, const FPointerEvent &InMouseEvent) override
 
virtual SLATE_API FReply OnMouseMove (const FGeometry &InMyGeometry, const FPointerEvent &InMouseEvent) override
 
virtual SLATE_API FReply OnMouseButtonDoubleClick (const FGeometry &InMyGeometry, const FPointerEvent &InMouseEvent) override
 
virtual SLATE_API FCursorReply OnCursorQuery (const FGeometry &MyGeometry, const FPointerEvent &CursorEvent) const override
 
virtual SLATE_API const FSlateBrushGetFocusBrush () const
 
virtual SLATE_API bool IsInteractable () const override
 
virtual SLATE_API bool ComputeVolatility () const override
 
SLATE_API void SynchronizeTextStyle ()
 
virtual SLATE_API bool ShouldJumpCursorToEndWhenFocused () const override
 
virtual SLATE_API bool ShouldSelectAllTextWhenFocused () const override
 
virtual SLATE_API bool ShouldClearTextSelectionOnFocusLoss () const override
 
virtual SLATE_API bool ShouldRevertTextOnEscape () const override
 
virtual SLATE_API bool ShouldClearKeyboardFocusOnCommit () const override
 
virtual SLATE_API bool ShouldSelectAllTextOnCommit () const override
 
virtual SLATE_API bool ShouldSelectWordOnMouseDoubleClick () const override
 
virtual SLATE_API bool CanInsertCarriageReturn () const override
 
virtual SLATE_API bool CanTypeCharacter (const TCHAR InChar) const override
 
virtual SLATE_API void EnsureActiveTick () override
 
virtual SLATE_API EKeyboardType GetVirtualKeyboardType () const override
 
virtual SLATE_API FVirtualKeyboardOptions GetVirtualKeyboardOptions () const override
 
virtual SLATE_API EVirtualKeyboardTrigger GetVirtualKeyboardTrigger () const override
 
virtual SLATE_API EVirtualKeyboardDismissAction GetVirtualKeyboardDismissAction () const override
 
virtual SLATE_API TSharedRef< SWidgetGetSlateWidget () override
 
virtual SLATE_API TSharedPtr< SWidgetGetSlateWidgetPtr () override
 
virtual SLATE_API TSharedPtr< SWidgetBuildContextMenuContent () const override
 
virtual SLATE_API void OnBeginTextEdit (const FText &InText) override
 
virtual SLATE_API void OnTextChanged (const FText &InText) override
 
virtual SLATE_API void OnTextCommitted (const FText &InText, const ETextCommit::Type InTextAction) override
 
virtual SLATE_API void OnCursorMoved (const FTextLocation &InLocation) override
 
virtual SLATE_API float UpdateAndClampHorizontalScrollBar (const float InViewOffset, const float InViewFraction, const EVisibility InVisiblityOverride) override
 
virtual SLATE_API float UpdateAndClampVerticalScrollBar (const float InViewOffset, const float InViewFraction, const EVisibility InVisiblityOverride) override
 
- Protected Member Functions inherited from SWidget
void SetVolatilePrepass (bool bVolatile)
 
virtual bool CustomPrepass (float LayoutScaleMultiplier)
 
void SetHover (TAttribute< bool > InHovered)
 
bool IsChildWidgetCulled (const FSlateRect &, const FArrangedWidget &) const
 
SLATECORE_API void InvalidateChildRemovedFromTree (SWidget &Child)
 
bool Advanced_InvalidateVolatility ()
 
EFlowDirection ComputeFlowDirection () const
 
SLATECORE_API void SetDebugInfo (const ANSICHAR *InType, const ANSICHAR *InFile, int32 OnLine, size_t InAllocSize)
 
virtual SLATECORE_API TOptional< EMouseCursor::TypeGetCursor () const
 
SLATECORE_API SWidget ()
 
SLATECORE_API void SWidgetConstruct (const FSlateBaseNamedArgs &Args)
 
bool IsConstructed () const
 
SLATECORE_API bool FindChildGeometries (const FGeometry &MyGeometry, const TSet< TSharedRef< SWidget > > &WidgetsToFind, TMap< TSharedRef< SWidget >, FArrangedWidget > &OutResult) const
 
SLATECORE_API void FindChildGeometries_Helper (const FGeometry &MyGeometry, const TSet< TSharedRef< SWidget > > &WidgetsToFind, TMap< TSharedRef< SWidget >, FArrangedWidget > &OutResult) const
 
SLATECORE_API FGeometry FindChildGeometry (const FGeometry &MyGeometry, TSharedRef< SWidget > WidgetToFind) const
 
bool ShouldBeEnabled (bool InParentEnabled) const
 
virtual SLATECORE_API void OnClippingChanged ()
 
float GetPrepassLayoutScaleMultiplier () const
 
SLATECORE_API void Prepass_ChildLoop (float InLayoutScaleMultiplier, FChildren *MyChildren)
 
template<typename TargetValueType , typename SourceValueType >
bool SetAttribute (TAttribute< TargetValueType > &TargetValue, const TAttribute< SourceValueType > &SourceValue, EInvalidateWidgetReason BaseInvalidationReason)
 
TSlateAttributeRef< boolGetEnabledStateAttribute () const
 
TSlateAttributeRef< boolGetHoveredAttribute () const
 
TSlateAttributeRef< EVisibilityGetVisibilityAttribute () const
 
TSlateAttributeRef< TOptional< FSlateRenderTransform > > GetRenderTransformAttribute () const
 
TSlateAttributeRef< FVector2DGetRenderTransformPivotAttribute () const
 
virtual SLATECORE_API ~SWidget ()
 
- Protected Member Functions inherited from TSharedFromThis< SWidget >
 TSharedFromThis ()
 
 TSharedFromThis (TSharedFromThis const &)
 
UE_FORCEINLINE_HINT TSharedFromThisoperator= (TSharedFromThis const &)
 
 ~TSharedFromThis ()
 

Protected Attributes

TSharedPtr< FPlainTextLayoutMarshallerPlainTextMarshaller
 
TUniquePtr< FSlateEditableTextLayoutEditableTextLayout
 
TAttribute< FSlateFontInfoFont
 
TAttribute< FSlateColorColorAndOpacity
 
TAttribute< const FSlateBrush * > BackgroundImageSelected
 
TAttribute< boolbIsReadOnly
 
TAttribute< boolbIsPassword
 
TAttribute< boolbIsCaretMovedWhenGainFocus
 
TAttribute< boolbSelectAllTextWhenFocused
 
TAttribute< boolbRevertTextOnEscape
 
TAttribute< boolbClearKeyboardFocusOnCommit
 
TAttribute< boolbSelectAllTextOnCommit
 
TAttribute< boolbSelectWordOnMouseDoubleClick
 
TAttribute< boolbAllowContextMenu
 
TAttribute< boolbEnableIntegratedKeyboard
 
FOnContextMenuOpening OnContextMenuOpening
 
FOnIsTypedCharValid OnIsTypedCharValid
 
FOnBeginTextEdit OnBeginTextEditCallback
 
FOnTextChanged OnTextChangedCallback
 
FOnTextCommitted OnTextCommittedCallback
 
TAttribute< floatMinDesiredWidth
 
TSharedPtr< FExtenderMenuExtender
 
TWeakPtr< FActiveTimerHandleActiveTickTimer
 
TSharedPtr< IBreakIteratorWordBreakIterator
 
FOnKeyChar OnKeyCharHandler
 
FOnKeyDown OnKeyDownHandler
 
TAttribute< EKeyboardTypeVirtualKeyboardType
 
FVirtualKeyboardOptions VirtualKeyboardOptions
 
TAttribute< EVirtualKeyboardTriggerVirtualKeyboardTrigger
 
TAttribute< EVirtualKeyboardDismissActionVirtualKeyboardDismissAction
 
- Protected Attributes inherited from SWidget
uint8 bCanSupportFocus: 1
 
uint8 bCanHaveChildren: 1
 
uint8 bClippingProxy: 1
 
uint8 bHasCustomPrepass: 1
 
uint8 bHasRelativeLayoutScale: 1
 
uint8 bVolatilityAlwaysInvalidatesPrepass: 1
 
EWidgetClipping Clipping
 
EWidgetPixelSnapping PixelSnappingMethod
 
FMargin CullingBoundsExtension
 
float RenderOpacity
 

Additional Inherited Members

- Static Public Member Functions inherited from FSlateControlledConstruction
static const FSlateWidgetClassDataStaticWidgetClass ()
 
- Static Protected Member Functions inherited from SWidget
static SLATECORE_API int32 FindChildUnderMouse (const FArrangedChildren &Children, const FPointerEvent &MouseEvent)
 
static SLATECORE_API int32 FindChildUnderPosition (const FArrangedChildren &Children, const UE::Slate::FDeprecateVector2DParameter &ArrangedSpacePosition)
 
static TAttribute< EVisibilityAccessWidgetVisibilityAttribute (const TSharedRef< SWidget > &Widget)
 
- Static Protected Member Functions inherited from TSharedFromThis< SWidget >
static UE_FORCEINLINE_HINT TSharedRef< OtherType, Mode > SharedThis (OtherType *ThisPtr)
 
static UE_FORCEINLINE_HINT TSharedRef< OtherType const, Mode > SharedThis (const OtherType *ThisPtr)
 

Detailed Description

Editable text widget

Constructor & Destructor Documentation

◆ SEditableText()

SEditableText::SEditableText ( )

Sets the text content for this editable text widget The text that appears when there is nothing typed into the search box Text to search for (a new search is triggered whenever this text changes) The style of the text block, which dictates the font, color Sets the font used to draw the text (overrides Style) Text color and opacity (overrides Style) Background image for the selected text (overrides Style) Background image for the composing text (overrides Style) Image brush used for the caret (overrides Style) Sets whether this text box can actually be modified interactively by the user Sets whether this text box is for storing a password Workaround as we loose focus when the auto completion closes. Whether to select all text when the user clicks to give focus on the widget Whether to select word on mouse double click on the widget Whether to allow the user to back out of changes when they press the escape key Whether to clear keyboard focus when pressing enter to commit changes How should the value be justified in the editable text field. Whether the context menu can be opened
Whether the IntegratedKeyboard is enabled
Delegate to call before a context menu is opened. User returns the menu content or null to the disable context menu This is NOT for validating input!

Called whenever a character is typed. Not called for copy, paste, or any other text changes! Callback when the text starts to be edited Called whenever the text is changed programmatically or interactively by the user Called whenever the text is committed. This happens when the user presses enter or the text box loses focus. Minimum width that a text block should be Whether to select all text when pressing enter to commit changes Callback delegate to have first chance handling of the OnKeyChar event Callback delegate to have first chance handling of the OnKeyDown event Menu extender for the right-click context menu The type of virtual keyboard to use on mobile devices Additional options used by the virtual keyboard summoned by this widget The type of event that will trigger the display of the virtual keyboard The message action to take when the virtual keyboard is dismissed by the user Which text shaping method should we use? (unset to use the default returned by GetDefaultTextShapingMethod) Which text flow direction should we use? (unset to use the default returned by GetDefaultTextFlowDirection) Determines what happens to text that is clipped and doesnt fit within the allotted area for this widget Constructor

◆ ~SEditableText()

SEditableText::~SEditableText ( )

Destructor

Member Function Documentation

◆ AdvanceSearch()

void SEditableText::AdvanceSearch ( const bool  InReverse = false)

Advance the current search to the next match (does nothing if not currently searching)

◆ AnyTextSelected()

bool SEditableText::AnyTextSelected ( ) const

Query to see if any text is selected within the document

◆ BeginSearch()

void SEditableText::BeginSearch ( const FText InSearchText,
const ESearchCase::Type  InSearchCase = ESearchCase::IgnoreCase,
const bool  InReverse = false 
)

Begin a new text search (this is called automatically when the bound search text changes)

◆ BuildContextMenuContent()

TSharedPtr< SWidget > SEditableText::BuildContextMenuContent ( ) const
overrideprotectedvirtual

Build the context menu content to use for this widget (if any)

Implements ISlateEditableTextWidget.

◆ CacheDesiredSize()

void SEditableText::CacheDesiredSize ( float  InLayoutScaleMultiplier)
overrideprotectedvirtual

The system calls this method. It performs a breadth-first traversal of every visible widget and asks each widget to cache how big it needs to be in order to present all of its content.

Reimplemented from SWidget.

◆ CanInsertCarriageReturn()

bool SEditableText::CanInsertCarriageReturn ( ) const
overrideprotectedvirtual

Are we currently able to insert a carriage return? (some widgets have modifier keys that need to be pressed)

Implements ISlateEditableTextWidget.

◆ CanTypeCharacter()

bool SEditableText::CanTypeCharacter ( const TCHAR  InChar) const
overrideprotectedvirtual

Are we able to insert the given character into our text?

Implements ISlateEditableTextWidget.

◆ ClearSelection()

void SEditableText::ClearSelection ( )

Clear the active text selection

◆ ComputeDesiredSize()

FVector2D SEditableText::ComputeDesiredSize ( float  LayoutScaleMultiplier) const
overrideprotectedvirtual

Compute the ideal size necessary to display this widget. For aggregate widgets (e.g. panels) this size should include the size necessary to show all of its children. CacheDesiredSize() guarantees that the size of descendants is computed and cached before that of the parents, so it is safe to call GetDesiredSize() for any children while implementing this method.

Note that ComputeDesiredSize() is meant as an aide to the developer. It is NOT meant to be very robust in many cases. If your widget is simulating a bouncing ball, you should just return a reasonable size; e.g. 160x160. Let the programmer set up a reasonable rule of resizing the bouncy ball simulation.

Parameters
LayoutScaleMultiplierThis parameter is safe to ignore for almost all widgets; only really affects text measuring.
Returns
The desired size.

Implements SWidget.

◆ ComputeVolatility()

bool SEditableText::ComputeVolatility ( ) const
overrideprotectedvirtual

Recomputes the volatility of the widget. If you have additional state you automatically want to make the widget volatile, you should sample that information here.

Reimplemented from SWidget.

◆ Construct()

void SEditableText::Construct ( const FArguments &  InArgs)

Construct this widget

Parameters
InArgsThe declaration data for this widget

◆ EnableTextInputMethodContext()

void SEditableText::EnableTextInputMethodContext ( )

Register and activate the IME context for this text layout

◆ EnsureActiveTick()

void SEditableText::EnsureActiveTick ( )
overrideprotectedvirtual

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

Implements ISlateEditableTextWidget.

◆ GetChildren()

FChildren * SEditableText::GetChildren ( )
overrideprotectedvirtual

Returns the useful children (if any) of this widget. Some widget type may hide widget if they are needed by the system. Allows for iteration over the Widget's children regardless of how they are actually stored.

Note
Should be renamed to GetVisibleChildren (not ALL children will be returned in all cases).

Implements SWidget.

◆ GetFocusBrush()

const FSlateBrush * SEditableText::GetFocusBrush ( ) const
protectedvirtual
Returns
a brush to draw focus, nullptr if no focus drawing is desired

Reimplemented from SWidget.

◆ GetFont()

FSlateFontInfo SEditableText::GetFont ( ) const

Gets the font used to draw the text.

◆ GetHintText()

FText SEditableText::GetHintText ( ) const

Get the text that appears when there is no text in the text box

◆ GetSearchText()

FText SEditableText::GetSearchText ( ) const

Get the text that is currently being searched for (if any)

◆ GetSelectedText()

FText SEditableText::GetSelectedText ( ) const

Get the currently selected text

◆ GetSelection()

FTextSelection SEditableText::GetSelection ( ) const

Get the current selection

◆ GetSlateWidget()

TSharedRef< SWidget > SEditableText::GetSlateWidget ( )
overrideprotectedvirtual

Get the Slate widget this interface is representing (may not be called during destruction)

Implements ISlateEditableTextWidget.

◆ GetSlateWidgetPtr()

TSharedPtr< SWidget > SEditableText::GetSlateWidgetPtr ( )
overrideprotectedvirtual

Get the Slate widget this interface is representing (may be null during destruction)

Implements ISlateEditableTextWidget.

◆ GetText()

FText SEditableText::GetText ( ) const

Returns the text string

Returns
Text string

◆ GetVirtualKeyboardDismissAction()

EVirtualKeyboardDismissAction SEditableText::GetVirtualKeyboardDismissAction ( ) const
overrideprotectedvirtual

Get the message action to take when the virtual keyboard is dismissed by the user

Implements ISlateEditableTextWidget.

◆ GetVirtualKeyboardOptions()

FVirtualKeyboardOptions SEditableText::GetVirtualKeyboardOptions ( ) const
overrideprotectedvirtual

Get the options for the virtual keyboard used for this widget

Implements ISlateEditableTextWidget.

◆ GetVirtualKeyboardTrigger()

EVirtualKeyboardTrigger SEditableText::GetVirtualKeyboardTrigger ( ) const
overrideprotectedvirtual

Get the type of event that will trigger the display of the virtual keyboard

Implements ISlateEditableTextWidget.

◆ GetVirtualKeyboardType()

EKeyboardType SEditableText::GetVirtualKeyboardType ( ) const
overrideprotectedvirtual

Get the type of virtual keyboard to use for this widget

Implements ISlateEditableTextWidget.

◆ GoTo() [1/2]

void SEditableText::GoTo ( const ETextLocation  NewLocation)

Move the cursor specified location

◆ GoTo() [2/2]

void SEditableText::GoTo ( const FTextLocation NewLocation)

Move the cursor to the given location in the document (will also scroll to this point)

◆ IsIntegratedKeyboardEnabled()

bool SEditableText::IsIntegratedKeyboardEnabled ( ) const
overridevirtual

Is the widget currently has IntegratedKeyboard enabled?

Implements ISlateEditableTextWidget.

◆ IsInteractable()

bool SEditableText::IsInteractable ( ) const
overrideprotectedvirtual
Returns
Is this widget interactive or not? Defaults to false

Reimplemented from SWidget.

◆ IsMultiLineTextEdit()

bool SEditableText::IsMultiLineTextEdit ( ) const
overridevirtual

Is the text edit multi-line aware?

Implements ISlateEditableTextWidget.

◆ IsTextPassword()

bool SEditableText::IsTextPassword ( ) const
overridevirtual

Is the text displaying a password and should be obscured?

Implements ISlateEditableTextWidget.

◆ IsTextReadOnly()

bool SEditableText::IsTextReadOnly ( ) const
overridevirtual

Is the text currently read-only?

Implements ISlateEditableTextWidget.

◆ OnArrangeChildren()

void SEditableText::OnArrangeChildren ( const FGeometry AllottedGeometry,
FArrangedChildren ArrangedChildren 
) const
overrideprotectedvirtual

Compute the Geometry of all the children and add populate the ArrangedChildren list with their values. Each type of Layout panel should arrange children based on desired behavior.

Parameters
AllottedGeometryThe geometry allotted for this widget by its parent.
ArrangedChildrenThe array to which to add the WidgetGeometries that represent the arranged children.

Implements SWidget.

◆ OnBeginTextEdit()

void SEditableText::OnBeginTextEdit ( const FText InText)
overrideprotectedvirtual

Called when the text starts to be edited

Implements ISlateEditableTextWidget.

◆ OnCursorMoved()

void SEditableText::OnCursorMoved ( const FTextLocation InLocation)
overrideprotectedvirtual

Called when the cursor is moved within the text area

Implements ISlateEditableTextWidget.

◆ OnCursorQuery()

FCursorReply SEditableText::OnCursorQuery ( const FGeometry MyGeometry,
const FPointerEvent CursorEvent 
) const
overrideprotectedvirtual

The system asks each widget under the mouse to provide a cursor. This event is bubbled.

Returns
FCursorReply::Unhandled() if the event is not handled; return FCursorReply::Cursor() otherwise.

Reimplemented from SWidget.

◆ OnDragOver()

FReply SEditableText::OnDragOver ( const FGeometry MyGeometry,
const FDragDropEvent DragDropEvent 
)
overrideprotectedvirtual

Called during drag and drop when the the mouse is being dragged over a widget.

Parameters
MyGeometryThe geometry of the widget receiving the event.
DragDropEventThe drag and drop event.
Returns
A reply that indicated whether this event was handled.

Reimplemented from SWidget.

◆ OnDrop()

FReply SEditableText::OnDrop ( const FGeometry MyGeometry,
const FDragDropEvent DragDropEvent 
)
overrideprotectedvirtual

Called when the user is dropping something onto a widget; terminates drag and drop.

Parameters
MyGeometryThe geometry of the widget receiving the event.
DragDropEventThe drag and drop event.
Returns
A reply that indicated whether this event was handled.

Reimplemented from SWidget.

◆ OnFocusLost()

void SEditableText::OnFocusLost ( const FFocusEvent InFocusEvent)
overrideprotectedvirtual

Called when this widget loses focus. This event does not bubble.

Parameters
InFocusEventThe FocusEvent

Reimplemented from SWidget.

◆ OnFocusReceived()

FReply SEditableText::OnFocusReceived ( const FGeometry MyGeometry,
const FFocusEvent InFocusEvent 
)
overrideprotectedvirtual

Called when focus is given to this widget. This event does not bubble.

Parameters
MyGeometryThe Geometry of the widget receiving the event
InFocusEventThe FocusEvent
Returns
Returns whether the event was handled, along with other possible actions

Reimplemented from SWidget.

◆ OnKeyChar()

FReply SEditableText::OnKeyChar ( const FGeometry MyGeometry,
const FCharacterEvent InCharacterEvent 
)
overrideprotectedvirtual

Called after a character is entered while this widget has keyboard focus

Parameters
MyGeometryThe Geometry of the widget receiving the event
InCharacterEventCharacter event
Returns
Returns whether the event was handled, along with other possible actions

Reimplemented from SWidget.

◆ OnKeyDown()

FReply SEditableText::OnKeyDown ( const FGeometry MyGeometry,
const FKeyEvent InKeyEvent 
)
overrideprotectedvirtual

Called after a key is pressed when this widget has focus (this event bubbles if not handled)

Parameters
MyGeometryThe Geometry of the widget receiving the event
InKeyEventKey event
Returns
Returns whether the event was handled, along with other possible actions

Reimplemented from SWidget.

◆ OnKeyUp()

FReply SEditableText::OnKeyUp ( const FGeometry MyGeometry,
const FKeyEvent InKeyEvent 
)
overrideprotectedvirtual

Called after a key is released when this widget has focus

Parameters
MyGeometryThe Geometry of the widget receiving the event
InKeyEventKey event
Returns
Returns whether the event was handled, along with other possible actions

Reimplemented from SWidget.

◆ OnMouseButtonDoubleClick()

FReply SEditableText::OnMouseButtonDoubleClick ( const FGeometry InMyGeometry,
const FPointerEvent InMouseEvent 
)
overrideprotectedvirtual

Called when a mouse button is double clicked. Override this in derived classes.

Parameters
InMyGeometryWidget geometry
InMouseEventMouse button event
Returns
Returns whether the event was handled, along with other possible actions

Reimplemented from SWidget.

◆ OnMouseButtonDown()

FReply SEditableText::OnMouseButtonDown ( const FGeometry MyGeometry,
const FPointerEvent MouseEvent 
)
overrideprotectedvirtual

The system calls this method to notify the widget that a mouse button was pressed within it. This event is bubbled.

Parameters
MyGeometryThe Geometry of the widget receiving the event
MouseEventInformation about the input event
Returns
Whether the event was handled along with possible requests for the system to take action.

Reimplemented from SWidget.

◆ OnMouseButtonUp()

FReply SEditableText::OnMouseButtonUp ( const FGeometry MyGeometry,
const FPointerEvent MouseEvent 
)
overrideprotectedvirtual

The system calls this method to notify the widget that a mouse button was release within it. This event is bubbled.

Parameters
MyGeometryThe Geometry of the widget receiving the event
MouseEventInformation about the input event
Returns
Whether the event was handled along with possible requests for the system to take action.

Reimplemented from SWidget.

◆ OnMouseMove()

FReply SEditableText::OnMouseMove ( const FGeometry MyGeometry,
const FPointerEvent MouseEvent 
)
overrideprotectedvirtual

The system calls this method to notify the widget that a mouse moved within it. This event is bubbled.

Parameters
MyGeometryThe Geometry of the widget receiving the event
MouseEventInformation about the input event
Returns
Whether the event was handled along with possible requests for the system to take action.

Reimplemented from SWidget.

◆ OnPaint()

int32 SEditableText::OnPaint ( const FPaintArgs Args,
const FGeometry AllottedGeometry,
const FSlateRect MyCullingRect,
FSlateWindowElementList OutDrawElements,
int32  LayerId,
const FWidgetStyle InWidgetStyle,
bool  bParentEnabled 
) const
overrideprotectedvirtual

The widget should respond by populating the OutDrawElements array with FDrawElements that represent it and any of its children. Called by the non-virtual OnPaint to enforce pre/post conditions during OnPaint.

Parameters
ArgsAll the arguments necessary to paint this widget (
AllottedGeometryThe FGeometry that describes an area in which the widget should appear.
MyCullingRectThe rectangle representing the bounds currently being used to completely cull widgets. Unless IsChildWidgetCulled(...) returns true, you should paint the widget.
OutDrawElementsA list of FDrawElements to populate with the output.
LayerIdThe Layer onto which this widget should be rendered.
InColorAndOpacityColor and Opacity to be applied to all the descendants of the widget being painted
bParentEnabledTrue if the parent of this widget is enabled.
Returns
The maximum layer ID attained by this widget or any of its children.

Implements SWidget.

◆ OnTextChanged()

void SEditableText::OnTextChanged ( const FText InText)
overrideprotectedvirtual

Called when the text has been changed by an edit operation

Implements ISlateEditableTextWidget.

◆ OnTextCommitted()

void SEditableText::OnTextCommitted ( const FText InText,
const ETextCommit::Type  InTextAction 
)
overrideprotectedvirtual

Called when the text control has committed its current edit changes

Implements ISlateEditableTextWidget.

◆ ScrollTo() [1/2]

void SEditableText::ScrollTo ( const ETextLocation  NewLocation)

Scroll to the given location in the document (without moving the cursor)

◆ ScrollTo() [2/2]

void SEditableText::ScrollTo ( const FTextLocation NewLocation)

Scroll to the given location in the document (without moving the cursor)

◆ SelectAllText()

void SEditableText::SelectAllText ( )

Select all the text in the document

◆ SelectText()

void SEditableText::SelectText ( const FTextLocation InSelectionStart,
const FTextLocation InCursorLocation 
)

Select a block of text

◆ SetAllowContextMenu()

void SEditableText::SetAllowContextMenu ( const TAttribute< bool > &  InAllowContextMenu)

See the AllowContextMenu attribute

◆ SetClearKeyboardFocusOnCommit()

void SEditableText::SetClearKeyboardFocusOnCommit ( const TAttribute< bool > &  InClearKeyboardFocusOnCommit)

Sets whether to clear keyboard focus when pressing enter to commit changes

Parameters
InClearKeyboardFocusOnCommitClear keyboard focus when pressing enter?

◆ SetColorAndOpacity()

void SEditableText::SetColorAndOpacity ( TAttribute< FSlateColor Color)

See the ColorAndOpacity attribute

◆ SetEditableText()

bool SEditableText::SetEditableText ( const FText InNewText)

Sets the text currently being edited Note: Doesn't override the bound Text attribute, nor does it call OnTextChanged

Parameters
InNewTextThe new editable text
Returns
true if the text was updated, false if the text was already up-to-date

◆ SetEnableIntegratedKeyboard()

void SEditableText::SetEnableIntegratedKeyboard ( const TAttribute< bool > &  InEnableIntegratedKeyboard)

See the EnableIntegratedKeyboard attribute

◆ SetFont()

void SEditableText::SetFont ( const TAttribute< FSlateFontInfo > &  InNewFont)

Sets the font used to draw the text

Parameters
InNewFontThe new font to use

◆ SetHintText()

void SEditableText::SetHintText ( const TAttribute< FText > &  InHintText)

See the HintText attribute

◆ SetIsCaretMovedWhenGainFocus()

void SEditableText::SetIsCaretMovedWhenGainFocus ( const TAttribute< bool > &  InIsCaretMovedWhenGainFocus)

Workaround as we loose focus when the auto completion closes.

Parameters
InIsCaretMovedWhenGainFocusWorkaround

◆ SetIsPassword()

void SEditableText::SetIsPassword ( TAttribute< bool InIsPassword)

See the IsPassword attribute

◆ SetIsReadOnly()

void SEditableText::SetIsReadOnly ( TAttribute< bool InIsReadOnly)

See the IsReadOnly attribute

◆ SetJustification()

void SEditableText::SetJustification ( const TAttribute< ETextJustify::Type > &  InJustification)

See Justification attribute

◆ SetMinDesiredWidth()

void SEditableText::SetMinDesiredWidth ( const TAttribute< float > &  InMinDesiredWidth)

Sets the minimum width that a text block should be.

Parameters
InMinDesiredWidthThe minimum width

◆ SetOnKeyCharHandler()

void SEditableText::SetOnKeyCharHandler ( FOnKeyChar  InOnKeyCharHandler)
inline

Sets the OnKeyCharHandler to provide first chance handling of the OnKeyChar event

Parameters
InOnKeyCharHandlerDelegate to call during OnKeyChar event

◆ SetOnKeyDownHandler()

void SEditableText::SetOnKeyDownHandler ( FOnKeyDown  InOnKeyDownHandler)
inline

Sets the OnKeyDownHandler to provide first chance handling of the OnKeyDown event

Parameters
InOnKeyDownHandlerDelegate to call during OnKeyDown event

◆ SetOverflowPolicy()

void SEditableText::SetOverflowPolicy ( TOptional< ETextOverflowPolicy InOverflowPolicy)

Sets the overflow policy for this text block

◆ SetRevertTextOnEscape()

void SEditableText::SetRevertTextOnEscape ( const TAttribute< bool > &  InRevertTextOnEscape)

Sets whether to allow the user to back out of changes when they press the escape key

Parameters
InRevertTextOnEscapeAllow the user to back out of changes?

◆ SetSearchText()

void SEditableText::SetSearchText ( const TAttribute< FText > &  InSearchText)

Set the text that is currently being searched for (if any)

◆ SetSelectAllTextOnCommit()

void SEditableText::SetSelectAllTextOnCommit ( const TAttribute< bool > &  InSelectAllTextOnCommit)

Sets whether to select all text when pressing enter to commit changes

Parameters
InSelectAllTextOnCommitSelect all text when pressing enter?

◆ SetSelectAllTextWhenFocused()

void SEditableText::SetSelectAllTextWhenFocused ( const TAttribute< bool > &  InSelectAllTextWhenFocused)

Sets whether to select all text when the user clicks to give focus on the widget

Parameters
InSelectAllTextWhenFocusedSelect all text when the user clicks?

◆ SetSelectWordOnMouseDoubleClick()

void SEditableText::SetSelectWordOnMouseDoubleClick ( const TAttribute< bool > &  InSelectWordOnMouseDoubleClick)

Sets whether to select word on the mouse double click

Parameters
InSelectWordOnMouseDoubleClickSelect word on the mouse double click

◆ SetText()

void SEditableText::SetText ( const TAttribute< FText > &  InNewText)

Sets the text currently being edited

Parameters
InNewTextThe new text

◆ SetTextBlockStyle()

void SEditableText::SetTextBlockStyle ( const FTextBlockStyle InTextStyle)

@See TextStyle Sets the text block style used to draw the text

Parameters
InTextStyleThe new text block style to use

◆ SetTextFlowDirection()

void SEditableText::SetTextFlowDirection ( const TOptional< ETextFlowDirection > &  InTextFlowDirection)

See TextFlowDirection attribute

◆ SetTextShapingMethod()

void SEditableText::SetTextShapingMethod ( const TOptional< ETextShapingMethod > &  InTextShapingMethod)

See TextShapingMethod attribute

◆ SetTextStyle()

void SEditableText::SetTextStyle ( const FEditableTextStyle InNewTextStyle)

Sets the text style used to draw the text

Parameters
NewTextStyleThe new text style to use

◆ SetVirtualKeyboardDismissAction()

void SEditableText::SetVirtualKeyboardDismissAction ( TAttribute< EVirtualKeyboardDismissAction InVirtualKeyboardDismissAction)

Set the VirtualKeyboardDismissAction attribute

◆ ShouldClearKeyboardFocusOnCommit()

bool SEditableText::ShouldClearKeyboardFocusOnCommit ( ) const
overrideprotectedvirtual

Should we clear the keyboard focus when the user commits text to this widget?

Implements ISlateEditableTextWidget.

◆ ShouldClearTextSelectionOnFocusLoss()

bool SEditableText::ShouldClearTextSelectionOnFocusLoss ( ) const
overrideprotectedvirtual

Should the text clear its selection the widget loses focus?

Implements ISlateEditableTextWidget.

◆ ShouldJumpCursorToEndWhenFocused()

bool SEditableText::ShouldJumpCursorToEndWhenFocused ( ) const
overrideprotectedvirtual

Should the cursor be jumped to the end of the document when the widget gains focus?

Implements ISlateEditableTextWidget.

◆ ShouldRevertTextOnEscape()

bool SEditableText::ShouldRevertTextOnEscape ( ) const
overrideprotectedvirtual

Should we revert the text back to its original state when the user presses escape?

Implements ISlateEditableTextWidget.

◆ ShouldSelectAllTextOnCommit()

bool SEditableText::ShouldSelectAllTextOnCommit ( ) const
overrideprotectedvirtual

Should we select all text when the user commits text to this widget?

Implements ISlateEditableTextWidget.

◆ ShouldSelectAllTextWhenFocused()

bool SEditableText::ShouldSelectAllTextWhenFocused ( ) const
overrideprotectedvirtual

Should the text be selected when the widget gains focus?

Implements ISlateEditableTextWidget.

◆ ShouldSelectWordOnMouseDoubleClick()

bool SEditableText::ShouldSelectWordOnMouseDoubleClick ( ) const
overrideprotectedvirtual

Should we select word on mouse double click?

Implements ISlateEditableTextWidget.

◆ SLATE_BEGIN_ARGS()

SEditableText::SLATE_BEGIN_ARGS ( SEditableText  )
inline

◆ SupportsKeyboardFocus()

bool SEditableText::SupportsKeyboardFocus ( ) const
overrideprotectedvirtual

Checks to see if this widget supports keyboard focus. Override this in derived classes.

Returns
True if this widget can take keyboard focus

Reimplemented from SWidget.

◆ SynchronizeTextStyle()

void SEditableText::SynchronizeTextStyle ( )
protected

Synchronize the text style currently set (including from overrides) and update the text layout if required

◆ Tick()

void SEditableText::Tick ( const FGeometry AllottedGeometry,
const double  InCurrentTime,
const float  InDeltaTime 
)
overrideprotectedvirtual

Ticks this widget with Geometry. Override in derived classes, but always call the parent implementation.

Parameters
AllottedGeometryThe space allotted for this widget
InCurrentTimeCurrent absolute real time
InDeltaTimeReal time passed since last tick

Reimplemented from SWidget.

◆ ToggleVirtualKeyboard()

void SEditableText::ToggleVirtualKeyboard ( bool  bShow,
const int32  UserIndex 
)

◆ UpdateAndClampHorizontalScrollBar()

float SEditableText::UpdateAndClampHorizontalScrollBar ( const float  InViewOffset,
const float  InViewFraction,
const EVisibility  InVisiblityOverride 
)
overrideprotectedvirtual

Called when the fraction and offset of the horizontal scroll area has been recalculated. This function should apply the new values to any scrollbars, and return a clamped horizontal scroll value

Implements ISlateEditableTextWidget.

◆ UpdateAndClampVerticalScrollBar()

float SEditableText::UpdateAndClampVerticalScrollBar ( const float  InViewOffset,
const float  InViewFraction,
const EVisibility  InVisiblityOverride 
)
overrideprotectedvirtual

Called when the fraction and offset of the vertical scroll area has been recalculated. This function should apply the new values to any scrollbars, and return a clamped vertical scroll value

Implements ISlateEditableTextWidget.

Member Data Documentation

◆ ActiveTickTimer

TWeakPtr<FActiveTimerHandle> SEditableText::ActiveTickTimer
protected

The timer that is actively driving this widget to Tick() even when Slate is idle

◆ BackgroundImageSelected

TAttribute<const FSlateBrush*> SEditableText::BackgroundImageSelected
protected

Background image for the selected text

◆ bAllowContextMenu

TAttribute<bool> SEditableText::bAllowContextMenu
protected

Whether to disable the context menu

◆ bClearKeyboardFocusOnCommit

TAttribute<bool> SEditableText::bClearKeyboardFocusOnCommit
protected

Whether to clear keyboard focus when pressing enter to commit changes

◆ bEnableIntegratedKeyboard

TAttribute<bool> SEditableText::bEnableIntegratedKeyboard
protected

Whether to enable integrated keyboard

◆ bIsCaretMovedWhenGainFocus

TAttribute<bool> SEditableText::bIsCaretMovedWhenGainFocus
protected

Workaround as we loose focus when the auto completion closes.

◆ bIsPassword

TAttribute<bool> SEditableText::bIsPassword
protected

Sets whether this text box is for storing a password

◆ bIsReadOnly

TAttribute<bool> SEditableText::bIsReadOnly
protected

Sets whether this text box can actually be modified interactively by the user

◆ bRevertTextOnEscape

TAttribute<bool> SEditableText::bRevertTextOnEscape
protected

Whether to allow the user to back out of changes when they press the escape key

◆ bSelectAllTextOnCommit

TAttribute<bool> SEditableText::bSelectAllTextOnCommit
protected

Whether to select all text when pressing enter to commit changes

◆ bSelectAllTextWhenFocused

TAttribute<bool> SEditableText::bSelectAllTextWhenFocused
protected

Whether to select all text when the user clicks to give focus on the widget

◆ bSelectWordOnMouseDoubleClick

TAttribute<bool> SEditableText::bSelectWordOnMouseDoubleClick
protected

Whether to select word on mouse double click

◆ ColorAndOpacity

TAttribute<FSlateColor> SEditableText::ColorAndOpacity
protected

Text color and opacity

◆ EditableTextLayout

TUniquePtr<FSlateEditableTextLayout> SEditableText::EditableTextLayout
protected

The text layout that deals with the editable text

◆ Font

TAttribute<FSlateFontInfo> SEditableText::Font
protected

The font used to draw the text

◆ MenuExtender

TSharedPtr<FExtender> SEditableText::MenuExtender
protected

Menu extender for right-click context menu

◆ MinDesiredWidth

TAttribute<float> SEditableText::MinDesiredWidth
protected

Prevents the editable text from being smaller than desired in certain cases (e.g. when it is empty)

◆ OnBeginTextEditCallback

FOnBeginTextEdit SEditableText::OnBeginTextEditCallback
protected

Called when the text starts to be edited

◆ OnContextMenuOpening

FOnContextMenuOpening SEditableText::OnContextMenuOpening
protected

Delegate to call before a context menu is opened

◆ OnIsTypedCharValid

FOnIsTypedCharValid SEditableText::OnIsTypedCharValid
protected

Called when a character is typed and we want to know if the text field supports typing this character.

◆ OnKeyCharHandler

FOnKeyChar SEditableText::OnKeyCharHandler
protected

Callback delegate to have first chance handling of the OnKeyChar event

◆ OnKeyDownHandler

FOnKeyDown SEditableText::OnKeyDownHandler
protected

Callback delegate to have first chance handling of the OnKeyDown event

◆ OnTextChangedCallback

FOnTextChanged SEditableText::OnTextChangedCallback
protected

Called whenever the text is changed programmatically or interactively by the user

◆ OnTextCommittedCallback

FOnTextCommitted SEditableText::OnTextCommittedCallback
protected

Called whenever the text is committed. This happens when the user presses enter or the text box loses focus.

◆ PlainTextMarshaller

TSharedPtr<FPlainTextLayoutMarshaller> SEditableText::PlainTextMarshaller
protected

Text marshaller used by the editable text layout

◆ VirtualKeyboardDismissAction

TAttribute<EVirtualKeyboardDismissAction> SEditableText::VirtualKeyboardDismissAction
protected

The message action to take when the virtual keyboard is dismissed by the user

◆ VirtualKeyboardOptions

FVirtualKeyboardOptions SEditableText::VirtualKeyboardOptions
protected

Additional options used by the virtual keyboard summoned by this widget

◆ VirtualKeyboardTrigger

TAttribute<EVirtualKeyboardTrigger> SEditableText::VirtualKeyboardTrigger
protected

The type of event that will trigger the display of the virtual keyboard

◆ VirtualKeyboardType

TAttribute<EKeyboardType> SEditableText::VirtualKeyboardType
protected

The type of virtual keyboard to use for editing this text on mobile

◆ WordBreakIterator

TSharedPtr<IBreakIterator> SEditableText::WordBreakIterator
mutableprotected

The iterator to use to detect word boundaries


The documentation for this class was generated from the following files: