Navigation
API > API/Runtime > API/Runtime/Slate
Implements the color spectrum widget.
| Name | SColorSpectrum |
| Type | class |
| Header File | /Engine/Source/Runtime/Slate/Public/Widgets/Colors/SColorSpectrum.h |
| Include Path | #include "Widgets/Colors/SColorSpectrum.h" |
Syntax
class SColorSpectrum : public SLeafWidget
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → SWidget → SLeafWidget → SColorSpectrum
- FSlateControlledConstruction → SWidget → SLeafWidget → SColorSpectrum
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
SColorSpectrum() |
Widgets/Colors/SColorSpectrum.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~SColorSpectrum() |
Widgets/Colors/SColorSpectrum.h |
Structs
| Name | Remarks |
|---|---|
| FArguments |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bDragging | bool | Whether the user is dragging the slider. | Widgets/Colors/SColorSpectrum.h | |
| CtrlMultiplier | TAttribute< float > | Mouse sensitivity multiplier to use when dragging the selector on the color spectrum, applied when the ctrl modifier key is pressed. | Widgets/Colors/SColorSpectrum.h | |
| Image | const FSlateBrush * | The color spectrum image to show. | Widgets/Colors/SColorSpectrum.h | |
| LastSpectrumPosition | FVector2f | Cached mouse position to restore after dragging. | Widgets/Colors/SColorSpectrum.h | |
| OnMouseCaptureBegin | FSimpleDelegate | Holds a delegate that is executed when the mouse is pressed and a capture begins. | Widgets/Colors/SColorSpectrum.h | |
| OnMouseCaptureEnd | FSimpleDelegate | Holds a delegate that is executed when the mouse is let up and a capture ends. | Widgets/Colors/SColorSpectrum.h | |
| OnValueChanged | FOnLinearColorValueChanged | Holds a delegate that is executed when a new value is selected on the color spectrum. | Widgets/Colors/SColorSpectrum.h | |
| SelectedColor | TSlateAttribute< FLinearColor, EInvalidateWidgetReason::Paint > | The current color selected by the user. | Widgets/Colors/SColorSpectrum.h | |
| SelectorImage | const FSlateBrush * | The color selector image to show. | Widgets/Colors/SColorSpectrum.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Construct
(
const FArguments& InArgs |
Construct this widget. | Widgets/Colors/SColorSpectrum.h | |
virtual int32 OnPaint
(
const FPaintArgs& Args, |
Widgets/Colors/SColorSpectrum.h |
Overridden from SWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FVector2D ComputeDesiredSize
(
float |
Widgets/Colors/SColorSpectrum.h | ||
virtual FCursorReply OnCursorQuery
(
const FGeometry& MyGeometry, |
Widgets/Colors/SColorSpectrum.h | ||
virtual FReply OnMouseButtonDoubleClick
(
const FGeometry& InMyGeometry, |
Widgets/Colors/SColorSpectrum.h | ||
virtual FReply OnMouseButtonDown
(
const FGeometry& MyGeometry, |
Widgets/Colors/SColorSpectrum.h | ||
virtual FReply OnMouseButtonUp
(
const FGeometry& MyGeometry, |
Widgets/Colors/SColorSpectrum.h | ||
virtual FReply OnMouseMove
(
const FGeometry& MyGeometry, |
Widgets/Colors/SColorSpectrum.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FVector2D CalcRelativeSelectedPosition() |
Calculates the position of the color selection indicator. | Widgets/Colors/SColorSpectrum.h | |
void ProcessMouseAction
(
const FGeometry& MyGeometry, |
Performs actions according to mouse click / move | Widgets/Colors/SColorSpectrum.h |