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

#include <SlateEditableTextLayout.h>

Public Member Functions

SLATE_API FSlateEditableTextLayout (ISlateEditableTextWidget &InOwnerWidget, const TAttribute< FText > &InInitialText, FTextBlockStyle InTextStyle, const TOptional< ETextShapingMethod > InTextShapingMethod, const TOptional< ETextFlowDirection > InTextFlowDirection, const FCreateSlateTextLayout &InCreateSlateTextLayout, TSharedRef< ITextLayoutMarshaller > InTextMarshaller, TSharedRef< ITextLayoutMarshaller > InHintTextMarshaller)
 
SLATE_API ~FSlateEditableTextLayout ()
 
SLATE_API void SetText (const TAttribute< FText > &InText)
 
SLATE_API FText GetText () const
 
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 int32 GetSearchResultIndex () const
 
SLATE_API int32 GetNumSearchResults () const
 
SLATE_API void SetTextStyle (const FTextBlockStyle &InTextStyle)
 
SLATE_API const FTextBlockStyleGetTextStyle () const
 
SLATE_API int32 GetTextLineCount ()
 
SLATE_API void SetCursorBrush (const TAttribute< const FSlateBrush * > &InCursorBrush)
 
SLATE_API void SetCompositionBrush (const TAttribute< const FSlateBrush * > &InCompositionBrush)
 
SLATE_API FText GetPlainText () const
 
SLATE_API bool SetEditableText (const FText &TextToSet, const bool bForce=false)
 
SLATE_API FText GetEditableText () const
 
SLATE_API FText GetSelectedText () const
 
SLATE_API FTextSelection GetSelection () const
 
SLATE_API void SetTextShapingMethod (const TOptional< ETextShapingMethod > &InTextShapingMethod)
 
SLATE_API void SetTextFlowDirection (const TOptional< ETextFlowDirection > &InTextFlowDirection)
 
SLATE_API void SetTextWrapping (const TAttribute< float > &InWrapTextAt, const TAttribute< bool > &InAutoWrapText, const TAttribute< ETextWrappingPolicy > &InWrappingPolicy)
 
SLATE_API void SetWrapTextAt (const TAttribute< float > &InWrapTextAt)
 
SLATE_API void SetAutoWrapText (const TAttribute< bool > &InAutoWrapText)
 
SLATE_API void SetWrappingPolicy (const TAttribute< ETextWrappingPolicy > &InWrappingPolicy)
 
SLATE_API void SetMargin (const TAttribute< FMargin > &InMargin)
 
SLATE_API void SetJustification (const TAttribute< ETextJustify::Type > &InJustification)
 
SLATE_API void SetLineHeightPercentage (const TAttribute< float > &InLineHeightPercentage)
 
SLATE_API void SetApplyLineHeightToBottomLine (const TAttribute< bool > &InApplyLineHeightToBottomLine)
 
SLATE_API void SetOverflowPolicy (TOptional< ETextOverflowPolicy > InOverflowPolicy)
 
SLATE_API void SetDebugSourceInfo (const TAttribute< FString > &InDebugSourceInfo)
 
SLATE_API TSharedRef< IVirtualKeyboardEntryGetVirtualKeyboardEntry () const
 
SLATE_API TSharedRef< ITextInputMethodContextGetTextInputMethodContext () const
 
SLATE_API void EnableTextInputMethodContext ()
 
SLATE_API bool Refresh ()
 
SLATE_API void ForceRefreshTextLayout (const FText &CurrentText)
 
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 UE::Slate::FDeprecateVector2DResult SetHorizontalScrollFraction (const float InScrollOffsetFraction)
 
SLATE_API UE::Slate::FDeprecateVector2DResult SetVerticalScrollFraction (const float InScrollOffsetFraction)
 
SLATE_API UE::Slate::FDeprecateVector2DResult SetScrollOffset (const UE::Slate::FDeprecateVector2DParameter &InScrollOffset, const FGeometry &InGeometry)
 
SLATE_API UE::Slate::FDeprecateVector2DResult GetScrollOffset () const
 
SLATE_API float GetComputedWrappingWidth () const
 
SLATE_API bool GetAutoWrapText () const
 
SLATE_API bool HandleFocusReceived (const FFocusEvent &InFocusEvent)
 
