Touch Interface Designer 2025.2
Create touch interface with a visual editor and manage all mobile inputs like gestures
Loading...
Searching...
No Matches
SLayoutComponent Class Reference

#include <SLayoutComponent.h>

Inheritance diagram for SLayoutComponent:
Collaboration diagram for SLayoutComponent:

Public Member Functions

 SLATE_BEGIN_ARGS (SLayoutComponent)
 SLayoutComponent ()
virtual ~SLayoutComponent ()
void Construct (const FArguments &InArgs)
void Destruct ()
EActiveTimerReturnType PostGeometryInitialization (double InCurrentTime, float InDeltaTime)
void ConstructWidget () const
FVector2D GetTopLeftPosition () const
FVector2D GetSize () const
TSharedPtr< STouchInterfaceRuntimeGetRuntimeTouchInterfaceWidget () const
int32 GetInputPriority () const
void SetDecorators (TArray< FDecorator > NewDecorators)
void AddDecorator (TSharedPtr< SWidget > Decorator)
void InsertDecorator (TSharedPtr< SWidget > Decorator, int32 Index)
void RemoveDecorator (TSharedPtr< SWidget > DecoratorToRemove)
void ShowDecorator (TSharedPtr< SWidget > DecoratorWidget)
void HideDecorator (TSharedPtr< SWidget > DecoratorWidget)
virtual bool ProcessPressEvent (const FGeometry &LayoutGeometry, const FPointerEvent &PointerEvent)
virtual void ProcessMoveEvent (const FGeometry &LayoutGeometry, const FPointerEvent &PointerEvent)
virtual void ProcessReleaseEvent (const FGeometry &LayoutGeometry, const FPointerEvent &PointerEvent)
virtual FVector2D ComputeDesiredSize (float LayoutScaleMultiplier) const override
virtual void Tick (const FGeometry &AllottedGeometry, const double InCurrentTime, const float InDeltaTime) override
virtual int32 OnPaint (const FPaintArgs &Args, const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle, bool bParentEnabled) const override
virtual void PaintDebug (const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle) const
virtual void UpdateScaleFactor (const FGeometry &LayoutGeometry, const float &ScaleFactor)
virtual FVector2D Recenter (const FVector2D AbsoluteLocation)
virtual void ResetPosition ()
void Animate ()
void FullRebuildWidgetDecorator ()
virtual void SetAnchor (const FAnchors NewAnchors)
virtual void SetSize (const FVector2D NewSize)
virtual void SetAnchorOffset (const FVector4f Offset)
virtual void SetAlignment (const FVector2D NewAlignment)
virtual void SetInteractionType (const EInteractionType NewType)
virtual void SetInteractionSize (const float Value)
virtual void SetInputPriority (const int32 Value)
virtual void SetPositionFromTopLeft (const FVector2D NewPosition)
void SetDrawDebugEnabled (const bool bEnable)
void SetDebugType (const int32 InDebugType)
virtual bool IsUnderLocation (const FVector2D AbsoluteLocation)
virtual bool CanInteract () const
virtual bool IsPressed () const
virtual void BlockInput (const bool bBlock)
FVector2D ScreenSpaceToLayoutSpace (const FVector2D Location)
FVector2D LocalSpaceToNormalized (const FVector2D Location) const
SConstraintCanvas::FSlot * CreateSlot (const FAnchors Anchor, const FVector2D Alignment)
void AddChild (TSharedPtr< SLayoutComponent > Component)
void AddChild (TSharedPtr< SLayoutComponent > Component, const FAnchors Anchor, const FVector2D Alignment)
void RemoveChild (TSharedPtr< SLayoutComponent > Component)

Public Attributes

FOnTouchDelegate OnPress
FOnTouchDelegate OnMove
FOnTouchDelegate OnRelease
FOnTickDelegate OnTick

Protected Member Functions

void SetSlotPosition (const FVector2D &SlotPosition) const
void SetSlotSize (const FVector2D SlotSize) const

Protected Attributes

FVector2D ComponentLocation
FVector2D LayoutTopLeftPosition
FVector2D PivotOffset
FVector2D RecenterOffset
FVector2D Size
FVector2D ScaledSize
int32 InputPriority

Detailed Description

Base class for component in layout. It only used for hit detection (geometry) and layer drawing It also used as container for UUserWidget

Constructor & Destructor Documentation

