Navigation
API > API/Runtime > API/Runtime/Slate
Implementation for a box that only accepts a numeric value or that can display an undetermined value via a string Supports an optional spin box for manipulating a value by dragging with the mouse Supports an optional label inset in the text box
| Name | SNumericEntryBox |
| Type | class |
| Header File | /Engine/Source/Runtime/Slate/Public/Widgets/Input/SNumericEntryBox.h |
| Include Path | #include "Widgets/Input/SNumericEntryBox.h" |
Syntax
template<typename NumericType>
class SNumericEntryBox : public SCompoundWidget
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → SWidget → SCompoundWidget → SNumericEntryBox
- FSlateControlledConstruction → SWidget → SCompoundWidget → SNumericEntryBox
- SNumericEntryBox
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
SNumericEntryBox() |
Widgets/Input/SNumericEntryBox.h |
Structs
| Name | Remarks |
|---|---|
| FArguments |
Enums
Public
| Name | Remarks |
|---|---|
| ELabelLocation |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FOnDynamicSliderMinMaxValueChanged | TBaseDelegate_FourParams< void, NumericType, TWeakPtr< SWidget >, bool, bool > | Notification when the max/min spinner values are changed (only apply if SupportDynamicSliderMaxValue or SupportDynamicSliderMinValue are true) | Widgets/Input/SNumericEntryBox.h |
| FOnUndeterminedValueChanged | TBaseDelegate_OneParam< void, FText > | Notification for change of undetermined values | Widgets/Input/SNumericEntryBox.h |
| FOnUndeterminedValueCommitted | TBaseDelegate_TwoParams< void, FText, ETextCommit::Type > | Notification for committing undetermined values | Widgets/Input/SNumericEntryBox.h |
| FOnValueChanged | TBaseDelegate_OneParam< void, NumericType > | Notification for numeric value change | Widgets/Input/SNumericEntryBox.h |
| FOnValueCommitted | TBaseDelegate_TwoParams< void, NumericType, ETextCommit::Type > | Notification for numeric value committed | Widgets/Input/SNumericEntryBox.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| BlueLabelBackgroundColor | const FLinearColor | Widgets/Input/SNumericEntryBox.h | |
| DefaultMaxFractionalDigits | const int32 | The default maximum fractional digits | Widgets/Input/SNumericEntryBox.h |
| DefaultMinFractionalDigits | const int32 | The default minimum fractional digits | Widgets/Input/SNumericEntryBox.h |
| DefaultUndeterminedString | const FText | Widgets/Input/SNumericEntryBox.h | |
| GreenLabelBackgroundColor | const FLinearColor | Widgets/Input/SNumericEntryBox.h | |
| LilacLabelBackgroundColor | const FLinearColor | Widgets/Input/SNumericEntryBox.h | |
| RedLabelBackgroundColor | const FLinearColor | Widgets/Input/SNumericEntryBox.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bCachedValueStringDirty | bool | Whetever the interfaced setting changed and the CachedValueString needs to be recomputed. | Widgets/Input/SNumericEntryBox.h | |
| BorderImageFocused | const FSlateBrush * | Styling: border image to draw when focused | Widgets/Input/SNumericEntryBox.h | |
| BorderImageHovered | const FSlateBrush * | Styling: border image to draw when hovered | Widgets/Input/SNumericEntryBox.h | |
| BorderImageNormal | const FSlateBrush * | Styling: border image to draw when not hovered or focused | Widgets/Input/SNumericEntryBox.h | |
| CachedExternalValue | TOptional< NumericType > | Cached value of entry box, updated on set & per tick | Widgets/Input/SNumericEntryBox.h | |
| CachedValueString | FString | Used to prevent per-frame re-conversion of the cached numeric value to a string. | Widgets/Input/SNumericEntryBox.h | |
| EditableText | TSharedPtr< SEditableText > | Editable widget | Widgets/Input/SNumericEntryBox.h | |
| Interface | TSharedPtr< INumericTypeInterface< NumericType > > | Type interface that defines how we should deal with the templated numeric type. | Widgets/Input/SNumericEntryBox.h | |
| LabelAttribute | TAttribute< TOptional< FString > > | Attribute for getting the label | Widgets/Input/SNumericEntryBox.h | |
| MaxFractionalDigits | TAttribute< TOptional< int32 > > | Widgets/Input/SNumericEntryBox.h | ||
| MinDesiredValueWidth | TAttribute< float > | Prevents the value portion of the control from being smaller than desired in certain cases. | Widgets/Input/SNumericEntryBox.h | |
| MinFractionalDigits | TAttribute< TOptional< int32 > > | Widgets/Input/SNumericEntryBox.h | ||
| OnUndeterminedValueChanged | FOnUndeterminedValueChanged | Delegate to call when an undetermined value changes | Widgets/Input/SNumericEntryBox.h | |
| OnUndeterminedValueCommitted | FOnUndeterminedValueCommitted | Delegate to call when an undetermined is committed | Widgets/Input/SNumericEntryBox.h | |
| OnValueChanged | FOnValueChanged | Delegate to call when the value changes | Widgets/Input/SNumericEntryBox.h | |
| OnValueCommitted | FOnValueCommitted | Delegate to call when the value is committed | Widgets/Input/SNumericEntryBox.h | |
| SpinBox | TSharedPtr< SSpinBox< NumericType > > | Spinbox widget | Widgets/Input/SNumericEntryBox.h | |
| ToggleCheckBox | TSharedPtr< SCheckBox > | Toggle checkbox | Widgets/Input/SNumericEntryBox.h | |
| ToolTipTextFormat | TAttribute< TOptional< FTextFormat > > | Widgets/Input/SNumericEntryBox.h | ||
| UndeterminedString | FText | The undetermined string to display when needed | Widgets/Input/SNumericEntryBox.h | |
| ValueAttribute | TAttribute< TOptional< NumericType > > | Attribute for getting the value. If the value is not set we display the undetermined string | Widgets/Input/SNumericEntryBox.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Construct
(
const FArguments& InArgs |
Widgets/Input/SNumericEntryBox.h | ||
int32 GetMaxFractionalDigits() |
See the MaxFractionalDigits attribute | Widgets/Input/SNumericEntryBox.h | |
int32 GetMinFractionalDigits() |
See the MinFractionalDigits attribute | Widgets/Input/SNumericEntryBox.h | |
TSharedPtr< SWidget > GetSpinBox() |
Return the internally created SpinBox if bAllowSpin is true | Widgets/Input/SNumericEntryBox.h | |
void SetMaxFractionalDigits
(
const TAttribute< TOptional< int32 > >& InMaxFractionalDigits |
Widgets/Input/SNumericEntryBox.h | ||
void SetMinFractionalDigits
(
const TAttribute< TOptional< int32 > >& InMinFractionalDigits |
Widgets/Input/SNumericEntryBox.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static TSharedRef< SWidget > BuildLabel
(
TAttribute< FText > LabelText, |
Widgets/Input/SNumericEntryBox.h | ||
static TSharedRef< SWidget > BuildNarrowColorLabel
(
FLinearColor LabelColor |
Widgets/Input/SNumericEntryBox.h |