UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SSpinBox< NumericType > Class Template Reference

#include <SSpinBox.h>

+ Inheritance diagram for SSpinBox< NumericType >:

Public Member Functions

 DECLARE_DELEGATE_OneParam (FOnValueChanged, NumericType)
 
 DECLARE_DELEGATE_TwoParams (FOnValueCommitted, NumericType, ETextCommit::Type)
 
 DECLARE_DELEGATE_FourParams (FOnDynamicSliderMinMaxValueChanged, NumericType, TWeakPtr< SWidget >, bool, bool)
 
 DECLARE_DELEGATE_RetVal_OneParam (TOptional< FText >, FOnGetDisplayValue, NumericType)
 
 SLATE_BEGIN_ARGS (SSpinBox< NumericType >)
 
SLATE_API SSpinBox ()
 
virtual SLATE_API ~SSpinBox ()
 
SLATE_API void Construct (const FArguments &InArgs)
 
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
 
SLATE_API void Tick (const FGeometry &AlottedGeometry, const double InCurrentTime, const float InDeltaTime)
 
SLATE_API const bool CommitWithMultiplier (const FPointerEvent &MouseEvent)
 
virtual SLATE_API FReply OnMouseButtonDown (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent) override
 
virtual SLATE_API FReply OnMouseButtonUp (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent) override
 
SLATE_API void ApplySliderMaxValueChanged (float SliderDeltaToAdd, bool UpdateOnlyIfHigher)
 
SLATE_API void ApplySliderMinValueChanged (float SliderDeltaToAdd, bool UpdateOnlyIfLower)
 
virtual SLATE_API FReply OnMouseMove (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent) override
 
virtual SLATE_API FReply OnMouseWheel (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent) override
 
virtual SLATE_API FCursorReply OnCursorQuery (const FGeometry &MyGeometry, const FPointerEvent &CursorEvent) const override
 
virtual SLATE_API bool SupportsKeyboardFocus () const override
 
virtual SLATE_API FReply OnFocusReceived (const FGeometry &MyGeometry, const FFocusEvent &InFocusEvent) override
 
virtual SLATE_API FReply OnKeyDown (const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent) override
 
virtual SLATE_API bool HasKeyboardFocus () const override
 
SLATE_API TAttribute< NumericType > GetValueAttribute () const
 
SLATE_API NumericType GetValue () const
 
SLATE_API void SetValue (const TAttribute< NumericType > &InValueAttribute, const bool bShouldCommit=false)
 
SLATE_API NumericType GetMinValue () const
 
SLATE_API void SetMinValue (const TAttribute< TOptional< NumericType > > &InMinValue)
 
SLATE_API NumericType GetMaxValue () const
 
SLATE_API void SetMaxValue (const TAttribute< TOptional< NumericType > > &InMaxValue)
 
SLATE_API bool IsMinSliderValueBound () const
 
SLATE_API NumericType GetMinSliderValue () const
 
SLATE_API void SetMinSliderValue (const TAttribute< TOptional< NumericType > > &InMinSliderValue)
 
SLATE_API bool IsMaxSliderValueBound () const
 
SLATE_API NumericType GetMaxSliderValue () const
 
SLATE_API void SetMaxSliderValue (const TAttribute< TOptional< NumericType > > &InMaxSliderValue)
 
SLATE_API int32 GetMinFractionalDigits () const
 
SLATE_API void SetMinFractionalDigits (const TAttribute< TOptional< int32 > > &InMinFractionalDigits)
 
SLATE_API int32 GetMaxFractionalDigits () const
 
SLATE_API void SetMaxFractionalDigits (const TAttribute< TOptional< int32 > > &InMaxFractionalDigits)
 
SLATE_API bool GetAlwaysUsesDeltaSnap () const
 
SLATE_API void SetAlwaysUsesDeltaSnap (bool bNewValue)
 
SLATE_API bool GetEnableSlider () const
 
SLATE_API void SetEnableSlider (bool bNewValue)
 
SLATE_API NumericType GetDelta () const
 
SLATE_API void SetDelta (NumericType InDelta)
 
SLATE_API float GetSliderExponent () const
 
SLATE_API void SetSliderExponent (const TAttribute< float > &InSliderExponent)
 
SLATE_API float GetMinDesiredWidth () const
 
SLATE_API void SetMinDesiredWidth (const TAttribute< float > &InMinDesiredWidth)
 