◆ SLayoutComponent()

BEGIN_SLATE_FUNCTION_BUILD_OPTIMIZATION SLayoutComponent::SLayoutComponent ( )

◆ ~SLayoutComponent()

SLayoutComponent::~SLayoutComponent ( )
virtual

Member Function Documentation

◆ AddChild() [1/2]

void SLayoutComponent::AddChild ( TSharedPtr< SLayoutComponent > Component)

◆ AddChild() [2/2]

void SLayoutComponent::AddChild ( TSharedPtr< SLayoutComponent > Component,
const FAnchors Anchor,
const FVector2D Alignment )

◆ AddDecorator()

void SLayoutComponent::AddDecorator ( TSharedPtr< SWidget > Decorator)

◆ Animate()

void SLayoutComponent::Animate ( )

◆ BlockInput()

virtual void SLayoutComponent::BlockInput ( const bool bBlock)
inlinevirtual

◆ CanInteract()

bool SLayoutComponent::CanInteract ( ) const
virtual

◆ ComputeDesiredSize()

virtual FVector2D SLayoutComponent::ComputeDesiredSize ( float LayoutScaleMultiplier) const
inlineoverridevirtual

◆ Construct()

void SLayoutComponent::Construct ( const FArguments & InArgs)

◆ ConstructWidget()

void SLayoutComponent::ConstructWidget ( ) const

◆ CreateSlot()

SConstraintCanvas::FSlot * SLayoutComponent::CreateSlot ( const FAnchors Anchor,
const FVector2D Alignment )

◆ Destruct()

void SLayoutComponent::Destruct ( )

◆ FullRebuildWidgetDecorator()

void SLayoutComponent::FullRebuildWidgetDecorator ( )

◆ GetInputPriority()

int32 SLayoutComponent::GetInputPriority ( ) const
inline

◆ GetRuntimeTouchInterfaceWidget()

TSharedPtr< STouchInterfaceRuntime > SLayoutComponent::GetRuntimeTouchInterfaceWidget ( ) const

◆ GetSize()

FVector2D SLayoutComponent::GetSize ( ) const
inline

◆ GetTopLeftPosition()

FVector2D SLayoutComponent::GetTopLeftPosition ( ) const
inline

◆ HideDecorator()

void SLayoutComponent::HideDecorator ( TSharedPtr< SWidget > DecoratorWidget)

◆ InsertDecorator()

void SLayoutComponent::InsertDecorator ( TSharedPtr< SWidget > Decorator,
int32 Index )

◆ IsPressed()

virtual bool SLayoutComponent::IsPressed ( ) const
inlinevirtual

◆ IsUnderLocation()

bool SLayoutComponent::IsUnderLocation ( const FVector2D AbsoluteLocation)
virtual

◆ LocalSpaceToNormalized()

FVector2D SLayoutComponent::LocalSpaceToNormalized ( const FVector2D Location) const

◆ OnPaint()

int32 SLayoutComponent::OnPaint ( const FPaintArgs & Args,
const FGeometry & AllottedGeometry,
const FSlateRect & MyCullingRect,
FSlateWindowElementList & OutDrawElements,
int32 LayerId,
const FWidgetStyle & InWidgetStyle,
bool bParentEnabled ) const
overridevirtual

◆ PaintDebug()

void SLayoutComponent::PaintDebug ( const FGeometry & AllottedGeometry,
const FSlateRect & MyCullingRect,
FSlateWindowElementList & OutDrawElements,
int32 LayerId,
const FWidgetStyle & InWidgetStyle ) const
virtual

◆ PostGeometryInitialization()

EActiveTimerReturnType SLayoutComponent::PostGeometryInitialization ( double InCurrentTime,
float InDeltaTime )

◆ ProcessMoveEvent()

void SLayoutComponent::ProcessMoveEvent ( const FGeometry & LayoutGeometry,
const FPointerEvent & PointerEvent )
virtual

◆ ProcessPressEvent()

bool SLayoutComponent::ProcessPressEvent ( const FGeometry & LayoutGeometry,
const FPointerEvent & PointerEvent )
virtual

◆ ProcessReleaseEvent()

void SLayoutComponent::ProcessReleaseEvent ( const FGeometry & LayoutGeometry,
const FPointerEvent & PointerEvent )
virtual

◆ Recenter()

FVector2D SLayoutComponent::Recenter ( const FVector2D AbsoluteLocation)
virtual

