Navigation
API > API/Runtime > API/Runtime/AppFramework
Class for placing a color picker. If all you need is a standalone color picker, use the functions OpenColorPicker and DestroyColorPicker, since they hold a static instance of the color picker.
| Name | SColorPicker |
| Type | class |
| Header File | /Engine/Source/Runtime/AppFramework/Public/Widgets/Colors/SColorPicker.h |
| Include Path | #include "Widgets/Colors/SColorPicker.h" |
Syntax
class SColorPicker : public SCompoundWidget
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → SWidget → SCompoundWidget → SColorPicker
- FSlateControlledConstruction → SWidget → SCompoundWidget → SColorPicker
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~SColorPicker() |
Destructor. | Widgets/Colors/SColorPicker.h |
Structs
| Name | Remarks |
|---|---|
| FArguments |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FOnColorPickerCreationOverride | TBaseDelegate_OneParam< void, const TSharedRef< SColorPicker > & > | Delegate to override color picker creation behavior | Widgets/Colors/SColorPicker.h |
| FOnColorPickerDestructionOverride | TBaseDelegate_NoParams< void > | Delegate to override color picker destruction behavior | Widgets/Colors/SColorPicker.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| DEFAULT_WINDOW_SIZE | const FVector2D | A default window size for the color picker which looks nice | Widgets/Colors/SColorPicker.h |
| MAX_ALLOWED_UPDATE_TIME | const double | The max time allowed for updating before we shut off auto-updating | Widgets/Colors/SColorPicker.h |
| OnColorPickerDestroyOverride | FOnColorPickerDestructionOverride | Widgets/Colors/SColorPicker.h | |
| OnColorPickerNonModalCreateOverride | FOnColorPickerCreationOverride | Widgets/Colors/SColorPicker.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bClampValue | bool | The current display gamma used to correct colors picked from the display. | Widgets/Colors/SColorPicker.h | |
| bClosedViaOkOrCancel | bool | True if the picker was closed via the OK or Cancel buttons, false otherwise | Widgets/Colors/SColorPicker.h | |
| bColorPickerCreationIsOverridden | bool | True if something has overridden the color picker's creation behavior | Widgets/Colors/SColorPicker.h | |
| bColorPickerIsInlineVersion | bool | True if this color picker is an inline color picker | Widgets/Colors/SColorPicker.h | |
| bIsInteractive | bool | Tracks whether the user is moving a value spin box, the color wheel and the dropper | Widgets/Colors/SColorPicker.h | |
| bIsThemePanelVisible | bool | Whether or not the color themes panel is visible or collapsed | Widgets/Colors/SColorPicker.h | |
| bOnlyRefreshOnMouseUp | bool | Prevents immediate refresh for performance reasons. | Widgets/Colors/SColorPicker.h | |
| bOnlyRefreshOnOk | bool | Prevents multiple refreshes when requested. | Widgets/Colors/SColorPicker.h | |
| bPerfIsTooSlowToUpdate | bool | If true, then the performance is too bad to have auto-updating | Widgets/Colors/SColorPicker.h | |
| bUseAlpha | TAttribute< bool > | Whether or not the color uses Alpha or not | Widgets/Colors/SColorPicker.h | |
| bUseSRGB | bool | Whether or not to display color as sRGB | Widgets/Colors/SColorPicker.h | |
| bValidCreationOverrideExists | bool | Is true if the color picker creation behavior can be overridden | Widgets/Colors/SColorPicker.h | |
| ColorBegin | FLinearColor | Color start point to animate from | Widgets/Colors/SColorPicker.h | |
| ColorEnd | FLinearColor | Color end point to animate to | Widgets/Colors/SColorPicker.h | |
| ColorWheel | TSharedPtr< SColorWheel > | The Color Wheel widget embedded in this picker | Widgets/Colors/SColorPicker.h | |
| ColorWheelBrush | TAttribute< const FSlateBrush * > | The brush used as Color wheel as a TAttribute | Widgets/Colors/SColorPicker.h | |
| CurrentColorHSV | FLinearColor | The current color being picked in HSV | Widgets/Colors/SColorPicker.h | |
| CurrentColorRGB | FLinearColor | The current color being picked in RGB | Widgets/Colors/SColorPicker.h | |
| CurrentMode | EColorPickerModes | Holds the color picker's mode. | Widgets/Colors/SColorPicker.h | |
| CurrentThemeBar | TSharedPtr< SThemeColorBlocksBar > | The widget which holds the currently selected theme | Widgets/Colors/SColorPicker.h | |
| CurrentTime | float | Time, used for color animation | Widgets/Colors/SColorPicker.h | |
| DisplayGamma | TAttribute< float > | Sets the display Gamma setting - used to correct colors sampled from the screen | Widgets/Colors/SColorPicker.h | |
| HexMode | EColorPickerHexMode | Holds the color picker's hex mode. | Widgets/Colors/SColorPicker.h | |
| NewColorPreviewImageVisibility | EVisibility | Visibility of the new color preview button image (visible when hovered) | Widgets/Colors/SColorPicker.h | |
| OldColor | FLinearColor | The old color to be changed in HSV | Widgets/Colors/SColorPicker.h | |
| OldColorPreviewImageVisibility | EVisibility | Visibility of the old color preview button image (visible when hovered) | Widgets/Colors/SColorPicker.h | |
| OnColorCommitted | FOnLinearColorValueChanged | Invoked when a new value is selected on the color wheel | Widgets/Colors/SColorPicker.h | |
| OnColorPickerCancelled | FOnColorPickerCancelled | Invoked when the color picker cancel button is pressed | Widgets/Colors/SColorPicker.h | |
| OnColorPickerWindowClosed | FOnWindowClosed | Invoked when the color picker window closes. | Widgets/Colors/SColorPicker.h | |
| OnInteractivePickBegin | FSimpleDelegate | Invoked when a slider drag, color wheel drag or dropper grab starts | Widgets/Colors/SColorPicker.h | |
| OnInteractivePickEnd | FSimpleDelegate | Invoked when a slider drag, color wheel drag or dropper grab finishes | Widgets/Colors/SColorPicker.h | |
| OptionalOwningDetailsView | TWeakPtr< SWidget > | Allows a details view to own the color picker so refreshing another details view doesn't close it | Widgets/Colors/SColorPicker.h | |
| ParentWindowPtr | TWeakPtr< SWindow > | Pointer to the parent window, so we know to destroy it when done | Widgets/Colors/SColorPicker.h | |
| TargetColorAttribute | TAttribute< FLinearColor > | The color that is being targeted as a TAttribute | Widgets/Colors/SColorPicker.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Construct
(
const FArguments& InArgs |
Construct the widget | Widgets/Colors/SColorPicker.h | |
TSharedPtr< SWidget > GetOptionalOwningDetailsView() |
Gets the (optionally set) owning details view of the current color picker | Widgets/Colors/SColorPicker.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool ApplyNewTargetColor
(
bool bForceUpdate |
Widgets/Colors/SColorPicker.h | ||
void BackupColors() |
Backup all the colors that are being modified | Widgets/Colors/SColorPicker.h | |
void BeginAnimation
(
FLinearColor Start, |
Widgets/Colors/SColorPicker.h | ||
void CycleMode() |
Cycles the color picker's mode. | Widgets/Colors/SColorPicker.h | |
void DiscardColor() |
Calls the user defined delegate for when the color changes are discarded | Widgets/Colors/SColorPicker.h | |
void GenerateDefaultColorPickerContent
(
bool bAdvancedSectionExpanded |
Widgets/Colors/SColorPicker.h | ||
void GenerateInlineColorPickerContent() |
Widgets/Colors/SColorPicker.h | ||
FLinearColor GetCurrentColor() |
Widgets/Colors/SColorPicker.h | ||
void HideSmallTrash() |
Widgets/Colors/SColorPicker.h | ||
TSharedRef< SWidget > MakeColorPreviewBox() |
Creates the color preview box widget. | Widgets/Colors/SColorPicker.h | |
TSharedRef< SWidget > MakeColorSlider
(
EColorPickerChannels Channel |
Creates a color slider widget for the specified channel. | Widgets/Colors/SColorPicker.h | |
TSharedRef< SWidget > MakeColorSpinBox
(
EColorPickerChannels Channel |
Creates a color spin box widget for the specified channel. | Widgets/Colors/SColorPicker.h | |
bool SetNewTargetColorHSV
(
const FLinearColor& NewValue, |
Widgets/Colors/SColorPicker.h | ||
bool SetNewTargetColorRGB
(
const FLinearColor& NewValue, |
Sets new color in ether RGB or HSV | Widgets/Colors/SColorPicker.h | |
void ShowSmallTrash() |
Widgets/Colors/SColorPicker.h | ||
void UpdateColorPick() |
Widgets/Colors/SColorPicker.h | ||
void UpdateColorPickMouseUp() |
Widgets/Colors/SColorPicker.h |