SLATE_API bool HandleFocusLost (const FFocusEvent &InFocusEvent)
 
SLATE_API FReply HandleKeyChar (const FCharacterEvent &InCharacterEvent)
 
SLATE_API FReply HandleKeyDown (const FKeyEvent &InKeyEvent)
 
SLATE_API FReply HandleKeyUp (const FKeyEvent &InKeyEvent)
 
SLATE_API FReply HandleMouseButtonDown (const FGeometry &MyGeometry, const FPointerEvent &InMouseEvent)
 
SLATE_API FReply HandleMouseButtonUp (const FGeometry &MyGeometry, const FPointerEvent &InMouseEvent)
 
SLATE_API FReply HandleMouseMove (const FGeometry &InMyGeometry, const FPointerEvent &InMouseEvent)
 
SLATE_API FReply HandleMouseButtonDoubleClick (const FGeometry &InMyGeometry, const FPointerEvent &InMouseEvent)
 
SLATE_API bool HandleEscape ()
 
SLATE_API bool HandleBackspace ()
 
SLATE_API bool HandleDelete ()
 
SLATE_API bool HandleTypeChar (const TCHAR InChar)
 
SLATE_API bool HandleCarriageReturn (bool isRepeat, int32 UserIndex=0)
 
SLATE_API bool CanExecuteDelete () const
 
SLATE_API void DeleteSelectedText ()
 
SLATE_API bool AnyTextSelected () const
 
SLATE_API bool IsTextSelectedAt (const FGeometry &MyGeometry, const UE::Slate::FDeprecateVector2DParameter &ScreenSpacePosition) const
 
SLATE_API bool IsTextSelectedAt (const UE::Slate::FDeprecateVector2DParameter &InLocalPosition) const
 
SLATE_API bool CanExecuteSelectAll () const
 
SLATE_API void SelectAllText ()
 
SLATE_API void SelectWordAt (const FGeometry &MyGeometry, const UE::Slate::FDeprecateVector2DParameter &ScreenSpacePosition)
 
SLATE_API void SelectWordAt (const UE::Slate::FDeprecateVector2DParameter &InLocalPosition)
 
SLATE_API void SelectText (const FTextLocation &InSelectionStart, const FTextLocation &InCursorLocation)
 
SLATE_API void ClearSelection ()
 
SLATE_API bool CanExecuteCut () const
 
SLATE_API void CutSelectedTextToClipboard ()
 
SLATE_API bool CanExecuteCopy () const
 
SLATE_API void CopySelectedTextToClipboard ()
 
SLATE_API bool CanExecutePaste () const
 
SLATE_API void PasteTextFromClipboard ()
 
SLATE_API void InsertTextAtCursor (const FString &InString)
 
SLATE_API void InsertRunAtCursor (TSharedRef< IRun > InRun)
 
SLATE_API bool MoveCursor (const FMoveCursor &InArgs)
 
SLATE_API void GoTo (const FTextLocation &NewLocation)
 
SLATE_API void GoTo (const ETextLocation NewLocation)
 
SLATE_API void JumpTo (ETextLocation JumpLocation, ECursorAction Action)
 
SLATE_API void ScrollTo (const FTextLocation &NewLocation)
 
SLATE_API void ScrollTo (const ETextLocation NewLocation)
 
SLATE_API void UpdateCursorHighlight ()
 
SLATE_API void RemoveCursorHighlight ()
 
SLATE_API void UpdatePreferredCursorScreenOffsetInLine ()
 
SLATE_API void ApplyToSelection (const FRunInfo &InRunInfo, const FTextBlockStyle &InStyle)
 
SLATE_API TSharedPtr< const IRunGetRunUnderCursor () const
 
SLATE_API TArray< TSharedRef< const IRun > > GetSelectedRuns () const
 
SLATE_API FTextLocation GetCursorLocation () const
 
SLATE_API FTextLocation TranslatedLocation (const FTextLocation &CurrentLocation, int8 Direction) const
 
SLATE_API void TranslateLocationVertical (const FTextLocation &Location, int32 NumLinesToMove, float GeometryScale, FTextLocation &OutCursorPosition, TOptional< SlateEditableTextTypes::ECursorAlignment > &OutCursorAlignment) const
 