SLATE_API const FSpinBoxStyleGetWidgetStyle () const
 
SLATE_API void SetWidgetStyle (const FSpinBoxStyle *InStyle)
 
SLATE_API void InvalidateStyle ()
 
SLATE_API void SetTextBlockFont (FSlateFontInfo InFont)
 
SLATE_API void SetTextJustification (ETextJustify::Type InJustification)
 
SLATE_API void SetTextClearKeyboardFocusOnCommit (bool bNewValue)
 
SLATE_API void SetTextRevertTextOnEscape (bool bNewValue)
 
SLATE_API void SetTextSelectAllTextOnCommit (bool bNewValue)
 
SLATE_API void ResetCachedValueString ()
 
- Public Member Functions inherited from SCompoundWidget
const FVector2D GetContentScale () const
 
void SetContentScale (TAttribute< FVector2D > InContentScale)
 
FLinearColor GetColorAndOpacity () const
 
void SetColorAndOpacity (TAttribute< FLinearColor > InColorAndOpacity)
 
void SetForegroundColor (TAttribute< FSlateColor > InForegroundColor)
 
virtual SLATECORE_API FChildrenGetChildren () override
 
virtual SLATECORE_API void OnArrangeChildren (const FGeometry &AllottedGeometry, FArrangedChildren &ArrangedChildren) const override
 
virtual SLATECORE_API FSlateColor GetForegroundColor () const override
 
virtual SLATECORE_API void SetVisibility (TAttribute< EVisibility > InVisibility) override final
 
- 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 OnFocusLost (const FFocusEvent &InFocusEvent)
 
virtual SLATECORE_API void OnFocusChanging (const FWeakWidgetPath &PreviousFocusPath, const FWidgetPath &NewWidgetPath, const FFocusEvent &InFocusEvent)
 
virtual SLATECORE_API FReply OnKeyChar (const FGeometry &MyGeometry, const FCharacterEvent &InCharacterEvent)
 
virtual SLATECORE_API FReply OnPreviewKeyDown (const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent)
 