◆ RemoveChild()

void SLayoutComponent::RemoveChild ( TSharedPtr< SLayoutComponent > Component)

◆ RemoveDecorator()

void SLayoutComponent::RemoveDecorator ( TSharedPtr< SWidget > DecoratorToRemove)

◆ ResetPosition()

void SLayoutComponent::ResetPosition ( )
virtual

◆ ScreenSpaceToLayoutSpace()

FVector2D SLayoutComponent::ScreenSpaceToLayoutSpace ( const FVector2D Location)

◆ SetAlignment()

void SLayoutComponent::SetAlignment ( const FVector2D NewAlignment)
virtual

◆ SetAnchor()

void SLayoutComponent::SetAnchor ( const FAnchors NewAnchors)
virtual

◆ SetAnchorOffset()

void SLayoutComponent::SetAnchorOffset ( const FVector4f Offset)
virtual

◆ SetDebugType()

void SLayoutComponent::SetDebugType ( const int32 InDebugType)
inline

◆ SetDecorators()

void SLayoutComponent::SetDecorators ( TArray< FDecorator > NewDecorators)

◆ SetDrawDebugEnabled()

void SLayoutComponent::SetDrawDebugEnabled ( const bool bEnable)
inline

◆ SetInputPriority()

virtual void SLayoutComponent::SetInputPriority ( const int32 Value)
inlinevirtual

◆ SetInteractionSize()

virtual void SLayoutComponent::SetInteractionSize ( const float Value)
inlinevirtual

◆ SetInteractionType()

void SLayoutComponent::SetInteractionType ( const EInteractionType NewType)
virtual

◆ SetPositionFromTopLeft()

void SLayoutComponent::SetPositionFromTopLeft ( const FVector2D NewPosition)
virtual

Set position of widget in layout space (calculate position from top left corner). UpdateCenter = object position has changed, otherwise, new layout position is temporary

◆ SetSize()

void SLayoutComponent::SetSize ( const FVector2D NewSize)
virtual

◆ SetSlotPosition()

void SLayoutComponent::SetSlotPosition ( const FVector2D & SlotPosition) const
protected

◆ SetSlotSize()

void SLayoutComponent::SetSlotSize ( const FVector2D SlotSize) const
protected

◆ ShowDecorator()

void SLayoutComponent::ShowDecorator ( TSharedPtr< SWidget > DecoratorWidget)

◆ SLATE_BEGIN_ARGS()

SLayoutComponent::SLATE_BEGIN_ARGS ( SLayoutComponent )
inline

◆ Tick()

void SLayoutComponent::Tick ( const FGeometry & AllottedGeometry,
const double InCurrentTime,
const float InDeltaTime )
overridevirtual

◆ UpdateScaleFactor()

void SLayoutComponent::UpdateScaleFactor ( const FGeometry & LayoutGeometry,
const float & ScaleFactor )
virtual

Member Data Documentation

◆ ComponentLocation

FVector2D SLayoutComponent::ComponentLocation
protected

Position of component in local space (take into account anchor and alignment) DO NOT CHANGE MANUALLY

◆ InputPriority

int32 SLayoutComponent::InputPriority
protected

◆ LayoutTopLeftPosition

FVector2D SLayoutComponent::LayoutTopLeftPosition
protected

◆ OnMove

FOnTouchDelegate SLayoutComponent::OnMove

◆ OnPress

FOnTouchDelegate SLayoutComponent::OnPress

◆ OnRelease

FOnTouchDelegate SLayoutComponent::OnRelease

◆ OnTick

FOnTickDelegate SLayoutComponent::OnTick

◆ PivotOffset

FVector2D SLayoutComponent::PivotOffset
protected

◆ RecenterOffset

FVector2D SLayoutComponent::RecenterOffset
protected

◆ ScaledSize

FVector2D SLayoutComponent::ScaledSize
protected

◆ Size

FVector2D SLayoutComponent::Size
protected

The documentation for this class was generated from the following files:
  • D:/MEGA/TouchProject/TouchProjectNext/Plugins/TouchInterfaceDesigner/Source/TouchInterface/Public/Components/Slate/SLayoutComponent.h
  • D:/MEGA/TouchProject/TouchProjectNext/Plugins/TouchInterfaceDesigner/Source/TouchInterface/Private/Components/Slate/SLayoutComponent.cpp