SLATE_API FTextLocation ScanForWordBoundary (const FTextLocation &Location, int8 Direction) const
 
SLATE_API TCHAR GetCharacterAt (const FTextLocation &Location) const
 
SLATE_API bool IsAtBeginningOfDocument (const FTextLocation &Location) const
 
SLATE_API bool IsAtEndOfDocument (const FTextLocation &Location) const
 
SLATE_API bool IsAtBeginningOfLine (const FTextLocation &Location) const
 
SLATE_API bool IsAtEndOfLine (const FTextLocation &Location) const
 
SLATE_API bool IsAtWordStart (const FTextLocation &Location) const
 
SLATE_API void RestoreOriginalText ()
 
SLATE_API bool HasTextChangedFromOriginal () const
 
SLATE_API void BeginEditTransation ()
 
SLATE_API void EndEditTransaction ()
 
SLATE_API void PushUndoState (const SlateEditableTextTypes::FUndoState &InUndoState)
 
SLATE_API void ClearUndoStates ()
 
SLATE_API void MakeUndoState (SlateEditableTextTypes::FUndoState &OutUndoState)
 
SLATE_API bool CanExecuteUndo () const
 
SLATE_API void Undo ()
 
SLATE_API bool CanExecuteRedo () const
 
SLATE_API void Redo ()
 
SLATE_API void SaveText (const FText &TextToSave)
 
SLATE_API void LoadText ()
 
SLATE_API bool ComputeVolatility () const
 
SLATE_API void Tick (const FGeometry &AllottedGeometry, const double InCurrentTime, const float InDeltaTime)
 
SLATE_API int32 OnPaint (const FPaintArgs &Args, const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle, bool bParentEnabled)
 
SLATE_API void CacheDesiredSize (float LayoutScaleMultiplier)
 
SLATE_API FVector2D ComputeDesiredSize (float LayoutScaleMultiplier) const
 
SLATE_API FChildrenGetChildren ()
 
SLATE_API void OnArrangeChildren (const FGeometry &AllottedGeometry, FArrangedChildren &ArrangedChildren) const
 
SLATE_API UE::Slate::FDeprecateVector2DResult GetSize () const
 
SLATE_API TSharedRef< SWidgetBuildDefaultContextMenu (const TSharedPtr< FExtender > &InMenuExtender) const
 
SLATE_API bool HasActiveContextMenu () const
 
SLATE_API void GetCurrentTextLine (FString &OutTextLine) const
 
SLATE_API void GetTextLine (const int32 InLineIndex, FString &OutTextLine) const
 
SLATE_API void ToggleVirtualKeyboard (bool bShow, const int32 UserIndex)
 

Friends

class FVirtualKeyboardEntry
 
class FTextInputMethodContext
 

Detailed Description

Class to handle the cached layout of SEditableText/SMultiLineEditableText by proxying around a FTextLayout

Constructor & Destructor Documentation

◆ FSlateEditableTextLayout()

FSlateEditableTextLayout::FSlateEditableTextLayout ( ISlateEditableTextWidget InOwnerWidget,
const TAttribute< FText > &  InInitialText,
FTextBlockStyle  InTextStyle,
const TOptional< ETextShapingMethod InTextShapingMethod,
const TOptional< ETextFlowDirection InTextFlowDirection,
const FCreateSlateTextLayout InCreateSlateTextLayout,
TSharedRef< ITextLayoutMarshaller InTextMarshaller,
TSharedRef< ITextLayoutMarshaller InHintTextMarshaller 
)

◆ ~FSlateEditableTextLayout()

FSlateEditableTextLayout::~FSlateEditableTextLayout ( )

Member Function Documentation

◆ AdvanceSearch()

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

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

◆ AnyTextSelected()

bool FSlateEditableTextLayout::AnyTextSelected ( ) const

Query to see if any text is selected within the document

◆ ApplyToSelection()

void FSlateEditableTextLayout::ApplyToSelection ( const FRunInfo InRunInfo,
const FTextBlockStyle InStyle 
)

Apply the given style to the currently selected text (or insert a new run at the current cursor position if no text is selected)

◆ BeginEditTransation()

void FSlateEditableTextLayout::BeginEditTransation ( )

Called to begin an undoable editable text transaction