virtual SLATECORE_API FReply OnKeyUp (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 TOptional< TSharedRef< SWidget > > OnMapCursor (const FCursorReply &CursorReply) const
 
virtual SLATECORE_API FReply OnMouseButtonDoubleClick (const FGeometry &InMyGeometry, const FPointerEvent &InMouseEvent)
 
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 OnDragOver (const FGeometry &MyGeometry, const FDragDropEvent &DragDropEvent)
 
virtual SLATECORE_API FReply OnDrop (const FGeometry &MyGeometry, 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 ()
 
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 bool IsInteractable () 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
 
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 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 Types

enum  ECommitMethod {
  CommittedViaSpin , CommittedViaTypeIn , CommittedViaArrowKey , CommittedViaCode ,
  CommittedViaSpinMultiplier
}
 

Protected Member Functions

SLATE_API void EnterTextMode ()
 
SLATE_API void ExitTextMode ()
 
SLATE_API FString GetValueAsString () const
 
SLATE_API FText GetValueAsText () const
 
SLATE_API FText GetDisplayValue () const
 
SLATE_API void TextField_OnTextChanged (const FText &NewText)
 
SLATE_API void TextField_OnTextCommitted (const FText &NewText, ETextCommit::Type CommitInfo)
 
SLATE_API void CommitValue (NumericType NewValue, double NewSpinValue, ECommitMethod CommitMethod, ETextCommit::Type OriginalCommitInfo, const bool bShouldCommit=false)
 
SLATE_API void NotifyValueCommitted (NumericType CurrentValue) const
 
SLATE_API bool IsInTextMode () const
 
- Protected Member Functions inherited from SCompoundWidget
virtual SLATECORE_API FVector2D ComputeDesiredSize (float) const override
 
TSlateAttributeRef< FVector2DGetContentScaleAttribute () const
 
TSlateAttributeRef< FLinearColorGetColorAndOpacityAttribute () const
 
TSlateAttributeRef< FSlateColorGetForegroundColorAttribute () const
 
SLATECORE_API SCompoundWidget ()
 
virtual SLATECORE_API ~SCompoundWidget ()
 
- Protected Member Functions inherited from SWidget
void SetVolatilePrepass (bool bVolatile)
 
virtual bool CustomPrepass (float LayoutScaleMultiplier)
 
virtual SLATECORE_API void CacheDesiredSize (float InLayoutScaleMultiplier)
 
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 const FSlateBrushGetFocusBrush () const
 
virtual bool ComputeVolatility () 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 ()
 

Static Protected Member Functions

static SLATE_API float Fraction (double InValue, double InMinValue, double InMaxValue)
 
- 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)
 

Additional Inherited Members

- Static Public Member Functions inherited from FSlateControlledConstruction
static const FSlateWidgetClassDataStaticWidgetClass ()
 
- Protected Attributes inherited from SCompoundWidget
FCompoundWidgetOneChildSlot ChildSlot
 
- 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
 

Detailed Description

template<typename NumericType>
class SSpinBox< NumericType >

A Slate SpinBox resembles traditional spin boxes in that it is a widget that provides keyboard-based and mouse-based manipulation of a numeric value. Mouse-based manipulation: drag anywhere on the spinbox to change the value. Keyboard-based manipulation: click on the spinbox to enter text mode.

Member Enumeration Documentation

◆ ECommitMethod

template<typename NumericType >
enum SSpinBox::ECommitMethod
protected

How user changed the value in the spinbox

Enumerator
CommittedViaSpin 
CommittedViaTypeIn 
CommittedViaArrowKey 
CommittedViaCode 
CommittedViaSpinMultiplier 

Constructor & Destructor Documentation

◆ SSpinBox()

template<typename NumericType >
SSpinBox< NumericType >::SSpinBox ( )

The style used to draw this spinbox The value to display The minimum value that can be entered into the text edit box The maximum value that can be entered into the text edit box The minimum value that can be specified by using the slider, defaults to MinValue The maximum value that can be specified by using the slider, defaults to MaxValue The minimum fractional digits the spin box displays, defaults to 1 The maximum fractional digits the spin box displays, defaults to 6 Whether typed values should use delta snapping, defaults to false Whether this spin box should have slider feature enabled, defaults to true Delta to increment the value as the slider moves. If not specified will determine automatically How many pixel the mouse must move to change the value of the delta step Multiplier to use when shift is held down Multiplier to use when ctrl is held down If we're an unbounded spinbox, what value do we divide mouse movement by before multiplying by Delta. Requires Delta to be set. Tell us if we want to support dynamically changing of the max value using alt Tell us if we want to support dynamically changing of the min value using alt Called right after the max slider value is changed (only relevant if SupportDynamicSliderMaxValue is true) Called right after the min slider value is changed (only relevant if SupportDynamicSliderMinValue is true) Use exponential scale for the slider When use exponential scale for the slider which is the neutral value Whether this spin box should have mouse wheel feature enabled, defaults to true True to broadcast every time we type Step to increment or decrement the value by when scrolling the mouse wheel. If not specified will determine automatically Font used to display text in the slider Padding to add around this widget and its internal widgets Called when the value is changed by slider or typing Called when the value is committed (by pressing enter) Called right before the slider begins to move Called right after the slider handle is released by the user Called to allow customization of what text is displayed when not typing. An empty value falls back to the default behavior. Called to allow customization of what text is edited when entering text mode. An empty value falls back to the default behavior. Whether to clear keyboard focus when pressing enter to commit changes Whether to select all text when pressing enter to commit changes Minimum width that a spin box should be How should the value be justified in the spinbox. What keyboard to display. Provide custom type conversion functionality to this spin box If refresh requests for the viewport should happen for all value changes If the text should be reverted when pressing the escape key Menu extender for the right-click context menu

◆ ~SSpinBox()

template<typename NumericType >
SSpinBox< NumericType >::~SSpinBox ( )
virtual

Member Function Documentation

◆ ApplySliderMaxValueChanged()

template<typename NumericType >
void SSpinBox< NumericType >::ApplySliderMaxValueChanged ( float  SliderDeltaToAdd,
bool  UpdateOnlyIfHigher 
)

◆ ApplySliderMinValueChanged()

template<typename NumericType >
void SSpinBox< NumericType >::ApplySliderMinValueChanged ( float  SliderDeltaToAdd,
bool  UpdateOnlyIfLower 
)

◆ CommitValue()

template<typename NumericType >
void SSpinBox< NumericType >::CommitValue ( NumericType  NewValue,
double  NewSpinValue,
ECommitMethod  CommitMethod,
ETextCommit::Type  OriginalCommitInfo,
const bool  bShouldCommit = false 
)
protected

Call this method when the user's interaction has changed the value

Parameters
NewValueValue resulting from the user's interaction
CommitMethodDid the user type in the value or spin to it.
OriginalCommitInfoIf the user typed in the value, information about the source of the commit
bShouldCommitShould the value be committed (despite the CommitMethod parameter)

◆ CommitWithMultiplier()

template<typename NumericType >
const bool SSpinBox< NumericType >::CommitWithMultiplier ( const FPointerEvent MouseEvent)

◆ Construct()

template<typename NumericType >
void SSpinBox< NumericType >::Construct ( const FArguments &  InArgs)

Construct the widget

Parameters
InArgsA declaration from which to construct the widget

◆ DECLARE_DELEGATE_FourParams()

template<typename NumericType >
SSpinBox< NumericType >::DECLARE_DELEGATE_FourParams ( FOnDynamicSliderMinMaxValueChanged  ,
NumericType  ,
TWeakPtr< SWidget ,
bool  ,
bool   
)

Notification when the max/min spinner values are changed (only apply if SupportDynamicSliderMaxValue or SupportDynamicSliderMinValue are true)

◆ DECLARE_DELEGATE_OneParam()

template<typename NumericType >
SSpinBox< NumericType >::DECLARE_DELEGATE_OneParam ( FOnValueChanged  ,
NumericType   
)

Notification for numeric value change

◆ DECLARE_DELEGATE_RetVal_OneParam()

template<typename NumericType >
SSpinBox< NumericType >::DECLARE_DELEGATE_RetVal_OneParam ( TOptional< FText ,
FOnGetDisplayValue  ,
NumericType   
)

Optional customization of the display value based on the current value.

◆ DECLARE_DELEGATE_TwoParams()

template<typename NumericType >
SSpinBox< NumericType >::DECLARE_DELEGATE_TwoParams ( FOnValueCommitted  ,
NumericType  ,
ETextCommit::Type   
)

Notification for numeric value committed

◆ EnterTextMode()

template<typename NumericType >
void SSpinBox< NumericType >::EnterTextMode ( )
protected

Make the spinbox switch to keyboard-based input mode.

◆ ExitTextMode()

template<typename NumericType >
void SSpinBox< NumericType >::ExitTextMode ( )
protected

Make the spinbox switch to mouse-based input mode.

◆ Fraction()

template<typename NumericType >
float SSpinBox< NumericType >::Fraction ( double  InValue,
double  InMinValue,
double  InMaxValue 
)
staticprotected

Calculates range fraction. Possible to use on full numeric range

◆ GetAlwaysUsesDeltaSnap()

template<typename NumericType >
bool SSpinBox< NumericType >::GetAlwaysUsesDeltaSnap ( ) const

See the AlwaysUsesDeltaSnap attribute

◆ GetDelta()

template<typename NumericType >
NumericType SSpinBox< NumericType >::GetDelta ( ) const

See the Delta attribute

◆ GetDisplayValue()

template<typename NumericType >
FText SSpinBox< NumericType >::GetDisplayValue ( ) const
protected
Returns
the value to be displayed when not manually editing text

◆ GetEnableSlider()

template<typename NumericType >
bool SSpinBox< NumericType >::GetEnableSlider ( ) const

See the EnableSlider attribute

◆ GetMaxFractionalDigits()

template<typename NumericType >
int32 SSpinBox< NumericType >::GetMaxFractionalDigits ( ) const

See the MaxFractionalDigits attribute

◆ GetMaxSliderValue()

template<typename NumericType >
NumericType SSpinBox< NumericType >::GetMaxSliderValue ( ) const

◆ GetMaxValue()

template<typename NumericType >
NumericType SSpinBox< NumericType >::GetMaxValue ( ) const

See the MaxValue attribute

◆ GetMinDesiredWidth()

template<typename NumericType >
float SSpinBox< NumericType >::GetMinDesiredWidth ( ) const

See the MinDesiredWidth attribute

◆ GetMinFractionalDigits()

template<typename NumericType >
int32 SSpinBox< NumericType >::GetMinFractionalDigits ( ) const

See the MinFractionalDigits attribute

◆ GetMinSliderValue()

template<typename NumericType >
NumericType SSpinBox< NumericType >::GetMinSliderValue ( ) const

◆ GetMinValue()

template<typename NumericType >
NumericType SSpinBox< NumericType >::GetMinValue ( ) const

See the MinValue attribute

◆ GetSliderExponent()

template<typename NumericType >
float SSpinBox< NumericType >::GetSliderExponent ( ) const

See the SliderExponent attribute

◆ GetValue()

template<typename NumericType >
NumericType SSpinBox< NumericType >::GetValue ( ) const

See the Value attribute

◆ GetValueAsString()

template<typename NumericType >
FString SSpinBox< NumericType >::GetValueAsString ( ) const
protected
Returns
the value being observed by the spinbox as a string

◆ GetValueAsText()

template<typename NumericType >
FText SSpinBox< NumericType >::GetValueAsText ( ) const
protected
Returns
the value being observed by the spinbox as FText - todo: spinbox FText support (reimplement me)

◆ GetValueAttribute()

template<typename NumericType >
TAttribute< NumericType > SSpinBox< NumericType >::GetValueAttribute ( ) const

Return the Value attribute

◆ GetWidgetStyle()

template<typename NumericType >
const FSpinBoxStyle * SSpinBox< NumericType >::GetWidgetStyle ( ) const

◆ HasKeyboardFocus()

template<typename NumericType >
bool SSpinBox< NumericType >::HasKeyboardFocus ( ) const
overridevirtual

Checks to see if this widget currently has the keyboard focus

Returns
True if this widget has keyboard focus

Reimplemented from SWidget.

◆ InvalidateStyle()

template<typename NumericType >
void SSpinBox< NumericType >::InvalidateStyle ( )

◆ IsInTextMode()

template<typename NumericType >
bool SSpinBox< NumericType >::IsInTextMode ( ) const
protected
Returns
true when we are in keyboard-based input mode; false otherwise

◆ IsMaxSliderValueBound()

template<typename NumericType >
bool SSpinBox< NumericType >::IsMaxSliderValueBound ( ) const

See the MaxSliderValue attribute

◆ IsMinSliderValueBound()

template<typename NumericType >
bool SSpinBox< NumericType >::IsMinSliderValueBound ( ) const

See the MinSliderValue attribute

◆ NotifyValueCommitted()

template<typename NumericType >
void SSpinBox< NumericType >::NotifyValueCommitted ( NumericType  CurrentValue) const
protected

◆ OnCursorQuery()

template<typename NumericType >
FCursorReply SSpinBox< NumericType >::OnCursorQuery ( const FGeometry MyGeometry,
const FPointerEvent CursorEvent 
) const
overridevirtual

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.

◆ OnFocusReceived()

template<typename NumericType >
FReply SSpinBox< NumericType >::OnFocusReceived ( const FGeometry MyGeometry,
const FFocusEvent InFocusEvent 
)
overridevirtual

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.

◆ OnKeyDown()

template<typename NumericType >
FReply SSpinBox< NumericType >::OnKeyDown ( const FGeometry MyGeometry,
const FKeyEvent InKeyEvent 
)
overridevirtual

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.

◆ OnMouseButtonDown()

template<typename NumericType >
FReply SSpinBox< NumericType >::OnMouseButtonDown ( const FGeometry MyGeometry,
const FPointerEvent MouseEvent 
)
overridevirtual

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

template<typename NumericType >
FReply SSpinBox< NumericType >::OnMouseButtonUp ( const FGeometry MyGeometry,
const FPointerEvent MouseEvent 
)
overridevirtual

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

template<typename NumericType >
FReply SSpinBox< NumericType >::OnMouseMove ( const FGeometry MyGeometry,
const FPointerEvent MouseEvent 
)
overridevirtual

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.

◆ OnMouseWheel()

template<typename NumericType >
FReply SSpinBox< NumericType >::OnMouseWheel ( const FGeometry MyGeometry,
const FPointerEvent MouseEvent 
)
overridevirtual

Called when the mouse wheel is spun. This event is bubbled.

Parameters
MouseEventMouse event
Returns
Returns whether the event was handled, along with other possible actions

Reimplemented from SWidget.

◆ OnPaint()

template<typename NumericType >
int32 SSpinBox< NumericType >::OnPaint ( const FPaintArgs Args,
const FGeometry AllottedGeometry,
const FSlateRect MyCullingRect,
FSlateWindowElementList OutDrawElements,
int32  LayerId,
const FWidgetStyle InWidgetStyle,
bool  bParentEnabled 
) const
overridevirtual

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.

Reimplemented from SCompoundWidget.

◆ ResetCachedValueString()

template<typename NumericType >
void SSpinBox< NumericType >::ResetCachedValueString ( )

Reset the cached string. Typically used when the value is the same but the display format changed (through the callback).

◆ SetAlwaysUsesDeltaSnap()

template<typename NumericType >
void SSpinBox< NumericType >::SetAlwaysUsesDeltaSnap ( bool  bNewValue)

◆ SetDelta()

template<typename NumericType >
void SSpinBox< NumericType >::SetDelta ( NumericType  InDelta)

◆ SetEnableSlider()

template<typename NumericType >
void SSpinBox< NumericType >::SetEnableSlider ( bool  bNewValue)

◆ SetMaxFractionalDigits()

template<typename NumericType >
void SSpinBox< NumericType >::SetMaxFractionalDigits ( const TAttribute< TOptional< int32 > > &  InMaxFractionalDigits)

◆ SetMaxSliderValue()

template<typename NumericType >
void SSpinBox< NumericType >::SetMaxSliderValue ( const TAttribute< TOptional< NumericType > > &  InMaxSliderValue)

◆ SetMaxValue()

template<typename NumericType >
void SSpinBox< NumericType >::SetMaxValue ( const TAttribute< TOptional< NumericType > > &  InMaxValue)

◆ SetMinDesiredWidth()

template<typename NumericType >
void SSpinBox< NumericType >::SetMinDesiredWidth ( const TAttribute< float > &  InMinDesiredWidth)

◆ SetMinFractionalDigits()

template<typename NumericType >
void SSpinBox< NumericType >::SetMinFractionalDigits ( const TAttribute< TOptional< int32 > > &  InMinFractionalDigits)

◆ SetMinSliderValue()

template<typename NumericType >
void SSpinBox< NumericType >::SetMinSliderValue ( const TAttribute< TOptional< NumericType > > &  InMinSliderValue)

◆ SetMinValue()

template<typename NumericType >
void SSpinBox< NumericType >::SetMinValue ( const TAttribute< TOptional< NumericType > > &  InMinValue)

◆ SetSliderExponent()

template<typename NumericType >
void SSpinBox< NumericType >::SetSliderExponent ( const TAttribute< float > &  InSliderExponent)

◆ SetTextBlockFont()

template<typename NumericType >
void SSpinBox< NumericType >::SetTextBlockFont ( FSlateFontInfo  InFont)

◆ SetTextClearKeyboardFocusOnCommit()

template<typename NumericType >
void SSpinBox< NumericType >::SetTextClearKeyboardFocusOnCommit ( bool  bNewValue)

◆ SetTextJustification()

template<typename NumericType >
void SSpinBox< NumericType >::SetTextJustification ( ETextJustify::Type  InJustification)

◆ SetTextRevertTextOnEscape()

template<typename NumericType >
void SSpinBox< NumericType >::SetTextRevertTextOnEscape ( bool  bNewValue)

◆ SetTextSelectAllTextOnCommit()

template<typename NumericType >
void SSpinBox< NumericType >::SetTextSelectAllTextOnCommit ( bool  bNewValue)

◆ SetValue()

template<typename NumericType >
void SSpinBox< NumericType >::SetValue ( const TAttribute< NumericType > &  InValueAttribute,
const bool  bShouldCommit = false 
)

◆ SetWidgetStyle()

template<typename NumericType >
void SSpinBox< NumericType >::SetWidgetStyle ( const FSpinBoxStyle InStyle)

◆ SLATE_BEGIN_ARGS()

template<typename NumericType >
SSpinBox< NumericType >::SLATE_BEGIN_ARGS ( SSpinBox< NumericType >  )
inline

◆ SupportsKeyboardFocus()

template<typename NumericType >
bool SSpinBox< NumericType >::SupportsKeyboardFocus ( ) const
overridevirtual

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.

◆ TextField_OnTextChanged()

template<typename NumericType >
void SSpinBox< NumericType >::TextField_OnTextChanged ( const FText NewText)
protected

Invoked when the text in the text field changes

Parameters
NewTextThe value of the text in the text field

◆ TextField_OnTextCommitted()

template<typename NumericType >
void SSpinBox< NumericType >::TextField_OnTextCommitted ( const FText NewText,
ETextCommit::Type  CommitInfo 
)
protected

Invoked when the text field commits its text.

Parameters
NewTextThe value of text coming from the editable text field.
CommitInfoInformation about the source of the commit

◆ Tick()

template<typename NumericType >
void SSpinBox< NumericType >::Tick ( const FGeometry AllottedGeometry,
const double  InCurrentTime,
const float  InDeltaTime 
)
virtual

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.


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