Navigation
API > API/Runtime > API/Runtime/Slate > API/Runtime/Slate/Widgets > API/Runtime/Slate/Widgets/Input
Inheritance Hierarchy
- FSlateControlledConstruction
- TSharedFromThis
- SWidget
- SCompoundWidget
- SCheckBox
- SBasicFilterBar::SFilterCheckBox
- SNiagaraSourceFilterCheckBox
References
| Module | Slate |
| Header | /Engine/Source/Runtime/Slate/Public/Widgets/Input/SCheckBox.h |
| Include | #include "Widgets/Input/SCheckBox.h" |
Syntax
class SCheckBox : public SCompoundWidget
Remarks
Check box Slate control
Variables
| Type | Name | Description | |
|---|---|---|---|
| const FSlateBrush * | BackgroundHoveredImage | Image to use for the checkbox background when hovered | |
| const FSlateBrush * | BackgroundImage | Image to use for the checkbox background | |
| const FSlateBrush * | BackgroundPressedImage | Image to use for the checkbox background when pressed | |
| bool | bCheckBoxContentUsesAutoWidth | Whether or not the checkbox content is arranged using auto-width when in checkbox mode. | |
| bool | bIsFocusable | When true, this checkbox will be keyboard focusable. Defaults to true. | |
| bool | bIsPressed | True if this check box is currently in a pressed state | |
| TAttribute< FSlateColor > | BorderBackgroundColorOverride | Overrides border background color in the widget style, if set | |
| TOptional< ESlateCheckBoxType::Type > | CheckBoxTypeOverride | Overrides checkbox type in the widget style, if set | |
| const FSlateBrush * | CheckedHoveredImage | Image to use when the checkbox is checked and hovered | |
| const FSlateBrush * | CheckedImage | Image to use when the checkbox is checked | |
| const FSlateBrush * | CheckedPressedImage | Image to use when the checkbox is checked and pressed | |
| FSlateSound | CheckedSound | The Sound to play when the check box is checked | |
| EButtonClickMethod::Type | ClickMethod | Sets whether a click should be triggered on mouse down, mouse up, or that both a mouse down and up are required. | |
| TSharedPtr< SBorder > | ContentContainer | When in toggle button mode, this will hold the pointer to the toggle button's border | |
| TAttribute< FSlateColor > | ForegroundColorOverride | Overrides foreground color in the widget style, if set | |
| EHorizontalAlignment | HorizontalAlignment | Horiz align setting if in togglebox mode | |
| FSlateSound | HoveredSound | The Sound to play when the check box is hovered | |
| TAttribute< ECheckBoxState > | IsCheckboxChecked | Are we checked | |
| FOnCheckStateChanged | OnCheckStateChanged | Delegate called when the check box changes state | |
| FOnGetContent | OnGetMenuContent | Delegate to execute to get the menu content of this button | |
| TAttribute< FMargin > | PaddingOverride | Overrides padding in the widget style, if set | |
| TEnumAsByte< EButtonPressMethod::Type > | PressMethod | How should the button be clicked with keyboard/controller button events? | |
| const FCheckBoxStyle * | Style | ||
| TEnumAsByte< EButtonTouchMethod::Type > | TouchMethod | How should the button be clicked with touch events? | |
| const FSlateBrush * | UncheckedHoveredImage | Image to use when the checkbox is unchecked and hovered | |
| const FSlateBrush * | UncheckedImage | Image to use when the checkbox is unchecked | |
| const FSlateBrush * | UncheckedPressedImage | Image to use when the checkbox is unchecked and pressed | |
| FSlateSound | UncheckedSound | The Sound to play when the check box is unchecked | |
| const FSlateBrush * | UndeterminedHoveredImage | Image to use when the checkbox is in an ambiguous state and hovered | |
| const FSlateBrush * | UndeterminedImage | Image to use when the checkbox is in an ambiguous state | |
| const FSlateBrush * | UndeterminedPressedImage | Image to use when the checkbox is in an ambiguous state and pressed |
Constructors
| Type | Name | Description | |
|---|---|---|---|
SCheckBox () |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | BuildCheckBox
(
TSharedRef< SWidget > InContent |
Rebuilds the checkbox based on the current ESlateCheckBoxType | |
| void | Construct
(
const FArguments& InArgs |
Construct this widget | |
| const FSlateBrush * | |||
| const FSlateBrush * | |||
| const FSlateBrush * | |||
| const FSlateBrush * | |||
| const FSlateBrush * | |||
| const FSlateBrush * | |||
| ECheckBoxState | |||
| TEnumAsByte< EButtonClickMethod::Type > | GetClickMethodFromInputType
(
const FPointerEvent& MouseEvent |
Utility function to translate other input click methods to regular ones. | |
| const FSlateBrush * | |||
| const FSlateBrush * | |||
| const FSlateBrush * | |||
| const FSlateBrush * | |||
| const FSlateBrush * | |||
| const FSlateBrush * | |||
| bool | IsChecked () |
Returns true if the checkbox is currently checked | |
| bool | IsPreciseTapOrClick
(
const FPointerEvent& MouseEvent |
Utility function to determine if the incoming mouse event is for a precise tap or click | |
| bool | IsPressed () |
Returns true if this button is currently pressed | |
| const FSlateBrush * | Attribute getter for the background image | ||
| FSlateColor | Attribute getter for the border background color | ||
| ESlateCheckBoxType::Type | Attribute getter for the checkbox type | ||
| const FSlateBrush * | Gets the check image to display for the current state of the check box | ||
| FMargin | OnGetPadding () |
Attribute getter for the padding | |
| void | Play the checked sound | ||
| void | Play the hovered sound | ||
| void | Play the unchecked sound | ||
| void | SetCheckedHoveredImage
(
const FSlateBrush* Brush |
See the CheckedHoveredImage attribute | |
| void | SetCheckedImage
(
const FSlateBrush* Brush |
See the CheckedImage attribute | |
| void | SetCheckedPressedImage
(
const FSlateBrush* Brush |
See the CheckedPressedImage attribute | |
| void | SetClickMethod
(
EButtonClickMethod::Type InClickMethod |
||
| void | SetContent
(
const TSharedRef< SWidget >& InContent |
See the Content slot | |
| void | SetIsChecked
(
TAttribute< ECheckBoxState > InIsChecked |
See the IsChecked attribute | |
| void | SetPressMethod
(
EButtonPressMethod::Type InPressMethod |
||
| void | SetStyle
(
const FCheckBoxStyle* InStyle |
See the Style attribute | |
| void | SetTouchMethod
(
EButtonTouchMethod::Type InTouchMethod |
||
| void | SetUncheckedHoveredImage
(
const FSlateBrush* Brush |
See the UncheckedHoveredImage attribute | |
| void | SetUncheckedImage
(
const FSlateBrush* Brush |
See the UncheckedImage attribute | |
| void | SetUncheckedPressedImage
(
const FSlateBrush* Brush |
See the UncheckedPressedImage attribute | |
| void | SetUndeterminedHoveredImage
(
const FSlateBrush* Brush |
See the UndeterminedHoveredImage attribute | |
| void | SetUndeterminedImage
(
const FSlateBrush* Brush |
See the UndeterminedImage attribute | |
| void | SetUndeterminedPressedImage
(
const FSlateBrush* Brush |
See the UndeterminedPressedImage attribute | |
| void | Toggles the checked state for this check box, fire events as needed |
Overridden from SWidget
| Type | Name | Description | |
|---|---|---|---|
| TSharedRef< FSlateAccessibleWidget > | |||
| FSlateColor | |||
| bool | |||
| FReply | Called after a key is pressed when this widget has focus (this event bubbles if not handled) | ||
| FReply | Called after a key is released when this widget has focus | ||
| FReply | OnMouseButtonDoubleClick
(
const FGeometry& InMyGeometry, |
See SWidget::OnMouseButtonDoubleClick. | |
| FReply | OnMouseButtonDown
(
const FGeometry& MyGeometry, |
See SWidget::OnMouseButtonDown. | |
| FReply | OnMouseButtonUp
(
const FGeometry& MyGeometry, |
See SWidget::OnMouseButtonUp. | |
| void | OnMouseEnter
(
const FGeometry& MyGeometry, |
The system will use this event to notify a widget that the cursor has entered it. | |
| void | OnMouseLeave
(
const FPointerEvent& MouseEvent |
The system will use this event to notify a widget that the cursor has left it. | |
| bool | See SWidget::SupportsKeyboardFocus(). |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FArguments |