◆ BeginSearch()

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

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

◆ BuildDefaultContextMenu()

TSharedRef< SWidget > FSlateEditableTextLayout::BuildDefaultContextMenu ( const TSharedPtr< FExtender > &  InMenuExtender) const

◆ CacheDesiredSize()

void FSlateEditableTextLayout::CacheDesiredSize ( float  LayoutScaleMultiplier)

◆ CanExecuteCopy()

bool FSlateEditableTextLayout::CanExecuteCopy ( ) const

Are we able to copy the currently selected text?

◆ CanExecuteCut()

bool FSlateEditableTextLayout::CanExecuteCut ( ) const

Are we able to cut the currently selected text?

◆ CanExecuteDelete()

bool FSlateEditableTextLayout::CanExecuteDelete ( ) const

Are we able to delete the currently selected text?

◆ CanExecutePaste()

bool FSlateEditableTextLayout::CanExecutePaste ( ) const

Are we able to paste the text from the clipboard into this document?

◆ CanExecuteRedo()

bool FSlateEditableTextLayout::CanExecuteRedo ( ) const

Are we currently able to execute a redo action?

◆ CanExecuteSelectAll()

bool FSlateEditableTextLayout::CanExecuteSelectAll ( ) const

Are we able to execute the "Select All" command?

◆ CanExecuteUndo()

bool FSlateEditableTextLayout::CanExecuteUndo ( ) const

Are we currently able to execute an undo action?

◆ ClearSelection()

void FSlateEditableTextLayout::ClearSelection ( )

Clear the active text selection

◆ ClearUndoStates()

void FSlateEditableTextLayout::ClearUndoStates ( )

Clear the current undo stack

◆ ComputeDesiredSize()

FVector2D FSlateEditableTextLayout::ComputeDesiredSize ( float  LayoutScaleMultiplier) const

◆ ComputeVolatility()

bool FSlateEditableTextLayout::ComputeVolatility ( ) const

◆ CopySelectedTextToClipboard()

void FSlateEditableTextLayout::CopySelectedTextToClipboard ( )

Copy the currently selected text and place it on the clipboard

◆ CutSelectedTextToClipboard()

void FSlateEditableTextLayout::CutSelectedTextToClipboard ( )

Cut the currently selected text and place it on the clipboard

◆ DeleteSelectedText()

void FSlateEditableTextLayout::DeleteSelectedText ( )

Delete any currently selected text

◆ EnableTextInputMethodContext()

void FSlateEditableTextLayout::EnableTextInputMethodContext ( )

Register and activate the IME context for this text layout

◆ EndEditTransaction()

void FSlateEditableTextLayout::EndEditTransaction ( )

Called to end an undoable editable text transaction

◆ ForceRefreshTextLayout()

void FSlateEditableTextLayout::ForceRefreshTextLayout ( const FText CurrentText)

Force the text layout to be updated from the marshaller

◆ GetAutoWrapText()

bool FSlateEditableTextLayout::GetAutoWrapText ( ) const

Returns whether or not we are auto wrapping text

◆ GetCharacterAt()

TCHAR FSlateEditableTextLayout::GetCharacterAt ( const FTextLocation Location) const

Get the character at Location

◆ GetChildren()

FChildren * FSlateEditableTextLayout::GetChildren ( )

◆ GetComputedWrappingWidth()

float FSlateEditableTextLayout::GetComputedWrappingWidth ( ) const

Returns the computed wrap location for this layout

◆ GetCurrentTextLine()

void FSlateEditableTextLayout::GetCurrentTextLine ( FString &  OutTextLine) const

Fill OutTextLine with the text line where the current cursor location is at

Parameters
OutTextLineFString of the line

◆ GetCursorLocation()

FTextLocation FSlateEditableTextLayout::GetCursorLocation ( ) const

Get the interaction position of the cursor (where to insert, delete, etc, text from/to)

◆ GetEditableText()

FText FSlateEditableTextLayout::GetEditableText ( ) const

Gets the current editable text for this text block Note: We don't store text in this form (it's stored as lines in the text layout) so every call to this function has to reconstruct it

◆ GetHintText()

FText FSlateEditableTextLayout::GetHintText ( ) const

◆ GetNumSearchResults()

