Widget Studio
UWidgetStudioModernComboBox Class Reference

A modern styled combo box. More...

#include <WSModernComboBox.h>

Inheritance diagram for UWidgetStudioModernComboBox:
UWidgetStudioContainer UWidgetStudioBase

Public Member Functions

virtual void SetCurrentIndex (int32 Index, bool bBroadcast) override
 Set the current index. More...
 
FText GetLabel () const
 Returns the label's text.
 
FText GetPlaceholderText () const
 Returns the placeholder's text.
 
ECornerStyle GetCornerStyle () const
 Returns the corner style.
 
EPalette GetBackgroundColor () const
 Returns the background color.
 
EPalette GetContentColor () const
 Returns the content color (Text/Icon).
 
EPalette GetSelectionColor () const
 Returns the selection color.
 
EPalette GetLabelColor () const
 Returns the label color.
 
bool IsSelectable () const
 Are the Combo Box items selectable?
 
void SetLabel (FText NewLabel)
 Sets the label's text. More...
 
void SetPlaceholderText (FText NewText)
 Sets the placeholder's text. More...
 
void SetCornerStyle (ECornerStyle NewStyle)
 Sets the how the corners look. More...
 
void SetBackgroundColor (EPalette NewColor)
 Set the background color. More...
 
void SetContentColor (EPalette NewColor)
 Set the content color. More...
 
void SetSelectionColor (EPalette NewColor)
 Set the selection color. More...
 
void SetLabelColor (EPalette NewColor)
 Set the label color. More...
 
void SetSelectable (bool NewState)
 Set the selectable state of the Combo Box. More...
 
- Public Member Functions inherited from UWidgetStudioContainer
int32 GetCurrentIndex () const
 Return the index of the current selected button.
 
int32 GetOptionCount () const
 Returns the number of options.
 
TArray< FButtonOptionsGetOptions () const
 Returns the options.
 
FButtonOptions GetOptionAtIndex (int32 Index)
 Return the option at the given index.
 
FButtonOptions GetCurrentOption () const
 Get the options of the current button.
 
int32 GetOptionIndexViaText (FText InText)
 Returns the Option Index based on given text. More...
 
void IncrementCurrentIndex (bool bBroadcast=true)
 Increases the current index by 1. More...
 
void DecrementCurrentIndex (bool bBroadcast=true)
 Decreases the current index by 1. More...
 
void ClearCurrentIndex (bool bBroadcast=true)
 Sets the current index to -1. More...
 
virtual void SetOptions (TArray< FButtonOptions > NewOptions)
 Override the options in this container. More...
 
void AddOption (FButtonOptions NewOption)
 Add an option to the container. More...
 
virtual void ClearOptions ()
 Clear all options from the container. More...
 
bool SetCurrentIndexViaOptionText (FText InText, bool bBroadcast=true)
 Finds and sets the current index based on option text. More...
 
- Public Member Functions inherited from UWidgetStudioBase
FVector2D GetDimensions () const
 Returns the current X and Y dimensions of the Widget. More...
 
int32 GetBorderRadius () const
 Returns the current border radius of the Widget. More...
 
void ForceStyleUpdate ()
 Refresh the dynamic styling of the Widget Studio widget.
 
void SetSizeModifier (ESizeModifier InSizeModifier)
 Set the size modifier of the Widget Studio widget.
 

Protected Member Functions

virtual TSharedRef< SWidget > RebuildWidget () override
 
virtual int32 NativePaint (const FPaintArgs &Args, const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle, bool bParentEnabled) const override
 
virtual void SynchronizeProperties () override
 
virtual void InitializeStyling () override
 
virtual void UpdateStyling () override
 
virtual FReply NativeOnMouseButtonDown (const FGeometry &InGeometry, const FPointerEvent &InMouseEvent) override
 
void OnMenuButtonSelected (int32 Index, FButtonOptions Option)
 
UUserWidget * ConstructMenu () const
 
- Protected Member Functions inherited from UWidgetStudioContainer
virtual void ConstructOption (FButtonOptions Option)
 
virtual void IndividualHoverStateChanged (UWidgetStudioBase *CallingWidget, const bool bIsHovering)
 
- Protected Member Functions inherited from UWidgetStudioBase
virtual void NativeOnMouseEnter (const FGeometry &InGeometry, const FPointerEvent &InMouseEvent) override
 
virtual void NativeOnMouseLeave (const FPointerEvent &InMouseEvent) override
 
virtual void NativeOnMouseCaptureLost (const FCaptureLostEvent &CaptureLostEvent) override
 

Protected Attributes

UInvalidationBox * Retainer = nullptr
 
UVerticalBox * VBox = nullptr
 
