Stream Chat Unreal SDK
Loading...
Searching...
No Matches
ChannelContextWidget.h
1// Copyright 2022 Stream.IO, Inc. All Rights Reserved.
2
3// Fill out your copyright notice in the Description page of Project Settings.
4
5#pragma once
6
7#include "Channel/ChatChannel.h"
8#include "ContextWidget.h"
9#include "CoreMinimal.h"
10
11#include "ChannelContextWidget.generated.h"
12
19UCLASS()
20class STREAMCHATUI_API UChannelContextWidget final : public UContextWidget
21{
22 GENERATED_BODY()
23
24public:
25 UFUNCTION(BlueprintCallable, Category = "Stream Chat")
26 void Setup(UChatChannel* InChannel);
27
28 UFUNCTION(BlueprintPure, Category = "Stream Chat", meta = (DisplayName = "Get Channel Context"))
29 static UChannelContextWidget* Get(const UWidget* Widget);
30 UFUNCTION(BlueprintPure, Category = "Stream Chat", meta = (DisplayName = "Get Channel Context"))
31 static UChannelContextWidget* TryGet(const UWidget* Widget);
32 UFUNCTION(BlueprintPure, Category = "Stream Chat")
33 static UChatChannel* GetChannel(const UWidget* Widget);
34 UFUNCTION(BlueprintPure, Category = "Stream Chat")
35 static UChatChannel* TryGetChannel(const UWidget* Widget);
36 UChatChannel* GetChannel() const;
37
38 DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FStartEditMessageDelegate, const FMessage&, Message);
39 UPROPERTY(BlueprintAssignable)
40 FStartEditMessageDelegate OnStartEditMessage;
41
42private:
43 UPROPERTY(Transient)
44 UChatChannel* Channel;
45};
Provide a reference to a UChatChannel to child widgets.
Definition: ChannelContextWidget.h:21
The client-side representation of a Stream Chat channel.
Definition: ChatChannel.h:74
Represents a Stream Chat message.
Definition: Message.h:66