int32 FSlateEditableTextLayout::GetNumSearchResults ( ) const

Get the total number of search results (0 if none)

◆ GetPlainText()

FText FSlateEditableTextLayout::GetPlainText ( ) const

Get the plain text string without rich-text formatting

◆ GetRunUnderCursor()

TSharedPtr< const IRun > FSlateEditableTextLayout::GetRunUnderCursor ( ) const

Get the run currently under the cursor, or null if there is no run currently under the cursor

◆ GetScrollOffset()

UE::Slate::FDeprecateVector2DResult FSlateEditableTextLayout::GetScrollOffset ( ) const

Get the absolute scroll offset value

◆ GetSearchResultIndex()

int32 FSlateEditableTextLayout::GetSearchResultIndex ( ) const

Get the index of the search result (0 if none)

◆ GetSearchText()

FText FSlateEditableTextLayout::GetSearchText ( ) const

◆ GetSelectedRuns()

TArray< TSharedRef< const IRun > > FSlateEditableTextLayout::GetSelectedRuns ( ) const

Get the runs currently that are current selected, some of which may be only partially selected

◆ GetSelectedText()

FText FSlateEditableTextLayout::GetSelectedText ( ) const

Get the currently selected text

◆ GetSelection()

FTextSelection FSlateEditableTextLayout::GetSelection ( ) const

Get the current selection

◆ GetSize()

UE::Slate::FDeprecateVector2DResult FSlateEditableTextLayout::GetSize ( ) const

◆ GetText()

FText FSlateEditableTextLayout::GetText ( ) const

◆ GetTextInputMethodContext()

TSharedRef< ITextInputMethodContext > FSlateEditableTextLayout::GetTextInputMethodContext ( ) const

Get the IME context for this text layout

◆ GetTextLine()

void FSlateEditableTextLayout::GetTextLine ( const int32  InLineIndex,
FString &  OutTextLine 
) const

Fill OutTextLine with the text line at the specified index

Parameters
InLineIndexIndex of the line
OutTextLineFString of the line

◆ GetTextLineCount()

int32 FSlateEditableTextLayout::GetTextLineCount ( )

Get the number of Text Lines

◆ GetTextStyle()

const FTextBlockStyle & FSlateEditableTextLayout::GetTextStyle ( ) const

◆ GetVirtualKeyboardEntry()

TSharedRef< IVirtualKeyboardEntry > FSlateEditableTextLayout::GetVirtualKeyboardEntry ( ) const

Get the virtual keyboard handler for this text layout

◆ GoTo() [1/2]

void FSlateEditableTextLayout::GoTo ( const ETextLocation  NewLocation)

Move the cursor specified location

◆ GoTo() [2/2]

void FSlateEditableTextLayout::GoTo ( const FTextLocation NewLocation)

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

◆ HandleBackspace()

bool FSlateEditableTextLayout::HandleBackspace ( )

Called to handle a backspace action acting on the current selection or at the cursor position

◆ HandleCarriageReturn()

bool FSlateEditableTextLayout::HandleCarriageReturn ( bool  isRepeat,
int32  UserIndex = 0 
)

Called to handle a carriage return action acting on the current selection or at the cursor position

◆ HandleDelete()

bool FSlateEditableTextLayout::HandleDelete ( )

Called to handle a delete action acting on the current selection or at the cursor position

◆ HandleEscape()

bool FSlateEditableTextLayout::HandleEscape ( )

Called to handle an escape action acting on the current selection

◆ HandleFocusLost()

bool FSlateEditableTextLayout::HandleFocusLost ( const FFocusEvent InFocusEvent)

Called when our parent widget loses focus

◆ HandleFocusReceived()

bool FSlateEditableTextLayout::HandleFocusReceived ( const FFocusEvent InFocusEvent)

Called when our parent widget receives focus

◆ HandleKeyChar()

FReply FSlateEditableTextLayout::HandleKeyChar ( const FCharacterEvent InCharacterEvent)

Called to handle an OnKeyChar event from our parent widget

◆ HandleKeyDown()

FReply FSlateEditableTextLayout::HandleKeyDown ( const FKeyEvent InKeyEvent)

Called to handle an OnKeyDown event from our parent widget

◆ HandleKeyUp()

