SLATE_BEGIN_ARGS(SSpinBox<NumericType>)
: _Style(&FCoreStyle::Get().GetWidgetStyle<FSpinBoxStyle>("SpinBox"))
, _Value(0)
, _MinFractionalDigits(DefaultMinFractionalDigits)
, _MaxFractionalDigits(DefaultMaxFractionalDigits)
, _AlwaysUsesDeltaSnap(false)
, _EnableSlider(true)
, _Delta(0)
, _ShiftMultiplier(10.f)
, _CtrlMultiplier(0.1f)
, _SupportDynamicSliderMaxValue(false)
, _SupportDynamicSliderMinValue(false)
, _SliderExponent(1.f)
, _EnableWheel(true)
, _BroadcastValueChangesPerKey(false)
, _Font(FCoreStyle::Get().GetFontStyle(TEXT("NormalFont")))
, _ContentPadding(FMargin(2.0f, 1.0f))
, _OnValueChanged()
, _OnValueCommitted()
, _ClearKeyboardFocusOnCommit(false)
, _SelectAllTextOnCommit(true)
, _MinDesiredWidth(0.0f)
{}
/** The style used to draw this spinbox */
SLATE_STYLE_ARGUMENT(FSpinBoxStyle, Style)
/** The value to display */
SLATE_ATTRIBUTE(NumericType, Value)
/** The minimum value that can be entered into the text edit box */
SLATE_ATTRIBUTE(TOptional< NumericType >, MinValue)
/** The maximum value that can be entered into the text edit box */
SLATE_ATTRIBUTE(TOptional< NumericType >, MaxValue)
/** The minimum value that can be specified by using the slider, defaults to MinValue */
SLATE_ATTRIBUTE(TOptional< NumericType >, MinSliderValue)
/** The maximum value that can be specified by using the slider, defaults to MaxValue */
SLATE_ATTRIBUTE(TOptional< NumericType >, MaxSliderValue)
/** The minimum fractional digits the spin box displays, defaults to 1 */
SLATE_ATTRIBUTE(TOptional< int32 >, MinFractionalDigits)
/** The maximum fractional digits the spin box displays, defaults to 6 */
SLATE_ATTRIBUTE(TOptional< int32 >, MaxFractionalDigits)
/** Whether typed values should use delta snapping, defaults to false */
SLATE_ATTRIBUTE(bool, AlwaysUsesDeltaSnap)
/** Whether this spin box should have slider feature enabled, defaults to true */
SLATE_ATTRIBUTE(bool, EnableSlider)
/** Delta to increment the value as the slider moves. If not specified will determine automatically */
SLATE_ATTRIBUTE(NumericType, Delta)
/** How many pixel the mouse must move to change the value of the delta step */
SLATE_ATTRIBUTE_DEPRECATED(int32, ShiftMouseMovePixelPerDelta, 5.4, "Shift Mouse Move Pixel Per Delta is deprecated and incrementing by a fixed delta per pixel is no longer supported. Please use ShiftMultiplier and CtrlMultiplier which will multiply the step per mouse move")
/** Multiplier to use when shift is held down */
SLATE_ATTRIBUTE(float, ShiftMultiplier)
/** Multiplier to use when ctrl is held down */
SLATE_ATTRIBUTE(float, CtrlMultiplier)
/** If we're an unbounded spinbox, what value do we divide mouse movement by before multiplying by Delta. Requires Delta to be set. */
SLATE_ATTRIBUTE(int32, LinearDeltaSensitivity)
/** Tell us if we want to support dynamically changing of the max value using alt */
SLATE_ATTRIBUTE(bool, SupportDynamicSliderMaxValue)
/** Tell us if we want to support dynamically changing of the min value using alt */
SLATE_ATTRIBUTE(bool, SupportDynamicSliderMinValue)
/** Called right after the max slider value is changed (only relevant if SupportDynamicSliderMaxValue is true) */
SLATE_EVENT(FOnDynamicSliderMinMaxValueChanged, OnDynamicSliderMaxValueChanged)
/** Called right after the min slider value is changed (only relevant if SupportDynamicSliderMinValue is true) */
SLATE_EVENT(FOnDynamicSliderMinMaxValueChanged, OnDynamicSliderMinValueChanged)
/** Use exponential scale for the slider */
SLATE_ATTRIBUTE(float, SliderExponent)
/** When use exponential scale for the slider which is the neutral value */
SLATE_ATTRIBUTE(NumericType, SliderExponentNeutralValue)
/** Whether this spin box should have mouse wheel feature enabled, defaults to true */
SLATE_ARGUMENT(bool, EnableWheel)
/** True to broadcast every time we type */
SLATE_ARGUMENT(bool, BroadcastValueChangesPerKey)
/** Step to increment or decrement the value by when scrolling the mouse wheel. If not specified will determine automatically */
SLATE_ATTRIBUTE(TOptional< NumericType >, WheelStep)
/** Font used to display text in the slider */
SLATE_ATTRIBUTE(FSlateFontInfo, Font)
/** Padding to add around this widget and its internal widgets */
SLATE_ATTRIBUTE(FMargin, ContentPadding)
/** Called when the value is changed by slider or typing */
SLATE_EVENT(FOnValueChanged, OnValueChanged)
/** Called when the value is committed (by pressing enter) */
SLATE_EVENT(FOnValueCommitted, OnValueCommitted)
/** Called right before the slider begins to move */
SLATE_EVENT(FSimpleDelegate, OnBeginSliderMovement)
/** Called right after the slider handle is released by the user */
SLATE_EVENT(FOnValueChanged, OnEndSliderMovement)
/** Whether to clear keyboard focus when pressing enter to commit changes */
SLATE_ATTRIBUTE(bool, ClearKeyboardFocusOnCommit)
/** Whether to select all text when pressing enter to commit changes */
SLATE_ATTRIBUTE(bool, SelectAllTextOnCommit)
/** Minimum width that a spin box should be */
SLATE_ATTRIBUTE(float, MinDesiredWidth)
/** How should the value be justified in the spinbox. */
SLATE_ATTRIBUTE(ETextJustify::Type, Justification)
/** What keyboard to display. */
SLATE_ATTRIBUTE(EKeyboardType, KeyboardType)
/** Provide custom type conversion functionality to this spin box */
SLATE_ARGUMENT(TSharedPtr< INumericTypeInterface<NumericType> >, TypeInterface)
/** If refresh requests for the viewport should happen for all value changes **/
SLATE_ARGUMENT(bool, PreventThrottling)
/** Menu extender for the right-click context menu */
SLATE_EVENT(FMenuExtensionDelegate, ContextMenuExtender)
SLATE_END_ARGS()