38 #include <Sound/SoundAttenuation.h> 39 #include "Runtime/UMG/Public/Components/Widget.h" 40 #include "SHummingbirdWidget.h" 41 #include "HummingbirdEventHelpers.h" 42 #include "HummingbirdViewListener.h" 43 #include "HummingbirdAudioWrapper.h" 45 #include "HummingbirdWidget.generated.h" 53 UCLASS(meta=(DisplayName =
"Hummingbird Widget"))
56 GENERATED_UCLASS_BODY()
60 virtual TSharedRef<SWidget> RebuildWidget()
override;
61 virtual void SynchronizeProperties()
override;
63 virtual const FText GetPaletteCategory()
override;
67 TSharedPtr<SHummingbirdWidget> CoherentWidget;
70 void OnViewCreated(cohtml::View* View);
78 cohtml::View* CachedView;
82 UPROPERTY(BlueprintReadWrite, Category =
"View")
90 UFUNCTION(BlueprintCallable, Category = "Audio")
91 void SetSoundAttenuation(const FSoundAttenuationSettings& Settings);
94 UPROPERTY(BlueprintAssignable)
95 FHBReadyForBindingsSignature ReadyForBindings;
98 UPROPERTY(BlueprintAssignable)
99 FHBBindingsReleasedSignature BindingsReleased;
102 UPROPERTY(BlueprintAssignable)
103 FHBScriptingReady HBScriptingReady;
106 UFUNCTION(BlueprintCallable, Category = "View")
107 bool IsReadyToCreateView() const;
110 UFUNCTION(BlueprintCallable, Category = "View")
111 bool IsReadyForBindings() const;
114 UFUNCTION(BlueprintCallable, Category = "View")
115 bool HasRequestedView() const;
118 UFUNCTION(BlueprintCallable, Category = "View")
119 void ShowPaintRects(
bool show);
122 UFUNCTION(BlueprintCallable, Category = "View")
123 void Load(const FString& path);
126 UFUNCTION(BlueprintCallable, Category = "View")
130 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "View", DisplayName = "Enable Complex CSS Selector Support")
131 bool bEnableComplexCSSSupport;
134 UFUNCTION(BlueprintCallable, Category = "View")
135 UTextureRenderTarget2D* GetRenderTexture() const;
137 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "View", AdvancedDisplay)
138 TEnumAsByte<enum TextureFilter> Filter;
141 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "View")
147 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "View")
148 bool bGammaCorrectedMaterial;
151 UFUNCTION(BlueprintCallable, Category = "ViewScripting")
155 UFUNCTION(BlueprintCallable, Category = "ViewScripting")
158 inline
cohtml::View* GetView()
const 160 if (CoherentWidget.IsValid())
162 return CoherentWidget->GetView();
167 virtual void BeginDestroy()
override;
168 virtual void ReleaseSlateResources(
bool bReleaseChildren)
override;
171 void OnAudioStreamCreated(
int Id,
int BitDepth,
int Channels,
float SamplingRate);
172 void OnAudioStreamClosed(
int Id);
173 void OnAudioStreamPlay(
int Id);
174 void OnAudioStreamPause(
int Id);
175 void OnAudioDataReceived(
int Id,
int Samples,
float** Pcm,
int Channels);
176 void OnAudioStreamEnded(
int Id);
177 void OnAudioStreamVolumeChanged(
int Id,
float Volume);
179 THummingbirdAudioWrapper<AActor> AudioWrapper;
181 void SetReadyForBindings();
183 bool NeedsViewRecreation()
const;
185 TUniquePtr<THummingbirdViewListener<UHummingbirdWidget>> Listener;
186 bool bIsReadyForBindings;
187 cohtml::ViewSettings LastSavedViewSettings;
194 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category =
"View")
Definition: HummingbirdJSEvent.h:51
Definition: HummingbirdFColorBinder.h:41