FReply FSlateEditableTextLayout::HandleKeyUp ( const FKeyEvent InKeyEvent)

Called to handle an OnKeyUp event from our parent widget

◆ HandleMouseButtonDoubleClick()

FReply FSlateEditableTextLayout::HandleMouseButtonDoubleClick ( const FGeometry InMyGeometry,
const FPointerEvent InMouseEvent 
)

Called to handle an OnMouseButtonDoubleClick event from our parent widget

◆ HandleMouseButtonDown()

FReply FSlateEditableTextLayout::HandleMouseButtonDown ( const FGeometry MyGeometry,
const FPointerEvent InMouseEvent 
)

Called to handle an OnMouseButtonDown event from our parent widget

◆ HandleMouseButtonUp()

FReply FSlateEditableTextLayout::HandleMouseButtonUp ( const FGeometry MyGeometry,
const FPointerEvent InMouseEvent 
)

Called to handle an OnMouseButtonUp event from our parent widget

◆ HandleMouseMove()

FReply FSlateEditableTextLayout::HandleMouseMove ( const FGeometry InMyGeometry,
const FPointerEvent InMouseEvent 
)

Called to handle an OnMouseMove event from our parent widget

◆ HandleTypeChar()

bool FSlateEditableTextLayout::HandleTypeChar ( const TCHAR  InChar)

Called to handle a typing a character on the current selection or at the cursor position

◆ HasActiveContextMenu()

bool FSlateEditableTextLayout::HasActiveContextMenu ( ) const

◆ HasTextChangedFromOriginal()

bool FSlateEditableTextLayout::HasTextChangedFromOriginal ( ) const

Returns whether the current text varies from the original

◆ InsertRunAtCursor()

void FSlateEditableTextLayout::InsertRunAtCursor ( TSharedRef< IRun InRun)

Insert the given run at the current cursor position

◆ InsertTextAtCursor()

void FSlateEditableTextLayout::InsertTextAtCursor ( const FString &  InString)

Insert the given text at the current cursor position, correctly taking into account new line characters

◆ IsAtBeginningOfDocument()

bool FSlateEditableTextLayout::IsAtBeginningOfDocument ( const FTextLocation Location) const

Are we at the beginning of all the text.

◆ IsAtBeginningOfLine()

bool FSlateEditableTextLayout::IsAtBeginningOfLine ( const FTextLocation Location) const

Is this location the beginning of a line

◆ IsAtEndOfDocument()

bool FSlateEditableTextLayout::IsAtEndOfDocument ( const FTextLocation Location) const

Are we at the end of all the text.

◆ IsAtEndOfLine()

bool FSlateEditableTextLayout::IsAtEndOfLine ( const FTextLocation Location) const

Is this location the end of a line.

◆ IsAtWordStart()

bool FSlateEditableTextLayout::IsAtWordStart ( const FTextLocation Location) const

Are we currently at the beginning of a word

◆ IsTextSelectedAt() [1/2]

bool FSlateEditableTextLayout::IsTextSelectedAt ( const FGeometry MyGeometry,
const UE::Slate::FDeprecateVector2DParameter ScreenSpacePosition 
) const

Query to see if the text under the given position is currently selected

◆ IsTextSelectedAt() [2/2]

bool FSlateEditableTextLayout::IsTextSelectedAt ( const UE::Slate::FDeprecateVector2DParameter InLocalPosition) const

Query to see if the text under the given position is currently selected (the position is local to the text layout space)

◆ JumpTo()

void FSlateEditableTextLayout::JumpTo ( ETextLocation  JumpLocation,
ECursorAction  Action 
)

Jump the cursor to the given location in the document

◆ LoadText()

void FSlateEditableTextLayout::LoadText ( )

◆ MakeUndoState()

void FSlateEditableTextLayout::MakeUndoState ( SlateEditableTextTypes::FUndoState OutUndoState)

Create an undo state that reflects the current state of the document

◆ MoveCursor()

bool FSlateEditableTextLayout::MoveCursor ( const FMoveCursor InArgs)

Move the cursor in the document using the specified move method

◆ OnArrangeChildren()

void FSlateEditableTextLayout::OnArrangeChildren ( const FGeometry AllottedGeometry,
FArrangedChildren ArrangedChildren 
) const

◆ OnPaint()

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

◆ PasteTextFromClipboard()

void FSlateEditableTextLayout::PasteTextFromClipboard ( )

Paste the text from the clipboard into this document

◆ PushUndoState()

void FSlateEditableTextLayout::PushUndoState ( const SlateEditableTextTypes::FUndoState InUndoState)

Push the given undo state onto the undo stack

◆ Redo()

void FSlateEditableTextLayout::Redo ( )

Execute a redo action

◆ Refresh()

bool FSlateEditableTextLayout::Refresh ( )

Refresh this editable text immediately, rather than wait for the usual caching mechanisms to take affect on the text Tick

◆ RemoveCursorHighlight()

void FSlateEditableTextLayout::RemoveCursorHighlight ( )

Remove any active cursor highlights

◆ RestoreOriginalText()

void FSlateEditableTextLayout::RestoreOriginalText ( )

Restores the text to the original state

◆ SaveText()

void FSlateEditableTextLayout::SaveText ( const FText TextToSave)

◆ ScanForWordBoundary()

FTextLocation FSlateEditableTextLayout::ScanForWordBoundary ( const FTextLocation Location,
int8  Direction 
) const

Find the closest word boundary

◆ ScrollTo() [1/2]

void FSlateEditableTextLayout::ScrollTo ( const ETextLocation  NewLocation)

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

◆ ScrollTo() [2/2]

void FSlateEditableTextLayout::ScrollTo ( const FTextLocation NewLocation)

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

◆ SelectAllText()

void FSlateEditableTextLayout::SelectAllText ( )

Select all the text in the document

◆ SelectText()

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

Select a block of text

◆ SelectWordAt() [1/2]

void FSlateEditableTextLayout::SelectWordAt ( const FGeometry MyGeometry,
const UE::Slate::FDeprecateVector2DParameter ScreenSpacePosition 
)

Select the word under the given position

◆ SelectWordAt() [2/2]

void FSlateEditableTextLayout::SelectWordAt ( const UE::Slate::FDeprecateVector2DParameter InLocalPosition)

Select the word under the given position (the position is local to the text layout space)

◆ SetApplyLineHeightToBottomLine()

void FSlateEditableTextLayout::SetApplyLineHeightToBottomLine ( const TAttribute< bool > &  InApplyLineHeightToBottomLine)

Set whether to leave extra space below the last line due to line height

◆ SetAutoWrapText()

void FSlateEditableTextLayout::SetAutoWrapText ( const TAttribute< bool > &  InAutoWrapText)

Set whether to wrap text automatically based on the widget's computed horizontal space

◆ SetCompositionBrush()

void FSlateEditableTextLayout::SetCompositionBrush ( const TAttribute< const FSlateBrush * > &  InCompositionBrush)

Set the brush to use when drawing the composition highlight

◆ SetCursorBrush()

void FSlateEditableTextLayout::SetCursorBrush ( const TAttribute< const FSlateBrush * > &  InCursorBrush)

Set the brush to use when drawing the cursor

◆ SetDebugSourceInfo()

void FSlateEditableTextLayout::SetDebugSourceInfo ( const TAttribute< FString > &  InDebugSourceInfo)

Set the information used to help identify who owns this text layout in the case of an error

◆ SetEditableText()

bool FSlateEditableTextLayout::SetEditableText ( const FText TextToSet,
const bool  bForce = false 
)

Sets the current editable text for this text block Note: Doesn't update the value of BoundText, nor does it call OnTextChanged

Parameters
TextToSetThe new text to set in the internal TextLayout
bForceTrue to force the update, even if the text currently matches what's in the TextLayout
Returns
true if the text was updated, false if the text wasn't update (because it was already up-to-date)

◆ SetHintText()

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

◆ SetHorizontalScrollFraction()

UE::Slate::FDeprecateVector2DResult FSlateEditableTextLayout::SetHorizontalScrollFraction ( const float  InScrollOffsetFraction)

Update the horizontal scroll amount from the given fraction

◆ SetJustification()

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

Set how the text should be aligned with the margin

◆ SetLineHeightPercentage()

void FSlateEditableTextLayout::SetLineHeightPercentage ( const TAttribute< float > &  InLineHeightPercentage)

