Navigation
API > API/Runtime > API/Runtime/UMG > API/Runtime/UMG/Components
Inheritance Hierarchy
- UObject
- UVisual
- UWidget
- UPanelWidget
- UContentWidget
- UCheckBox
References
| Module | UMG |
| Header | /Engine/Source/Runtime/UMG/Public/Components/CheckBox.h |
| Include | #include "Components/CheckBox.h" |
Syntax
UCLASS (MinimalAPI)
class UCheckBox : public UContentWidget
Remarks
The checkbox widget allows you to display a toggled state of 'unchecked', 'checked' and 'indeterminable. You can use the checkbox for a classic checkbox, or as a toggle button, or as radio buttons.
- Single Child
- Toggle
Variables
| Type | Name | Description | |
|---|---|---|---|
| ECheckBoxState | CheckedState | Whether the check box is currently in a checked state | |
| FGetCheckBoxState | CheckedStateDelegate | A bindable delegate for the IsChecked. | |
| TEnumAsByte< EButtonClickMethod::Type > | ClickMethod | The type of mouse action required by the user to trigger the buttons 'Click' | |
| TEnumAsByte< EHorizontalAlignment > | HorizontalAlignment | How the content of the toggle button should align within the given space | |
| bool | IsFocusable | Sometimes a button should only be mouse-clickable and never keyboard focusable. | |
| PRAGMA_DISABLE_DEPRECATION_WARNINGS ECheckBoxState | K2_Cache_CheckedState | ||
| TSharedPtr< SCheckBox > | MyCheckbox | ||
| FOnCheckBoxComponentStateChanged | OnCheckStateChanged | Called when the checked state has changed | |
| TEnumAsByte< EButtonPressMethod::Type > | PressMethod | The type of keyboard/gamepad button press action required by the user to trigger the buttons 'Click' | |
| TEnumAsByte< EButtonTouchMethod::Type > | TouchMethod | The type of touch action required by the user to trigger the buttons 'Click' | |
| FCheckBoxStyle | WidgetStyle | The checkbox bar style |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UCheckBox
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| ECheckBoxState | Returns the full current checked state. | ||
| EButtonClickMethod::Type | Returns the click method. | ||
| bool | Is the checkbox focusable. | ||
| EButtonPressMethod::Type | Returns the press method. | ||
| EButtonTouchMethod::Type | Returns the touch method. | ||
| const FCheckBoxStyle & | Returns the local style. | ||
| void | InitCheckedStateDelegate
(
FGetCheckBoxState InCheckedStateDelegate |
||
| void | InitIsFocusable
(
bool InIsFocusable |
Initialize IsFocusable in the constructor before the SWidget is constructed. | |
| bool | IsChecked () |
Returns true if the checkbox is currently checked | |
| bool | IsPressed () |
Returns true if this button is currently pressed | |
| ECheckBoxState | |||
| void | SetCheckedState
(
ECheckBoxState InCheckedState |
Sets the checked state. | |
| void | SetClickMethod
(
EButtonClickMethod::Type InClickMethod |
Sets the click method. | |
| void | SetIsChecked
(
bool InIsChecked |
Sets the checked state. | |
| void | SetPressMethod
(
EButtonPressMethod::Type InPressMethod |
Sets the press method. | |
| void | SetTouchMethod
(
EButtonTouchMethod::Type InTouchMethod |
Sets the touch method. | |
| void | SetWidgetStyle
(
const FCheckBoxStyle& InStyle |
Sets the style. | |
| void | SlateOnCheckStateChangedCallback
(
ECheckBoxState NewState |
Overridden from UPanelWidget
| Type | Name | Description | |
|---|---|---|---|
| void | OnSlotAdded
(
UPanelSlot* Slot |
UPanelWidget. | |
| void | OnSlotRemoved
(
UPanelSlot* Slot |
Overridden from UWidget
| Type | Name | Description | |
|---|---|---|---|
| const FText | Gets the palette category of the widget | ||
| TSharedRef< SWidget > | RebuildDesignWidget
(
TSharedRef< SWidget > Content |
||
| TSharedRef< SWidget > | Function implemented by all subclasses of UWidget is called when the underlying SWidget needs to be constructed. | ||
| void | Applies all properties to the native widget if possible. |
Overridden from UVisual
| Type | Name | Description | |
|---|---|---|---|
| void | ReleaseSlateResources
(
bool bReleaseChildren |