Stream Chat Unreal SDK
Loading...
Searching...
No Matches
UiBlueprintLibrary.h
1// Copyright 2022 Stream.IO, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "Channel/ChatChannel.h"
6#include "CoreMinimal.h"
7#include "Input/Events.h"
8#include "Kismet/BlueprintFunctionLibrary.h"
9#include "User/User.h"
10
11#include "UiBlueprintLibrary.generated.h"
12
13class UScrollBox;
14class UWidget;
15
16UCLASS()
17class STREAMCHATUI_API UUiBlueprintLibrary final : public UBlueprintFunctionLibrary
18{
19 GENERATED_BODY()
20
21public:
22 UFUNCTION(BlueprintCallable, Category = "Stream Chat|UI")
23 static void AddContextMenu(UWidget* Widget, const FPointerEvent& InMouseEvent);
24
25 UFUNCTION(BlueprintCallable, Category = "Stream Chat|UI")
26 static void DismissContextMenu(UWidget* Widget);
27
28 UFUNCTION(BlueprintPure, Category = "Stream Chat|UI")
29 static FString GetChannelTitle(const UChatChannel* Channel);
30
31 UFUNCTION(BlueprintCallable, Category = "Stream Chat|UI")
32 static void GetFirstVisibleChildOfScrollBox(UScrollBox* ScrollBox, int32& OutIndex, float& OutLeadingEdge);
33
34 UFUNCTION(BlueprintPure, Category = "Stream Chat|User", meta = (DisplayName = "Deference User Ref", CompactNodeTitle = "->", BlueprintAutocast))
35 static const FUser& DerefUserRef(const FUserRef& User);
36
37 UFUNCTION(BlueprintPure, Category = "Stream Chat|User")
38 static bool IsCurrent(const FUserRef& User);
39
41 UFUNCTION(BlueprintPure, Category = "Stream Chat|Messages")
42 static FLinearColor GenerateColorFromString(const FString& Input);
43
45 UFUNCTION(BlueprintPure, meta = (DisplayName = "To Hex String (linear color)", CompactNodeTitle = "->", BlueprintAutocast), Category = "Utilities|String")
46 static FString Conv_ColorToHexString(const FLinearColor& InColor);
47};
The client-side representation of a Stream Chat channel.
Definition: ChatChannel.h:74
A Stream Chat user.
Definition: User.h:20
A reference to a unique User.
Definition: UserRef.h:23