UWidgetStudioTextLabelItem = nullptr
 
USizeBox * ContentSizeBox = nullptr
 
UScaleBox * ContentScaleBox = nullptr
 
UOverlay * ContentOverlay = nullptr
 
UImage * DropShadow = nullptr
 
UImage * Background = nullptr
 
UHorizontalBox * HBox = nullptr
 
UWidgetStudioIconIconItem = nullptr
 
UWidgetStudioTextTextItem = nullptr
 
UScaleBox * ArrowScaleBox = nullptr
 
UWidgetStudioIconArrowItem = nullptr
 
UMenuAnchor * MenuAnchor = nullptr
 
- Protected Attributes inherited from UWidgetStudioContainer
int32 CurrentIndex = -1
 The current option selected. More...
 
TArray< FButtonOptionsOptions
 The options that will be available.
 

Additional Inherited Members

- Public Attributes inherited from UWidgetStudioContainer
FWSContainerDelegate OnCurrentIndexChanged
 Called when the current index has been changed.
 
FWSContainerHoverDelegate OnIndividualHoverStateChanged
 Called when an individual widget contained in the container's hover state has changed.
 
- Public Attributes inherited from UWidgetStudioBase
FWSBaseHoverStateDelegate OnHoverStateChanged
 Called when the hover state has been changed.
 
bool bCanOverrideDimensions = true
 Used to enable or disable dimension override's.
 
bool bCanOverrideBorderRadius = true
 Used to enable or disable dimension override's.
 
FVector2D MinimumDimensions = FVector2D(50, 7)
 The minimum dimensions of the widget. More...
 
bool bDisablePainting = false
 Used for debugging. More...
 
float AnimationTime = 7
 The animation interpolation speed. More...
 
ESizeModifier SizeModifier = ESizeModifier::Regular
 Quickly modify the overall size of the widget. More...
 
FVector2D OverrideDimensions = FVector2D(0, 0)
 Manually adjust the X and Y dimensions of the widget. More...
 
int32 OverrideBorderRadius = -1
 Manually adjust the border radius of the widget. More...
 

Detailed Description

A modern styled combo box.

Member Function Documentation

◆ InitializeStyling()

void UWidgetStudioModernComboBox::InitializeStyling ( )
overrideprotectedvirtual

Reimplemented from UWidgetStudioBase.

◆ SetBackgroundColor()

void UWidgetStudioModernComboBox::SetBackgroundColor ( EPalette  NewColor)

Set the background color.

Parameters
NewColorThe color to apply to the widgets background.

◆ SetContentColor()

void UWidgetStudioModernComboBox::SetContentColor ( EPalette  NewColor)

Set the content color.

Parameters
NewColorThe color to apply to the widgets content.

◆ SetCornerStyle()

void UWidgetStudioModernComboBox::SetCornerStyle ( ECornerStyle  NewStyle)

Sets the how the corners look.

Parameters
NewStyleThe style to use for the widgets corners.

◆ SetCurrentIndex()

void UWidgetStudioModernComboBox::SetCurrentIndex ( int32  Index,
bool  bBroadcast 
)
overridevirtual

Set the current index.

Parameters
IndexThe index to set the current index to.
bBroadcastWhen true, OnCurrentIndexChanged will be broadcasted.

Reimplemented from UWidgetStudioContainer.

◆ SetLabel()

void UWidgetStudioModernComboBox::SetLabel ( FText  NewLabel)

Sets the label's text.

Parameters
NewLabelThe text to display on the label.

◆ SetLabelColor()

void UWidgetStudioModernComboBox::SetLabelColor ( EPalette  NewColor)

Set the label color.

Parameters
NewColorThe color to apply to the label.

◆ SetPlaceholderText()

void UWidgetStudioModernComboBox::SetPlaceholderText ( FText  NewText)

Sets the placeholder's text.

Parameters
NewTextThe text to display as the placeholder.

◆ SetSelectable()

void UWidgetStudioModernComboBox::SetSelectable ( bool  NewState)

Set the selectable state of the Combo Box.

Parameters
NewStateThe selectivity state.

◆ SetSelectionColor()

void UWidgetStudioModernComboBox::SetSelectionColor ( EPalette  NewColor)

Set the selection color.

Parameters
NewColorThe color to apply to the widget when selected.

◆ SynchronizeProperties()

void UWidgetStudioModernComboBox::SynchronizeProperties ( )
overrideprotectedvirtual

Reimplemented from UWidgetStudioContainer.

◆ UpdateStyling()

void UWidgetStudioModernComboBox::UpdateStyling ( )
overrideprotectedvirtual

Reimplemented from UWidgetStudioBase.


The documentation for this class was generated from the following files: