Widget Studio
UWidgetStudioModernTabBar Class Reference

A modern styled tab bar. More...

#include <WSModernTabBar.h>

Inheritance diagram for UWidgetStudioModernTabBar:
UWidgetStudioContainer UWidgetStudioBase

Public Member Functions

TEnumAsByte< EHorizontalAlignment > GetContentAlignment () const
 Returns the content alignment.
 
FWSTextStyle GetTextOptions () const
 Returns the text style options.
 
FWSIconStyle GetIconOptions () const
 Returns the icon style options.
 
EWSPlacement GetIconPlacement () const
 Returns the icon placement.
 
TEnumAsByte< EOrientation > GetOrientation () const
 Returns the Tab Bar orientation.
 
ECornerStyle GetCornerStyle () const
 Returns the Tab Bar corner style.
 
ETabBarSelectionStyle GetSelectionStyle () const
 Returns the Tab Bar selection style.
 
EPalette GetBackgroundColor () const
 Returns the Tab Bar background color.
 
EPalette GetContentColor () const
 Returns the Tab Bar content color.
 
EPalette GetSelectionColor () const
 Returns the Tab Bar selection color.
 
bool IsSelectable () const
 Returns the Tab Bar checkable state.
 
float IsScrollable () const
 Returns if the Tab Bar is scrollable or not.
 
float GetSizeConstraint () const
 Returns the current size constraint value. More...
 
ESlateVisibility GetScrollbarVisibility () const
 Returns the current scroll bar visibility.
 
virtual void SetCurrentIndex (int32 Index, bool bBroadcast=true) override
 Set the current index. More...
 
void SetOrientation (TEnumAsByte< EOrientation > NewOrientation)
 Set the grow direction. More...
 
void SetCornerStyle (ECornerStyle NewStyle)
 Set how the corner style looks. More...
 
void SetBackgroundColor (EPalette NewColor)
 Set the color of the background. More...
 
void SetContentColor (EPalette NewColor)
 Set the color of the content. More...
 
void SetSelectionColor (EPalette NewColor)
 Set the color of the selection. More...
 
void SetSelectable (bool NewState)
 Set the selectable state. More...
 
void SetScrollable (bool NewState)
 Enable or disable the scrollability of the Tab Bar. More...
 
void SetSizeConstraint (float NewSize)
 Constrains the size of the Tab Bar. More...
 
void SetScrollbarVisibility (ESlateVisibility NewVisibility)
 Set the scroll visibility of the scroll bar. More...
 
void SetContentAlignment (TEnumAsByte< EHorizontalAlignment > NewAlignment)
 Set the alignment of the content. More...
 
void SetTextOptions (FWSTextStyle NewTextOptions)
 Set the text styling options. More...
 
void SetIconOptions (FWSIconStyle NewIconOptions)
 Set the icon styling options. More...
 
void SetIconPlacement (EWSPlacement NewIconPlacement)
 Set the icon placement in conjunction to the text. 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...
 
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 void ConstructOption (FButtonOptions Option) override
 
virtual void ClearOptions () override
 Clear all options from the container. More...
 
virtual void ConstructButtonGroup ()
 
void UpdateIndexFromButtonGroup (int32 NewIndex)
 
- Protected Member Functions inherited from UWidgetStudioContainer
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
 
USizeBox * SizeBox = nullptr
 
UWSScrollBoxScrollBox = nullptr
 
UOverlay * Overlay = nullptr
 
UWidgetStudioButtonGroupButtonGroup = nullptr
 
UScaleBox * BackgroundScaleBox = nullptr
 
UOverlay * BackgroundOverlay = nullptr
 
UImage * BackgroundDropShadow = nullptr
 
UImage * Background = nullptr
 
USizeBox * SelectionOverlaySize = nullptr
 
UImage * SelectionOverlay = nullptr
 
UUniformGridPanel * Grid = nullptr
 
TEnumAsByte< EHorizontalAlignment > ContentAlignment
 How the content should be horizontally aligned.
 
TEnumAsByte< EOrientation > Orientation = Orient_Horizontal
 The direction to grow the bar. More...
 
FWSTextStyle TextStyle
 The text styling options for the container. More...
 
EWSPlacement IconPlacement
 Where the icons should be placed in conjunction with the text. More...
 
FWSIconStyle IconStyle
 The icon styling options for the container.
 
bool bEnableScrolling = false
 When enabled, the Tab Bar will be scrollable. More...
 
float SizeConstraint = 0.f
 Constrains the size of the Tab Bar. More...
 
ESlateVisibility ScrollBarVisibility = ESlateVisibility::Visible
 Set the scroll visibility of the scroll bar.
 
bool bEnableDropShadow = true
 Enables the drop shadow effect when hovered.
 
ECornerStyle CornerStyle = ECornerStyle::Rounded
 How the corners of the button will appear visually.
 
ETabBarSelectionStyle SelectionStyle = ETabBarSelectionStyle::Full
 The style of the selection indicator.
 
EPalette BackgroundColor = EPalette::TertiaryBackground
 The color of the background.
 
EPalette ContentColor = EPalette::PrimaryContent
 The color of the content.
 
EPalette SelectionColor = EPalette::PrimaryAccent
 The color of the selection.
 
bool bSelectable = true
 Set if the tab bar is selectable or not.
 
- 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 tab bar.

Useful for multi-tab navigation or selecting an option from many.

Member Function Documentation

◆ ClearOptions()

void UWidgetStudioModernTabBar::ClearOptions ( )
overrideprotectedvirtual

Clear all options from the container.

Reimplemented from UWidgetStudioContainer.

◆ ConstructOption()

void UWidgetStudioModernTabBar::ConstructOption ( FButtonOptions  Option)
overrideprotectedvirtual

Reimplemented from UWidgetStudioContainer.

◆ GetSizeConstraint()

float UWidgetStudioModernTabBar::GetSizeConstraint ( ) const

Returns the current size constraint value.

◆ InitializeStyling()

void UWidgetStudioModernTabBar::InitializeStyling ( )
overrideprotectedvirtual

Reimplemented from UWidgetStudioBase.

◆ SetBackgroundColor()

void UWidgetStudioModernTabBar::SetBackgroundColor ( EPalette  NewColor)

Set the color of the background.

Parameters
NewColorThe new color to apply to the widgets background.

◆ SetContentAlignment()

void UWidgetStudioModernTabBar::SetContentAlignment ( TEnumAsByte< EHorizontalAlignment >  NewAlignment)

Set the alignment of the content.

Parameters
NewAlignmentThe new alignment to apply to the content.

◆ SetContentColor()

void UWidgetStudioModernTabBar::SetContentColor ( EPalette  NewColor)

Set the color of the content.

Parameters
NewColorThe new color to apply to the widgets content.

◆ SetCornerStyle()

void UWidgetStudioModernTabBar::SetCornerStyle ( ECornerStyle  NewStyle)

Set how the corner style looks.

Parameters
NewStyleThe new corner style to apply to the widget.

◆ SetCurrentIndex()

void UWidgetStudioModernTabBar::SetCurrentIndex ( int32  Index,
bool  bBroadcast = true 
)
overridevirtual

Set the current index.

Parameters
IndexThe new index to set the Tab bBr to.
bBroadcastEnable to broadcast the OnCurrentIndexChanged event.

Reimplemented from UWidgetStudioContainer.

◆ SetIconOptions()

void UWidgetStudioModernTabBar::SetIconOptions ( FWSIconStyle  NewIconOptions)

Set the icon styling options.

Parameters
NewIconOptionsThe new icon style to apply to the Tab Bar.

◆ SetIconPlacement()

void UWidgetStudioModernTabBar::SetIconPlacement ( EWSPlacement  NewIconPlacement)

Set the icon placement in conjunction to the text.

Parameters
NewIconPlacementThe new icon placement to apply to the Tab Bar.

◆ SetOrientation()

void UWidgetStudioModernTabBar::SetOrientation ( TEnumAsByte< EOrientation >  NewOrientation)

Set the grow direction.

Parameters
NewOrientationThe new orientation to apply to the Tab Bar.

◆ SetScrollable()

void UWidgetStudioModernTabBar::SetScrollable ( bool  NewState)

Enable or disable the scrollability of the Tab Bar.

Parameters
NewStateEnable to allow the Tab Bar to be scrollable

◆ SetScrollbarVisibility()

void UWidgetStudioModernTabBar::SetScrollbarVisibility ( ESlateVisibility  NewVisibility)

Set the scroll visibility of the scroll bar.

Parameters
NewVisibilityThe new visibility state of the scrollbar.

◆ SetSelectable()

void UWidgetStudioModernTabBar::SetSelectable ( bool  NewState)

Set the selectable state.

Parameters
NewStateEnable to allow the Tab Bar options to be selectable.

◆ SetSelectionColor()

void UWidgetStudioModernTabBar::SetSelectionColor ( EPalette  NewColor)

Set the color of the selection.

Parameters
NewColorThe new color to apply to the widgets selection.

◆ SetSizeConstraint()

void UWidgetStudioModernTabBar::SetSizeConstraint ( float  NewSize)

Constrains the size of the Tab Bar.


If the tab bar extends beyond the giving size constraint, the tab bar will become scrollable.

Size and scroll direction is dependent on set orientation.

If set to 0, size constraint will be ignored.

Parameters
NewSizeThe new size to constrain the Tab Bar to.

◆ SetTextOptions()

void UWidgetStudioModernTabBar::SetTextOptions ( FWSTextStyle  NewTextOptions)

Set the text styling options.

Parameters
NewTextOptionsThe new text style to apply to the Tab Bar.

◆ SynchronizeProperties()

void UWidgetStudioModernTabBar::SynchronizeProperties ( )
overrideprotectedvirtual

Reimplemented from UWidgetStudioContainer.

◆ UpdateStyling()

void UWidgetStudioModernTabBar::UpdateStyling ( )
overrideprotectedvirtual

Reimplemented from UWidgetStudioBase.

Member Data Documentation

◆ bEnableScrolling

bool UWidgetStudioModernTabBar::bEnableScrolling = false
protected

When enabled, the Tab Bar will be scrollable.

Scrollability starts when the Tab Bar's dimensions exceeds the parent widgets or set Size Constraints.

When enabled, the Tab Bar cannot fill the parent widgets size and will be dependent on it's own dimensions. Will require a re-compile of the Widget Blueprint to take effect.

◆ IconPlacement

EWSPlacement UWidgetStudioModernTabBar::IconPlacement
protected

Where the icons should be placed in conjunction with the text.

This is ignored for options set to Icon Only.

◆ Orientation

TEnumAsByte<EOrientation> UWidgetStudioModernTabBar::Orientation = Orient_Horizontal
protected

The direction to grow the bar.

Requires a Re-Compile to take effect.

◆ SizeConstraint

float UWidgetStudioModernTabBar::SizeConstraint = 0.f
protected

Constrains the size of the Tab Bar.

  • If the tab bar extends beyond the giving size constraint, the tab bar will become scrollable.
  • Size and scroll direction is dependent on set orientation.
  • If set to 0, or Horizontal/Vertical Alignment set to Align Fill, size constraint will be ignored.

◆ TextStyle

FWSTextStyle UWidgetStudioModernTabBar::TextStyle
protected
Initial value:
EWSFontType::Button,
EFontCase::Sentence,
ETextJustify::Center,
false,
0,
ETextWrappingPolicy::DefaultWrapping)
Struct with font weight, size, and letter spacing.
Definition: WSTypography.h:23
The settings for the Widget Studio Text.
Definition: WSText.h:23

The text styling options for the container.


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