engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Protected 成员函数 | Protected 属性 | 所有成员列表
SEditableText类 参考

Editable text widget 更多...

#include <SEditableText.h>

+ 类 SEditableText 继承关系图:

Public 成员函数

void AdvanceSearch (const bool InReverse=false)
 Advance the current search to the next match (does nothing if not currently searching)
 
bool AnyTextSelected () const
 Query to see if any text is selected within the document
 
void 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)
 
void ClearSelection ()
 Clear the active text selection
 
void Construct (const FArguments &InArgs)
 Construct this widget 更多...
 
FText GetHintText () const
 Get the text that appears when there is no text in the text box
 
FText GetSearchText () const
 Get the text that is currently being searched for (if any)
 
FText GetSelectedText () const
 Get the currently selected text
 
FText GetText () const
 Returns the text string 更多...
 
void GoTo (const ETextLocation NewLocation)
 Move the cursor specified location
 
void GoTo (const FTextLocation &NewLocation)
 Move the cursor to the given location in the document (will also scroll to this point)
 
virtual bool IsMultiLineTextEdit () const override
 Is the text edit multi-line aware?
 
virtual bool IsTextPassword () const override
 Is the text displaying a password and should be obscured?
 
virtual bool IsTextReadOnly () const override
 Is the text currently read-only?
 
void ScrollTo (const ETextLocation NewLocation)
 Scroll to the given location in the document (without moving the cursor)
 
void ScrollTo (const FTextLocation &NewLocation)
 Scroll to the given location in the document (without moving the cursor)
 
 SEditableText ()
 Sets the text content for this editable text widget 更多...
 
void SelectAllText ()
 Select all the text in the document
 
void SetAllowContextMenu (const TAttribute< bool > &InAllowContextMenu)
 See the AllowContextMenu attribute
 
void SetClearKeyboardFocusOnCommit (const TAttribute< bool > &InClearKeyboardFocusOnCommit)
 Sets whether to clear keyboard focus when pressing enter to commit changes 更多...
 
void SetColorAndOpacity (TAttribute< FSlateColor > Color)
 See the ColorAndOpacity attribute
 
void SetFont (const TAttribute< FSlateFontInfo > &InNewFont)
 Sets the font used to draw the text 更多...
 
void SetHintText (const TAttribute< FText > &InHintText)
 See the HintText attribute
 
void SetIsCaretMovedWhenGainFocus (const TAttribute< bool > &InIsCaretMovedWhenGainFocus)
 Workaround as we loose focus when the auto completion closes. 更多...
 
void SetIsPassword (TAttribute< bool > InIsPassword)
 See the IsPassword attribute
 
void SetIsReadOnly (TAttribute< bool > InIsReadOnly)
 See the IsReadOnly attribute
 
void SetJustification (const TAttribute< ETextJustify::Type > &InJustification)
 See Justification attribute
 
void SetMinDesiredWidth (const TAttribute< float > &InMinDesiredWidth)
 Sets the minimum width that a text block should be. 更多...
 
void SetOnKeyCharHandler (FOnKeyChar InOnKeyCharHandler)
 Sets the OnKeyCharHandler to provide first chance handling of the OnKeyChar event 更多...
 
void SetOnKeyDownHandler (FOnKeyDown InOnKeyDownHandler)
 Sets the OnKeyDownHandler to provide first chance handling of the OnKeyDown event 更多...
 
void SetRevertTextOnEscape (const TAttribute< bool > &InRevertTextOnEscape)
 Sets whether to allow the user to back out of changes when they press the escape key 更多...
 
void SetSearchText (const TAttribute< FText > &InSearchText)
 Set the text that is currently being searched for (if any)
 
void SetSelectAllTextOnCommit (const TAttribute< bool > &InSelectAllTextOnCommit)
 Sets whether to select all text when pressing enter to commit changes 更多...
 
void SetSelectAllTextWhenFocused (const TAttribute< bool > &InSelectAllTextWhenFocused)
 Sets whether to select all text when the user clicks to give focus on the widget 更多...
 
void SetSelectWordOnMouseDoubleClick (const TAttribute< bool > &InSelectWordOnMouseDoubleClick)
 Sets whether to select word on the mouse double click 更多...
 
void SetText (const TAttribute< FText > &InNewText)
 Sets the text currently being edited 更多...
 
void SetTextFlowDirection (const TOptional< ETextFlowDirection > &InTextFlowDirection)
 See TextFlowDirection attribute
 
void SetTextShapingMethod (const TOptional< ETextShapingMethod > &InTextShapingMethod)
 See TextShapingMethod attribute
 
void SetVirtualKeyboardDismissAction (TAttribute< EVirtualKeyboardDismissAction > InVirtualKeyboardDismissAction)
 Set the VirtualKeyboardDismissAction attribute
 
 ~SEditableText ()
 Destructor
 
- Public 成员函数 继承自 SWidget
template<typename MetaDataType >
void AddMetadata (const TSharedRef< MetaDataType > &AddMe)
 Add metadata to this widget. 更多...
 
virtual bool Advanced_IsWindow () const
 Is this widget derivative of SWindow
 
void ArrangeChildren (const FGeometry &AllottedGeometry, FArrangedChildren &ArrangedChildren) const
 Non-virtual entry point for arrange children. 更多...
 
FORCEINLINE void CacheVolatility ()
 Recalculates volatility of the widget and caches the result. 更多...
 
FSlateRect CalculateCullingAndClippingRules (const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, bool &bClipToBounds, bool &bAlwaysClip, bool &bIntersectClipBounds) const
 Calculates what if any clipping state changes need to happen when drawing this widget. 更多...
 
