-
Notifications
You must be signed in to change notification settings - Fork 115
/
Copy pathJavascriptGraphTextPropertyEditableTextBox.h
76 lines (57 loc) · 2.64 KB
/
JavascriptGraphTextPropertyEditableTextBox.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Components/Widget.h"
#include "Types/SlateStructs.h"
#include "JavascriptUMG/JavascriptUMGLibrary.h"
#include "JavascriptGraphEditorLibrary.h"
#include "JavascriptGraphTextPropertyEditableTextBox.generated.h"
class FJavascriptEditableTextGraphPin;
class STextPropertyEditableTextBox;
/**
*
*/
UCLASS()
class JAVASCRIPTGRAPHEDITOR_API UJavascriptGraphTextPropertyEditableTextBox : public UWidget
{
GENERATED_UCLASS_BODY()
public:
DECLARE_DYNAMIC_DELEGATE_RetVal(FJavascriptEdGraphPin, FOnGetGraphPin);
DECLARE_DYNAMIC_DELEGATE_RetVal(FJavascriptTextProperty, FOnGetDefaultValue);
DECLARE_DYNAMIC_DELEGATE_RetVal_OneParam(FString, FOnIsValidText, const FString&, TextValue);
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnEditableTextBoxCommittedEvent, const FJavascriptTextProperty&, TextProperty);
UPROPERTY(EditAnywhere, Category = Events, meta = (IsBindableEvent = "True"))
FOnGetGraphPin OnGetGraphPin;
UPROPERTY(EditAnywhere, Category = Events, meta = (IsBindableEvent = "True"))
FOnGetDefaultValue OnGetDefaultValue;
UPROPERTY(EditAnywhere, Category = Events, meta = (IsBindableEvent = "True"))
FOnIsValidText OnIsValidText;
UPROPERTY(BlueprintAssignable, Category = "TextBox|Event")
FOnEditableTextBoxCommittedEvent OnTextCommitted;
/** The style */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Appearance, meta = (DisplayName = "Style", ShowOnlyInnerProperties))
FEditableTextBoxStyle WidgetStyle;
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Appearance)
float WrapTextAt;
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Behavior, AdvancedDisplay)
bool AutoWrapText;
/** When specified, will report the MinDesiredWidth if larger than the content's desired width */
FOptionalSize MinimumDesiredWidth;
/** When specified, will report the MaxDesiredHeight if smaller than the content's desired height */
FOptionalSize MaximumDesiredHeight;
public:
//~ Begin UWidget interface
virtual void SynchronizeProperties() override;
// End UWidget interface
virtual void ReleaseSlateResources(bool bReleaseChildren) override;
void HandleOnNamespaceKeyChanged(const FString& InNamespace, const FString& InKey);
void HandleOnTextCommitted(const FText& InText);
void HandleOnStringTableKeyChanged(const FName& InTableId, const FString& InKey);
protected:
// UWidget interface
virtual TSharedRef<SWidget> RebuildWidget() override;
// End of UWidget interface
protected:
FJavascriptTextProperty MyTextProperty;
TSharedPtr<FJavascriptEditableTextGraphPin> MyEditableTextProperty;
TSharedPtr<STextPropertyEditableTextBox> MyEditableTextBlock;
};