You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rnx #rb none #ROBOMERGE-OWNER: ryan.durand #ROBOMERGE-AUTHOR: ryan.durand #ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900 #ROBOMERGE-BOT: (v613-10869866) [CL 10870549 by ryan durand in Main branch]
58 lines
2.0 KiB
C++
58 lines
2.0 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Misc/Attribute.h"
|
|
#include "Styling/SlateTypes.h"
|
|
#include "Framework/Text/IRun.h"
|
|
#include "Framework/Text/TextLayout.h"
|
|
#include "Widgets/SWidget.h"
|
|
#include "Layout/Children.h"
|
|
|
|
class FArrangedChildren;
|
|
class FPaintArgs;
|
|
class FSlateWindowElementList;
|
|
|
|
class SLATE_API FSlateTextLayout : public FTextLayout
|
|
{
|
|
public:
|
|
|
|
static TSharedRef< FSlateTextLayout > Create(SWidget* InOwner, FTextBlockStyle InDefaultTextStyle);
|
|
|
|
FChildren* GetChildren();
|
|
|
|
virtual void ArrangeChildren( const FGeometry& AllottedGeometry, FArrangedChildren& ArrangedChildren ) const;
|
|
|
|
virtual int32 OnPaint( const FPaintArgs& Args, const FGeometry& AllottedGeometry, const FSlateRect& MyCullingRect, FSlateWindowElementList& OutDrawElements, int32 LayerId, const FWidgetStyle& InWidgetStyle, bool bParentEnabled ) const;
|
|
|
|
virtual void EndLayout() override;
|
|
|
|
void SetDefaultTextStyle(FTextBlockStyle InDefaultTextStyle);
|
|
const FTextBlockStyle& GetDefaultTextStyle() const;
|
|
|
|
void SetIsPassword(const TAttribute<bool>& InIsPassword);
|
|
|
|
protected:
|
|
|
|
FSlateTextLayout(SWidget* InOwner, FTextBlockStyle InDefaultTextStyle);
|
|
|
|
virtual int32 OnPaintHighlights(const FPaintArgs& Args, const FTextLayout::FLineView& LineView, const TArray<FLineViewHighlight>& Highlights, const FTextBlockStyle& DefaultTextStyle, const FGeometry& AllottedGeometry, const FSlateRect& ClippingRect, FSlateWindowElementList& OutDrawElements, const int32 LayerId, const FWidgetStyle& InWidgetStyle, bool bParentEnabled) const;
|
|
|
|
virtual void AggregateChildren();
|
|
|
|
virtual TSharedRef<IRun> CreateDefaultTextRun(const TSharedRef<FString>& NewText, const FTextRange& NewRange) const override;
|
|
|
|
protected:
|
|
/** Default style used by the TextLayout */
|
|
FTextBlockStyle DefaultTextStyle;
|
|
|
|
private:
|
|
|
|
TSlotlessChildren< SWidget > Children;
|
|
|
|
/** This this layout displaying a password? */
|
|
TAttribute<bool> bIsPassword;
|
|
|
|
friend class FSlateTextLayoutFactory;
|
|
};
|