void Construct (const TAttribute< FText > &InToolTipText, const TSharedPtr< IToolTip > &InToolTip, const TAttribute< TOptional< EMouseCursor::Type > > &InCursor, const TAttribute< bool > &InEnabledState, const TAttribute< EVisibility > &InVisibility, const float InRenderOpacity, const TAttribute< TOptional< FSlateRenderTransform > > &InTransform, const TAttribute< FVector2D > &InTransformPivot, const FName &InTag, const bool InForceVolatile, const EWidgetClipping InClipping, const EFlowDirectionPreference InFlowPreference, const TOptional< FAccessibleWidgetData > &InAccessibleData, const TArray< TSharedRef< ISlateMetaData > > &InMetaData)
 Construct a SWidget based on initial parameters.
 
void EnableToolTipForceField (const bool bEnableForceField)
 Sets whether this widget is a "tool tip force field". 更多...
 
FORCEINLINE void ForceVolatile (bool bForce)
 Should this widget always appear as volatile for any layout caching host widget. 更多...
 
template<typename MetaDataType >
TArray< TSharedRef< MetaDataType > > GetAllMetaData () const
 Get all metadata of the type provided. 更多...
 
virtual FChildren * GetChildren ()=0
 Every widget that has children must implement this method. 更多...
 
FORCEINLINE EWidgetClipping GetClipping () const
 
FName GetCreatedInLocation () const
 
FORCEINLINE FMargin GetCullingBoundsExtension () const
 
const TOptional< FSlateClippingState > & GetCurrentClippingState () const
 Returns the clipping state to clip this widget against its parent
 
FVector2D GetDesiredSize () const
 
EFlowDirectionPreference GetFlowDirectionPreference () const
 Gets the desired flow direction for the layout.
 
virtual FSlateColor GetForegroundColor () const
 
template<typename MetaDataType >
TSharedPtr< MetaDataType > GetMetaData () const
 Get the metadata of the type provided. 更多...
 
const FGeometry & GetPaintSpaceGeometry () const
 Gets the last geometry used to Tick the widget. 更多...
 
virtual FString GetReadableLocation () const
 
virtual float GetRelativeLayoutScale (const int32 ChildIndex, float LayoutScaleMultiplier) const
 What is the Child's scale relative to this widget.
 
FORCEINLINE float GetRenderOpacity () const
 
FORCEINLINE const TOptional< FSlateRenderTransform > & GetRenderTransform () const
 
FORCEINLINE FVector2D GetRenderTransformPivot () const
 
virtual FName GetTag () const
 
const FGeometry & GetTickSpaceGeometry () const
 Gets the last geometry used to Tick the widget. 更多...
 
virtual TSharedPtr< IToolTip > GetToolTip ()
 
FName GetType () const
 
FString GetTypeAsString () const
 
FORCEINLINE EVisibility GetVisibility () const
 
virtual EWindowZone::Type GetWindowZoneOverride () const
 Called when the mouse is moved over the widget's window, to determine if we should report whether OS-specific features should be active at this location (such as a title bar grip, system menu, etc.) Usually you should not need to override this function. 更多...
 
bool HasActiveTimers () const
 Does this widget have any active timers?
 
TOptional< EFocusCause > HasAnyUserFocus () const
 Gets whether or not any users have this widget focused, and if so the type of focus (first one found). 更多...
 
bool HasAnyUserFocusOrFocusedDescendants () const
 
bool HasFocusedDescendants () const
 
virtual bool HasKeyboardFocus () const
 Checks to see if this widget currently has the keyboard focus 更多...
 
bool HasMouseCapture () const
 Checks to see if this widget is the current mouse captor 更多...
 
bool HasMouseCaptureByUser (int32 UserIndex, TOptional< int32 > PointerIndex=TOptional< int32 >()) const
 Checks to see if this widget has mouse capture from the provided user. 更多...
 
bool HasToolTipForceField () const
 
TOptional< EFocusCause > HasUserFocus (int32 UserIndex) const
 Gets whether or not the specified users has this widget focused, and if so the type of focus. 更多...
 
bool HasUserFocusedDescendants (int32 UserIndex) const
 Gets whether or not the specified users has this widget or any descendant focused. 更多...
 
void Invalidate (EInvalidateWidgetReason InvalidateReason)
 Invalidates the widget from the view of a layout caching widget that may own this widget. 更多...
 
virtual bool IsDirectlyHovered () const
 
FORCEINLINE bool IsEnabled () const
 
virtual bool IsHovered () const
 
virtual bool IsInteractable () const
 
FORCEINLINE bool IsVolatile () const
 Whether or not a widget is volatile and will update every frame without being invalidated
 
FORCEINLINE bool IsVolatileIndirectly () const
 This widget is volatile because its parent or some ancestor is volatile
 
virtual FReply OnAnalogValueChanged (const FGeometry &MyGeometry, const FAnalogInputEvent &InAnalogInputEvent)
 Called when an analog value changes on a button that supports analog 更多...
 
virtual FCursorReply OnCursorQuery (const FGeometry &MyGeometry, const FPointerEvent &CursorEvent) const
 The system asks each widget under the mouse to provide a cursor. 更多...
 
virtual FReply OnDragDetected (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 Called when Slate detects that a widget started to be dragged. 更多...
 
virtual void OnDragEnter (const FGeometry &MyGeometry, const FDragDropEvent &DragDropEvent)
 Called during drag and drop when the drag enters a widget. 更多...
 
virtual void OnDragLeave (const FDragDropEvent &DragDropEvent)
 Called during drag and drop when the drag leaves a widget. 更多...
 
virtual FReply OnDragOver (const FGeometry &MyGeometry, const FDragDropEvent &DragDropEvent)
 Called during drag and drop when the the mouse is being dragged over a widget. 更多...
 
virtual FReply OnDrop (const FGeometry &MyGeometry, const FDragDropEvent &DragDropEvent)
 Called when the user is dropping something onto a widget; terminates drag and drop. 更多...
 
virtual void OnFinishedKeyInput ()
 All the key (keyboard, gamepay, joystick, etc.) input from this frame has been routed. 更多...
 
virtual void OnFinishedPointerInput ()
 All the pointer (mouse, touch, stylus, etc.) events from this frame have been routed. 更多...
 
virtual void OnFocusChanging (const FWeakWidgetPath &PreviousFocusPath, const FWidgetPath &NewWidgetPath)
 Called whenever a focus path is changing on all the widgets within the old and new focus paths
 
virtual void OnFocusChanging (const FWeakWidgetPath &PreviousFocusPath, const FWidgetPath &NewWidgetPath, const FFocusEvent &InFocusEvent)
 Called whenever a focus path is changing on all the widgets within the old and new focus paths
 
virtual void OnFocusLost (const FFocusEvent &InFocusEvent)
 Called when this widget loses focus. 更多...
 
virtual FReply OnFocusReceived (const FGeometry &MyGeometry, const FFocusEvent &InFocusEvent)
 Called when focus is given to this widget. 更多...
 
virtual FReply OnKeyChar (const FGeometry &MyGeometry, const FCharacterEvent &InCharacterEvent)
 Called after a character is entered while this widget has keyboard focus 更多...
 
virtual FReply OnKeyDown (const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent)
 Called after a key is pressed when this widget has focus (this event bubbles if not handled) 更多...
 
virtual FReply OnKeyUp (const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent)
 Called after a key is released when this widget has focus 更多...
 
virtual TOptional< TSharedRef< SWidget > > OnMapCursor (const FCursorReply &CursorReply) const
 After OnCursorQuery has specified a cursor type the system asks each widget under the mouse to map that cursor to a widget. 更多...
 
virtual FReply OnMotionDetected (const FGeometry &MyGeometry, const FMotionEvent &InMotionEvent)
 Called when motion is detected (controller or device) e.g. 更多...
 
virtual FReply OnMouseButtonDoubleClick (const FGeometry &InMyGeometry, const FPointerEvent &InMouseEvent)
 Called when a mouse button is double clicked. 更多...
 
virtual FReply OnMouseButtonDown (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 The system calls this method to notify the widget that a mouse button was pressed within it. 更多...
 
virtual FReply OnMouseButtonUp (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 The system calls this method to notify the widget that a mouse button was release within it. 更多...
 
virtual void OnMouseCaptureLost (const FCaptureLostEvent &CaptureLostEvent)
 Called when this widget had captured the mouse, but that capture has been revoked for some reason.
 
virtual void OnMouseEnter (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 The system will use this event to notify a widget that the cursor has entered it. 更多...
 
virtual void OnMouseLeave (const FPointerEvent &MouseEvent)
 The system will use this event to notify a widget that the cursor has left it. 更多...
 
virtual FReply OnMouseMove (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 The system calls this method to notify the widget that a mouse moved within it. 更多...
 
virtual FReply OnMouseWheel (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 Called when the mouse wheel is spun. 更多...
 
virtual FNavigationReply OnNavigation (const FGeometry &MyGeometry, const FNavigationEvent &InNavigationEvent)
 Called when navigation is requested e.g. 更多...
 
virtual FReply OnPreviewKeyDown (const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent)
 Called after a key is pressed when this widget or a child of this widget has focus If a widget handles this event, OnKeyDown will not be passed to the focused widget. 更多...
 
virtual FReply OnPreviewMouseButtonDown (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 Just like OnMouseButtonDown, but tunnels instead of bubbling. 更多...
 
virtual FPopupMethodReply OnQueryPopupMethod () const
 Popups can manifest in a NEW OS WINDOW or via an OVERLAY in an existing window. 更多...
 
virtual TOptional< bool > OnQueryShowFocus (const EFocusCause InFocusCause) const
 Called to determine if we should render the focus brush. 更多...
 
virtual void OnToolTipClosing ()
 Called when a tooltip displayed from this widget is being closed
 
virtual FReply OnTouchEnded (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
 Called when a touchpad touch is ended (finger lifted) 更多...
 
virtual FReply OnTouchFirstMove (const FGeometry &MyGeometry, const FPointerEvent &TouchEvent)
 Called when a touchpad touch first moves after TouchStarted 更多...
 
virtual FReply OnTouchForceChanged (const FGeometry &MyGeometry, const FPointerEvent &TouchEvent)
 Called when a touchpad touch force changes 更多...
 
virtual FReply OnTouchGesture (const FGeometry &MyGeometry, const FPointerEvent &GestureEvent)
 Called when the user performs a gesture on trackpad. 更多...
 
virtual FReply OnTouchMoved (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
 Called when a touchpad touch is moved (finger moved) 更多...
 
virtual FReply OnTouchStarted (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
 Called when a touchpad touch is started (finger down) 更多...
 
virtual TSharedPtr< FPopupLayer > OnVisualizePopup (const TSharedRef< SWidget > &PopupContent)
 Visualize a new pop-up if possible. 更多...
 
virtual bool OnVisualizeTooltip (const TSharedPtr< SWidget > &TooltipContent)
 Called when Slate wants to visualize tooltip. 更多...
 
int32 Paint (const FPaintArgs &Args, const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle, bool bParentEnabled) const
 Called to tell a widget to paint itself (and it's children). 更多...
 
TSharedRef< FActiveTimerHandle > RegisterActiveTimer (float TickPeriod, FWidgetActiveTimerDelegate TickFunction)
 Registers an "active timer" delegate that will execute at some regular interval. 更多...
 
FORCEINLINE void SetClipping (EWidgetClipping InClipping)
 Sets the clipping to bounds rules for this widget.
 
FORCEINLINE void SetCullingBoundsExtension (const FMargin &InCullingBoundsExtension)
 Sets an additional culling padding that is added to a widget to give more leeway when culling widgets. 更多...
 
void SetCursor (const TAttribute< TOptional< EMouseCursor::Type > > &InCursor)
 Set the cursor that should appear when this widget is hovered
 
void SetDebugInfo (const ANSICHAR *InType, const ANSICHAR *InFile, int32 OnLine, size_t InAllocSize)
 Used by Slate to set the runtime debug info about this widget.
 
void SetEnabled (const TAttribute< bool > &InEnabledState)
 Sets the enabled state of this widget 更多...
 
void SetFlowDirectionPreference (EFlowDirectionPreference InFlowDirectionPreference)
 Sets how content should flow in this panel, based on the current culture. 更多...
 
void SetOnMouseButtonDown (FPointerEventHandler EventHandler)
 See OnMouseButtonDown event
 
void SetOnMouseButtonUp (FPointerEventHandler EventHandler)
 See OnMouseButtonUp event
 
void SetOnMouseDoubleClick (FPointerEventHandler EventHandler)
 See OnMouseDoubleClick event
 
void SetOnMouseEnter (FNoReplyPointerEventHandler EventHandler)
 See OnMouseEnter event
 
void SetOnMouseLeave (FSimpleNoReplyPointerEventHandler EventHandler)
 See OnMouseLeave event
 
void SetOnMouseMove (FPointerEventHandler EventHandler)
 See OnMouseMove event
 
FORCEINLINE void SetRenderOpacity (float InRenderOpacity)
 
FORCEINLINE void SetRenderTransform (TAttribute< TOptional< FSlateRenderTransform > > InTransform)
 
FORCEINLINE void SetRenderTransformPivot (TAttribute< FVector2D > InTransformPivot)
 
void SetToolTip (const TSharedPtr< IToolTip > &InToolTip)
 Set the tool tip that should appear when this widget is hovered. 更多...
 
void SetToolTipText (const TAttribute< FText > &ToolTipText)
 Set the tool tip that should appear when this widget is hovered. 更多...
 
virtual void SetVisibility (TAttribute< EVisibility > InVisibility)
 
void SlatePrepass ()
 DEPRECATED version of SlatePrepass that assumes no scaling beyond AppScale
 
void SlatePrepass (float InLayoutScaleMultiplier)
 Descends to leaf-most widgets in the hierarchy and gathers desired sizes on the way up. 更多...
 
virtual bool SupportsKeyboardFocus () const
 Checks to see if this widget supports keyboard focus. 更多...
 
virtual void Tick (const FGeometry &AllottedGeometry, const double InCurrentTime, const float InDeltaTime)
 Ticks this widget with Geometry. 更多...
 
virtual FString ToString () const
 
void UnRegisterActiveTimer (const TSharedRef< FActiveTimerHandle > &ActiveTimerHandle)
 Unregisters an active timer handle. 更多...
 
- Public 成员函数 继承自 TSharedFromThis< SWidget >
TSharedRef< SWidget, Mode > AsShared ()
 Provides access to a shared reference to this object. 更多...
 
TSharedRef< SWidget const, Mode > AsShared () const
 Provides access to a shared reference to this object (const.) Note that is only valid to call this after a shared reference (or shared pointer) to the object has already been created. 更多...
 
FORCEINLINE bool DoesSharedInstanceExist () const
 Checks whether our referenced instance is valid (ie, whether it's safe to call AsShared). 更多...
 
FORCEINLINE void UpdateWeakReferenceInternal (TSharedPtr< SharedPtrType, Mode > const *InSharedPtr, OtherType *InObject) const
 INTERNAL USE ONLY – Do not call this method. 更多...
 
FORCEINLINE void UpdateWeakReferenceInternal (TSharedRef< SharedRefType, Mode > const *InSharedRef, OtherType *InObject) const
 INTERNAL USE ONLY – Do not call this method. 更多...
 
virtual TSharedPtr< SWidget > BuildContextMenuContent () const =0
 Build the context menu content to use for this widget (if any)
 
virtual bool CanInsertCarriageReturn () const =0
 Are we currently able to insert a carriage return? (some widgets have modifier keys that need to be pressed)
 
virtual bool CanTypeCharacter (const TCHAR InChar) const =0
 Are we able to insert the given character into our text?
 
virtual void EnsureActiveTick ()=0
 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
 
virtual TSharedRef< SWidget > GetSlateWidget ()=0
 Get the Slate widget this interface is representing (may not be called during destruction)
 
virtual TSharedPtr< SWidget > GetSlateWidgetPtr ()=0
 Get the Slate widget this interface is representing (may be null during destruction)
 
virtual EVirtualKeyboardDismissAction GetVirtualKeyboardDismissAction () const =0
 Get the message action to take when the virtual keyboard is dismissed by the user
 
virtual FVirtualKeyboardOptions GetVirtualKeyboardOptions () const =0
 Get the options for the virtual keyboard used for this widget
 
virtual EVirtualKeyboardTrigger GetVirtualKeyboardTrigger () const =0
 Get the type of event that will trigger the display of the virtual keyboard
 
virtual EKeyboardType GetVirtualKeyboardType () const =0
 Get the type of virtual keyboard to use for this widget
 
virtual bool IsMultiLineTextEdit () const =0
 Is the text edit multi-line aware?
 
virtual bool IsTextPassword () const =0
 Is the text displaying a password and should be obscured?
 
virtual bool IsTextReadOnly () const =0
 Is the text currently read-only?
 
virtual void OnCursorMoved (const FTextLocation &InLocation)=0
 Called when the cursor is moved within the text area
 
virtual void OnTextChanged (const FText &InText)=0
 Called when the text has been changed by an edit operation
 
virtual void OnTextCommitted (const FText &InText, const ETextCommit::Type InTextAction)=0
 Called when the text control has committed its current edit changes
 
virtual bool ShouldClearKeyboardFocusOnCommit () const =0
 Should we clear the keyboard focus when the user commits text to this widget?
 
virtual bool ShouldClearTextSelectionOnFocusLoss () const =0
 Should the text clear its selection the widget loses focus?
 
virtual bool ShouldJumpCursorToEndWhenFocused () const =0
 Should the cursor be jumped to the end of the document when the widget gains focus?
 
virtual bool ShouldRevertTextOnEscape () const =0
 Should we revert the text back to its original state when the user presses escape?
 
virtual bool ShouldSelectAllTextOnCommit () const =0
 Should we select all text when the user commits text to this widget?
 
virtual bool ShouldSelectAllTextWhenFocused () const =0
 Should the text be selected when the widget gains focus?
 
virtual bool ShouldSelectWordOnMouseDoubleClick () const =0
 Should we select word on mouse double click?
 
virtual float UpdateAndClampHorizontalScrollBar (const float InViewOffset, const float InViewFraction, const EVisibility InVisiblityOverride)=0
 Called when the fraction and offset of the horizontal scroll area has been recalculated. 更多...
 
virtual float UpdateAndClampVerticalScrollBar (const float InViewOffset, const float InViewFraction, const EVisibility InVisiblityOverride)=0
 Called when the fraction and offset of the vertical scroll area has been recalculated. 更多...
 

Protected 成员函数

virtual TSharedPtr< SWidget > BuildContextMenuContent () const override
 Build the context menu content to use for this widget (if any)
 
virtual void CacheDesiredSize (float LayoutScaleMultiplier) override
 The system calls this method. 更多...
 
virtual bool CanInsertCarriageReturn () const override
 Are we currently able to insert a carriage return? (some widgets have modifier keys that need to be pressed)
 
virtual bool CanTypeCharacter (const TCHAR InChar) const override
 Are we able to insert the given character into our text?
 
virtual FVector2D ComputeDesiredSize (float LayoutScaleMultiplier) const override
 Compute the ideal size necessary to display this widget. 更多...
 
virtual bool ComputeVolatility () const override
 Recomputes the volatility of the widget. 更多...
 
virtual void EnsureActiveTick () override
 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
 
virtual FChildren * GetChildren () override
 Every widget that has children must implement this method. 更多...
 
virtual const FSlateBrush * GetFocusBrush () const
 
virtual TSharedRef< SWidget > GetSlateWidget () override
 Get the Slate widget this interface is representing (may not be called during destruction)
 
virtual TSharedPtr< SWidget > GetSlateWidgetPtr () override
 Get the Slate widget this interface is representing (may be null during destruction)
 
virtual EVirtualKeyboardDismissAction GetVirtualKeyboardDismissAction () const override
 Get the message action to take when the virtual keyboard is dismissed by the user
 
virtual FVirtualKeyboardOptions GetVirtualKeyboardOptions () const override
 Get the options for the virtual keyboard used for this widget
 
virtual EVirtualKeyboardTrigger GetVirtualKeyboardTrigger () const override
 Get the type of event that will trigger the display of the virtual keyboard
 
virtual EKeyboardType GetVirtualKeyboardType () const override
 Get the type of virtual keyboard to use for this widget
 
virtual bool IsInteractable () const override
 
virtual void OnArrangeChildren (const FGeometry &AllottedGeometry, FArrangedChildren &ArrangedChildren) const override
 Compute the Geometry of all the children and add populate the ArrangedChildren list with their values. 更多...
 
virtual void OnCursorMoved (const FTextLocation &InLocation) override
 Called when the cursor is moved within the text area
 
virtual FCursorReply OnCursorQuery (const FGeometry &MyGeometry, const FPointerEvent &CursorEvent) const override
 The system asks each widget under the mouse to provide a cursor. 更多...
 
virtual FReply OnDragOver (const FGeometry &MyGeometry, const FDragDropEvent &DragDropEvent) override
 Called during drag and drop when the the mouse is being dragged over a widget. 更多...
 
virtual FReply OnDrop (const FGeometry &MyGeometry, const FDragDropEvent &DragDropEvent) override
 Called when the user is dropping something onto a widget; terminates drag and drop. 更多...
 
virtual void OnFocusLost (const FFocusEvent &InFocusEvent) override
 Called when this widget loses focus. 更多...
 
virtual FReply OnFocusReceived (const FGeometry &MyGeometry, const FFocusEvent &InFocusEvent) override
 Called when focus is given to this widget. 更多...
 
virtual FReply OnKeyChar (const FGeometry &MyGeometry, const FCharacterEvent &InCharacterEvent) override
 Called after a character is entered while this widget has keyboard focus 更多...
 
virtual FReply OnKeyDown (const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent) override
 Called after a key is pressed when this widget has focus (this event bubbles if not handled) 更多...
 
virtual FReply OnKeyUp (const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent) override
 Called after a key is released when this widget has focus 更多...
 
virtual FReply OnMouseButtonDoubleClick (const FGeometry &InMyGeometry, const FPointerEvent &InMouseEvent) override
 Called when a mouse button is double clicked. 更多...
 
virtual FReply OnMouseButtonDown (const FGeometry &InMyGeometry, const FPointerEvent &InMouseEvent) override
 The system calls this method to notify the widget that a mouse button was pressed within it. 更多...
 
virtual FReply OnMouseButtonUp (const FGeometry &InMyGeometry, const FPointerEvent &InMouseEvent) override
 The system calls this method to notify the widget that a mouse button was release within it. 更多...
 
virtual FReply OnMouseMove (const FGeometry &InMyGeometry, const FPointerEvent &InMouseEvent) override
 The system calls this method to notify the widget that a mouse moved within it. 更多...
 
virtual int32 OnPaint (const FPaintArgs &Args, const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle, bool bParentEnabled) const override
 The widget should respond by populating the OutDrawElements array with FDrawElements that represent it and any of its children. 更多...
 
virtual void OnTextChanged (const FText &InText) override
 Called when the text has been changed by an edit operation
 
virtual void OnTextCommitted (const FText &InText, const ETextCommit::Type InTextAction) override
 Called when the text control has committed its current edit changes
 
virtual bool ShouldClearKeyboardFocusOnCommit () const override
 Should we clear the keyboard focus when the user commits text to this widget?
 
virtual bool ShouldClearTextSelectionOnFocusLoss () const override
 Should the text clear its selection the widget loses focus?
 
virtual bool ShouldJumpCursorToEndWhenFocused () const override
 Should the cursor be jumped to the end of the document when the widget gains focus?
 
virtual bool ShouldRevertTextOnEscape () const override
 Should we revert the text back to its original state when the user presses escape?
 
virtual bool ShouldSelectAllTextOnCommit () const override
 Should we select all text when the user commits text to this widget?
 
virtual bool ShouldSelectAllTextWhenFocused () const override
 Should the text be selected when the widget gains focus?
 
virtual bool ShouldSelectWordOnMouseDoubleClick () const override
 Should we select word on mouse double click?
 
virtual bool SupportsKeyboardFocus () const override
 Checks to see if this widget supports keyboard focus. 更多...
 
void SynchronizeTextStyle ()
 Synchronize the text style currently set (including from overrides) and update the text layout if required
 
virtual void Tick (const FGeometry &AllottedGeometry, const double InCurrentTime, const float InDeltaTime) override
 Ticks this widget with Geometry. 更多...
 
virtual float UpdateAndClampHorizontalScrollBar (const float InViewOffset, const float InViewFraction, const EVisibility InVisiblityOverride) override
 Called when the fraction and offset of the horizontal scroll area has been recalculated. 更多...
 
virtual float UpdateAndClampVerticalScrollBar (const float InViewOffset, const float InViewFraction, const EVisibility InVisiblityOverride) override
 Called when the fraction and offset of the vertical scroll area has been recalculated. 更多...
 
- Protected 成员函数 继承自 SWidget
FORCEINLINE bool Advanced_InvalidateVolatility ()
 Recalculates and caches volatility and returns 'true' if the volatility changed.
 
virtual void CacheDesiredSize (float InLayoutScaleMultiplier)
 The system calls this method. 更多...
 
virtual FVector2D ComputeDesiredSize (float LayoutScaleMultiplier) const =0
 Compute the ideal size necessary to display this widget. 更多...
 
EFlowDirection ComputeFlowDirection () const
 Establishes a new flow direction potentially, if this widget has a particular preference for it and all its children.
 
virtual bool ComputeVolatility () const
 Recomputes the volatility of the widget. 更多...
 
bool FindChildGeometries (const FGeometry &MyGeometry, const TSet< TSharedRef< SWidget > > &WidgetsToFind, TMap< TSharedRef< SWidget >, FArrangedWidget > &OutResult) const
 Find the geometry of a descendant widget. 更多...
 
void FindChildGeometries_Helper (const FGeometry &MyGeometry, const TSet< TSharedRef< SWidget > > &WidgetsToFind, TMap< TSharedRef< SWidget >, FArrangedWidget > &OutResult) const
 Actual implementation of FindChildGeometries. 更多...
 
FGeometry FindChildGeometry (const FGeometry &MyGeometry, TSharedRef< SWidget > WidgetToFind) const
 Find the geometry of a descendant widget. 更多...
 
virtual const FSlateBrush * GetFocusBrush () const
 
void InvalidateChildRemovedFromTree (SWidget &Child)
 Called when a child is removed from the tree parent's widget tree either by removing it from a slot. 更多...
 
virtual void OnClippingChanged ()
 Called when clipping is changed. 更多...
 
void OnMouseCaptureLost ()
 Called when this widget had captured the mouse, but that capture has been revoked for some reason.
 
template<typename TargetValueType , typename SourceValueType >
bool SetAttribute (TAttribute< TargetValueType > &TargetValue, const TAttribute< SourceValueType > &SourceValue, EInvalidateWidgetReason BaseInvalidationReason)
 Performs the attribute assignment and invalidates the widget minimally based on what actually changed. 更多...
 
bool ShouldBeEnabled (bool InParentEnabled) const
 Determines if this widget should be enabled. 更多...
 
 SWidget ()
 Hidden default constructor. 更多...
 
virtual ~SWidget ()
 Dtor ensures that active timer handles are UnRegistered with the SlateApplication.
 
- Protected 成员函数 继承自 TSharedFromThis< SWidget >
FORCEINLINE TSharedFromThis & operator= (TSharedFromThis const &)
 Hidden stub assignment operator
 
 TSharedFromThis ()
 Hidden stub constructor
 
 TSharedFromThis (TSharedFromThis const &)
 Hidden stub copy constructor
 
 ~TSharedFromThis ()
 Hidden destructor
 

Protected 属性

TWeakPtr< FActiveTimerHandle > ActiveTickTimer
 The timer that is actively driving this widget to Tick() even when Slate is idle
 
TAttribute< const FSlateBrush * > BackgroundImageSelected
 Background image for the selected text
 
TAttribute< bool > bAllowContextMenu
 Whether to disable the context menu
 
TAttribute< bool > bClearKeyboardFocusOnCommit
 Whether to clear keyboard focus when pressing enter to commit changes
 
TAttribute< bool > bIsCaretMovedWhenGainFocus
 Workaround as we loose focus when the auto completion closes.
 
TAttribute< bool > bIsPassword
 Sets whether this text box is for storing a password
 
TAttribute< bool > bIsReadOnly
 Sets whether this text box can actually be modified interactively by the user
 
TAttribute< bool > bRevertTextOnEscape
 Whether to allow the user to back out of changes when they press the escape key
 
TAttribute< bool > bSelectAllTextOnCommit
 Whether to select all text when pressing enter to commit changes
 
TAttribute< bool > bSelectAllTextWhenFocused
 Whether to select all text when the user clicks to give focus on the widget
 
TAttribute< bool > bSelectWordOnMouseDoubleClick
 Whether to select word on mouse double click
 
TAttribute< FSlateColor > ColorAndOpacity
 Text color and opacity
 
TUniquePtr< FSlateEditableTextLayout > EditableTextLayout
 The text layout that deals with the editable text
 
TAttribute< FSlateFontInfo > Font
 The font used to draw the text
 
TSharedPtr< FExtender > MenuExtender
 Menu extender for right-click context menu
 
TAttribute< float > MinDesiredWidth
 Prevents the editable text from being smaller than desired in certain cases (e.g. 更多...
 
FOnContextMenuOpening OnContextMenuOpening
 Delegate to call before a context menu is opened
 
FOnIsTypedCharValid OnIsTypedCharValid
 Called when a character is typed and we want to know if the text field supports typing this character.
 
FOnKeyChar OnKeyCharHandler
 Callback delegate to have first chance handling of the OnKeyChar event
 
FOnKeyDown OnKeyDownHandler
 Callback delegate to have first chance handling of the OnKeyDown event
 
FOnTextChanged OnTextChangedCallback
 Called whenever the text is changed programmatically or interactively by the user
 
FOnTextCommitted OnTextCommittedCallback
 Called whenever the text is committed. 更多...
 
TSharedPtr< FPlainTextLayoutMarshaller > PlainTextMarshaller
 Text marshaller used by the editable text layout
 
TAttribute< EVirtualKeyboardDismissAction > VirtualKeyboardDismissAction
 The message action to take when the virtual keyboard is dismissed by the user
 
FVirtualKeyboardOptions VirtualKeyboardOptions
 Additional options used by the virtual keyboard summoned by this widget
 
TAttribute< EVirtualKeyboardTrigger > VirtualKeyboardTrigger
 The type of event that will trigger the display of the virtual keyboard
 
TAttribute< EKeyboardType > VirtualKeyboardType
 The type of virtual keyboard to use for editing this text on mobile
 
TSharedPtr< IBreakIterator > WordBreakIterator
 The iterator to use to detect word boundaries
 
- Protected 属性 继承自 SWidget
uint8 bCanHaveChildren: 1
 Can the widget ever support children? This will be false on SLeafWidgets, rather than setting this directly, you should probably inherit from SLeafWidget.
 
uint8 bCanSupportFocus: 1
 Can the widget ever support keyboard focus
 
uint8 bClippingProxy: 1
 Some widgets might be a complex hierarchy of child widgets you never see. 更多...
 
uint8 bIsHovered: 1
 Is this widget hovered?
 
uint8 bVolatilityAlwaysInvalidatesPrepass: 1
 if this widget should always invalidate the prepass step when volatile
 
EWidgetClipping Clipping
 Set to true if all content of the widget should clip to the bounds of this widget.
 
FName CreatedInLocation
 Full file path (and line) in which this widget was created
 
FMargin CullingBoundsExtension
 Can be used to enlarge the culling bounds of this widget (pre-intersection), this can be useful if you've got children that you know are using rendering transforms to render outside their standard bounds, if that happens it's possible the parent might be culled before the descendant widget is entirely off screen. 更多...
 
TAttribute< TOptional< EMouseCursor::Type > > Cursor
 The cursor to show when the mouse is hovering over this widget.
 
TAttribute< bool > EnabledState
 Whether or not this widget is enabled
 
TArray< TSharedRef< ISlateMetaData > > MetaData
 Metadata associated with this widget
 
float RenderOpacity
 The opacity of the widget. 更多...
 
TAttribute< TOptional< FSlateRenderTransform > > RenderTransform
 Render transform of this widget. 更多...
 
TAttribute< FVector2D > RenderTransformPivot
 Render transform pivot of this widget (in normalized local space)
 
FName Tag
 Tag for this widget
 
FName TypeOfWidget
 Debugging information on the type of widget we're creating for the Widget Reflector.
 
TAttribute< EVisibility > Visibility
 Is this widget visible, hidden or collapsed
 

额外继承的成员函数

- 静态 Protected 成员函数 继承自 SWidget
static const TAttribute< EVisibility > & AccessWidgetVisibilityAttribute (const TSharedRef< SWidget > &Widget)
 Protected static helper to allow widgets to access the visibility attribute of other widgets directly 更多...
 
static int32 FindChildUnderMouse (const FArrangedChildren &Children, const FPointerEvent &MouseEvent)
 
static int32 FindChildUnderPosition (const FArrangedChildren &Children, const FVector2D &ArrangedSpacePosition)
 
- 静态 Protected 成员函数 继承自 TSharedFromThis< SWidget >
static FORCEINLINE TSharedRef< OtherType const, Mode > SharedThis (const OtherType *ThisPtr)
 Provides access to a shared reference to an object, given the object's 'this' pointer. 更多...
 
static FORCEINLINE TSharedRef< OtherType, Mode > SharedThis (OtherType *ThisPtr)
 Provides access to a shared reference to an object, given the object's 'this' pointer. 更多...
 

详细描述

Editable text widget

构造及析构函数说明

◆ 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
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! 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) Constructor

成员函数说明

◆ CacheDesiredSize()

virtual 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.

重载 SWidget .

◆ ComputeDesiredSize()

virtual 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.

参数
LayoutScaleMultiplierThis parameter is safe to ignore for almost all widgets; only really affects text measuring.
返回
The desired size.

实现了 SWidget.

◆ ComputeVolatility()

virtual 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.

重载 SWidget .

◆ Construct()

void SEditableText::Construct ( const FArguments &  InArgs)

Construct this widget

参数
InArgsThe declaration data for this widget

◆ GetChildren()

virtual FChildren * SEditableText::GetChildren ( )
overrideprotectedvirtual

Every widget that has children must implement this method.

This allows for iteration over the Widget's children regardless of how they are actually stored.

实现了 SWidget.

◆ GetFocusBrush()

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

重载 SWidget .

◆ GetText()

FText SEditableText::GetText ( ) const

Returns the text string

返回
Text string

◆ IsInteractable()

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

重载 SWidget .

◆ OnArrangeChildren()

virtual 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.

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

实现了 SWidget.

◆ OnCursorQuery()

virtual 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.

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

重载 SWidget .

◆ OnDragOver()

virtual 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.

参数
MyGeometryThe geometry of the widget receiving the event.
DragDropEventThe drag and drop event.
返回
A reply that indicated whether this event was handled.

重载 SWidget .

◆ OnDrop()

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

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

参数
MyGeometryThe geometry of the widget receiving the event.
DragDropEventThe drag and drop event.
返回
A reply that indicated whether this event was handled.

重载 SWidget .

◆ OnFocusLost()

virtual void SEditableText::OnFocusLost ( const FFocusEvent &  InFocusEvent)
overrideprotectedvirtual

Called when this widget loses focus.

This event does not bubble.

参数
InFocusEventThe FocusEvent

重载 SWidget .

◆ OnFocusReceived()

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

Called when focus is given to this widget.

This event does not bubble.

参数
MyGeometryThe Geometry of the widget receiving the event
InFocusEventThe FocusEvent
返回
Returns whether the event was handled, along with other possible actions

重载 SWidget .

◆ OnKeyChar()

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

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

参数
MyGeometryThe Geometry of the widget receiving the event
InCharacterEventCharacter event
返回
Returns whether the event was handled, along with other possible actions

重载 SWidget .

◆ OnKeyDown()

virtual 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)

参数
MyGeometryThe Geometry of the widget receiving the event
InKeyEventKey event
返回
Returns whether the event was handled, along with other possible actions

重载 SWidget .

◆ OnKeyUp()

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

Called after a key is released when this widget has focus

参数
MyGeometryThe Geometry of the widget receiving the event
InKeyEventKey event
返回
Returns whether the event was handled, along with other possible actions

重载 SWidget .

◆ OnMouseButtonDoubleClick()

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

Called when a mouse button is double clicked.

Override this in derived classes.

参数
InMyGeometryWidget geometry
InMouseEventMouse button event
返回
Returns whether the event was handled, along with other possible actions

重载 SWidget .

◆ OnMouseButtonDown()

virtual 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.

参数
MyGeometryThe Geometry of the widget receiving the event
MouseEventInformation about the input event
返回
Whether the event was handled along with possible requests for the system to take action.

重载 SWidget .

◆ OnMouseButtonUp()

virtual 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.

参数
MyGeometryThe Geometry of the widget receiving the event
MouseEventInformation about the input event
返回
Whether the event was handled along with possible requests for the system to take action.

重载 SWidget .

◆ OnMouseMove()

virtual 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.

参数
MyGeometryThe Geometry of the widget receiving the event
MouseEventInformation about the input event
返回
Whether the event was handled along with possible requests for the system to take action.

重载 SWidget .

◆ OnPaint()

virtual 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.

参数
ArgsAll the arguments necessary to paint this widget (
待办事项:
umg: move all params into this struct)
参数
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.
返回
The maximum layer ID attained by this widget or any of its children.

实现了 SWidget.

◆ SetClearKeyboardFocusOnCommit()

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

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

参数
InClearKeyboardFocusOnCommitClear keyboard focus when pressing enter?

◆ SetFont()

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

Sets the font used to draw the text

参数
InNewFontThe new font to use

◆ SetIsCaretMovedWhenGainFocus()

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

Workaround as we loose focus when the auto completion closes.

参数
InIsCaretMovedWhenGainFocusWorkaround

◆ SetMinDesiredWidth()

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

Sets the minimum width that a text block should be.

参数
InMinDesiredWidthThe minimum width

◆ SetOnKeyCharHandler()

void SEditableText::SetOnKeyCharHandler ( FOnKeyChar  InOnKeyCharHandler)
inline

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

参数
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

参数
InOnKeyDownHandlerDelegate to call during OnKeyDown event

◆ 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

参数
InRevertTextOnEscapeAllow the user to back out of changes?

◆ SetSelectAllTextOnCommit()

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

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

参数
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

参数
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

参数
InSelectWordOnMouseDoubleClickSelect word on the mouse double click

◆ SetText()

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

Sets the text currently being edited

参数
InNewTextThe new text

◆ SupportsKeyboardFocus()

virtual bool SEditableText::SupportsKeyboardFocus ( ) const
overrideprotectedvirtual

Checks to see if this widget supports keyboard focus.

Override this in derived classes.

返回
True if this widget can take keyboard focus

重载 SWidget .

◆ Tick()

virtual 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.

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

重载 SWidget .

◆ UpdateAndClampHorizontalScrollBar()

virtual 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

实现了 ISlateEditableTextWidget.

◆ UpdateAndClampVerticalScrollBar()

virtual 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

实现了 ISlateEditableTextWidget.

类成员变量说明

◆ MinDesiredWidth

TAttribute<float> SEditableText::MinDesiredWidth
protected

Prevents the editable text from being smaller than desired in certain cases (e.g.

when it is empty)

◆ OnTextCommittedCallback

FOnTextCommitted SEditableText::OnTextCommittedCallback
protected

Called whenever the text is committed.

This happens when the user presses enter or the text box loses focus.


该类的文档由以下文件生成: