3#include "CoreMinimal.h"
4#include "Widgets/SCompoundWidget.h"
5#include "Styling/CoreStyle.h"
6#include "STextPropertyEditableTextBox.h"
7#include "PropertyHandle.h"
20 : _Style(&FCoreStyle::Get().GetWidgetStyle<FEditableTextBoxStyle>(
"NormalEditableTextBox"))
23 , _ReadOnlyForegroundColor()
26 , _SelectAllTextWhenFocused(false)
27 , _ClearKeyboardFocusOnCommit(false)
28 , _SelectAllTextOnCommit(false)
29 , _AddResetToDefaultWidget(true)
30 , _ModiferKeyForNewLine(EModifierKey::
None)
33 , _MinDesiredWidth(209.f)
34 , _MaxDesiredHeight(600.f)
37 SLATE_STYLE_ARGUMENT(FEditableTextBoxStyle, Style)
40 SLATE_ATTRIBUTE(FSlateFontInfo, Font)
43 SLATE_ATTRIBUTE(FSlateColor, ForegroundColor)
46 SLATE_ATTRIBUTE(FSlateColor, ReadOnlyForegroundColor)
49 SLATE_ATTRIBUTE(
float, WrapTextAt)
52 SLATE_ATTRIBUTE(
bool, AutoWrapText)
55 SLATE_ATTRIBUTE(
bool, SelectAllTextWhenFocused)
58 SLATE_ATTRIBUTE(
bool, ClearKeyboardFocusOnCommit)
61 SLATE_ATTRIBUTE(
bool, SelectAllTextOnCommit)
64 SLATE_ARGUMENT(
bool, AddResetToDefaultWidget)
67 SLATE_ARGUMENT(EModifierKey::Type, ModiferKeyForNewLine)
70 SLATE_ATTRIBUTE(FOptionalSize, MinDesiredWidth)
73 SLATE_ATTRIBUTE(FOptionalSize, MaxDesiredHeight)
78 const FArguments& Arguments,
80 const TSharedRef<IPropertyHandle>& InPropertyHandle
83 FReply
OnFocusReceived(const FGeometry& MyGeometry, const FFocusEvent& InFocusEvent) override;
84 void Tick(const FGeometry& AllottedGeometry,
double InCurrentTime,
float InDeltaTime) override;
93 void GetDesiredWidth(
float& OutMinDesiredWidth,
float& OutMaxDesiredWidth);
115#if USE_STABLE_LOCALIZATION_KEYS
116 void OnKeyChanged(
const FText& NewText);
117 void OnKeyCommitted(
const FText& NewText, ETextCommit::Type CommitInfo);
119 FText GetPackageValue()
const;
DECLARE_MULTICAST_DELEGATE_TwoParams(FDialogueTextCommitedDelegate, const FText &, ETextCommit::Type)
DECLARE_MULTICAST_DELEGATE_OneParam(FDialogueTextChangedDelegate, const FText &)
TSharedPtr< SMultiLineEditableTextBox > MultiLineWidget
static FText MultipleValuesText
FText GetKeyValue() const
void Tick(const FGeometry &AllottedGeometry, double InCurrentTime, float InDeltaTime) override
TSharedPtr< SEditableTextBox > NamespaceEditableTextBox
bool bAddResetToDefaultWidget
FText GetNamespaceValue() const
void OnTextCommitted(const FText &NewText, ETextCommit::Type CommitInfo)
EVisibility GetDiffersFromDefaultAsVisibility() const
bool IsNamespaceReadOnly() const
SDialogueTextPropertyEditableTextBox Self
void OnNamespaceCommitted(const FText &NewText, ETextCommit::Type CommitInfo)
SLATE_BEGIN_ARGS(SDialogueTextPropertyEditableTextBox)
TSharedPtr< SEditableTextBox > KeyEditableTextBox
void SetTextError(const FText &InErrorMsg)
EVisibility GetTextWarningImageVisibility() const
FText GetTextValue() const
void OnTextChanged(const FText &NewText)
FDialogueTextCommitedDelegate TextCommittedEvent
TSharedPtr< SWidget > PrimaryWidget
FDialogueTextCommitedDelegate & OnTextCommittedEvent()
EVisibility GetNamespaceOverridenWarningImageVisibility() const
TSharedPtr< IEditableTextProperty > EditableTextProperty
bool IsIdentityReadOnly() const
bool SupportsKeyboardFocus() const override
TOptional< float > PreviousHeight
bool IsSourceTextReadOnly() const
ECheckBoxState GetLocalizableCheckState(bool bActiveState) const
EVisibility GetLocalizableVisibility() const
FDialogueTextChangedDelegate & OnTextChangedEvent()
void OnNamespaceChanged(const FText &NewText)
FDialogueTextChangedDelegate TextChangedEvent
void SetTextValue(const FText &NewValue)
TSharedPtr< IPropertyHandle > PropertyHandle
void HandleLocalizableCheckStateChanged(ECheckBoxState InCheckboxState, bool bActiveState)
bool IsValidIdentity(const FText &InIdentity, FText *OutReason=nullptr, const FText *InErrorCtx=nullptr) const
void GetDesiredWidth(float &OutMinDesiredWidth, float &OutMaxDesiredWidth)
FReply OnFocusReceived(const FGeometry &MyGeometry, const FFocusEvent &InFocusEvent) override
FText GetResetToolTip() const
FText GetToolTipText() const
bool WillNamespaceBeUpdated() const
bool IsKeyReadOnly() const
bool IsCultureInvariantFlagEnabled() const
void Construct(const FArguments &Arguments, const TSharedRef< IEditableTextProperty > &InEditableTextProperty, const TSharedRef< IPropertyHandle > &InPropertyHandle)