Set the amount to scale each lines height by

◆ SetMargin()

void FSlateEditableTextLayout::SetMargin ( const TAttribute< FMargin > &  InMargin)

Set the amount of blank space left around the edges of text area

◆ SetOverflowPolicy()

void FSlateEditableTextLayout::SetOverflowPolicy ( TOptional< ETextOverflowPolicy InOverflowPolicy)

Set the text overflow policy that should be used to determine what happens to clipped text

◆ SetScrollOffset()

UE::Slate::FDeprecateVector2DResult FSlateEditableTextLayout::SetScrollOffset ( const UE::Slate::FDeprecateVector2DParameter InScrollOffset,
const FGeometry InGeometry 
)

Set the absolute scroll offset value

◆ SetSearchText()

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

◆ SetText()

void FSlateEditableTextLayout::SetText ( const TAttribute< FText > &  InText)

◆ SetTextFlowDirection()

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

Set the text flow direction that the internal text layout should use

◆ SetTextShapingMethod()

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

Set the text shaping method that the internal text layout should use

◆ SetTextStyle()

void FSlateEditableTextLayout::SetTextStyle ( const FTextBlockStyle InTextStyle)

◆ SetTextWrapping()

void FSlateEditableTextLayout::SetTextWrapping ( const TAttribute< float > &  InWrapTextAt,
const TAttribute< bool > &  InAutoWrapText,
const TAttribute< ETextWrappingPolicy > &  InWrappingPolicy 
)

Set the wrapping to use for this document

◆ SetVerticalScrollFraction()

UE::Slate::FDeprecateVector2DResult FSlateEditableTextLayout::SetVerticalScrollFraction ( const float  InScrollOffsetFraction)

Update the vertical scroll amount from the given fraction

◆ SetWrappingPolicy()

void FSlateEditableTextLayout::SetWrappingPolicy ( const TAttribute< ETextWrappingPolicy > &  InWrappingPolicy)

Set the wrapping policy to use

◆ SetWrapTextAt()

void FSlateEditableTextLayout::SetWrapTextAt ( const TAttribute< float > &  InWrapTextAt)

Set whether text wraps onto a new line when it's length exceeds this width; if this value is zero or negative, no wrapping occurs

◆ Tick()

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

◆ ToggleVirtualKeyboard()

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

◆ TranslatedLocation()

FTextLocation FSlateEditableTextLayout::TranslatedLocation ( const FTextLocation CurrentLocation,
int8  Direction 
) const

Given a location and a Direction to offset, return a new location.

Parameters
LocationCursor location from which to offset
DirectionPositive means right, negative means left.

◆ TranslateLocationVertical()

void FSlateEditableTextLayout::TranslateLocationVertical ( const FTextLocation Location,
int32  NumLinesToMove,
float  GeometryScale,
FTextLocation OutCursorPosition,
TOptional< SlateEditableTextTypes::ECursorAlignment > &  OutCursorAlignment 
) const

Given a location and a Direction to offset, return a new location.

Parameters
LocationCursor location from which to offset
NumLinesToMoveNumber of lines to move in a given direction. Positive means down, negative means up.
GeometryScaleGeometry DPI scale at which the widget is being rendered
OutCursorPositionFill with the updated cursor position.
OutCursorAlignmentOptionally fill with a new cursor alignment (will be auto-calculated if not set).

◆ Undo()

void FSlateEditableTextLayout::Undo ( )

Execute an undo action

◆ UpdateCursorHighlight()

void FSlateEditableTextLayout::UpdateCursorHighlight ( )

Update the active cursor highlight based on the state of the text layout

◆ UpdatePreferredCursorScreenOffsetInLine()

void FSlateEditableTextLayout::UpdatePreferredCursorScreenOffsetInLine ( )

Update the preferred offset of the cursor, based on the current state of the text layout

Friends And Related Symbol Documentation

◆ FTextInputMethodContext

friend class FTextInputMethodContext
friend

Note: The IME interface for the multiline editable text uses the pre-flowed version of the string since the IME APIs are designed to work with flat strings This means we have to do a bit of juggling to convert between the two

◆ FVirtualKeyboardEntry

friend class FVirtualKeyboardEntry
friend

Virtual keyboard handler for an editable text layout


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